Try build with cross #175
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# REF: | |
# 1. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude | |
# | |
name: Test Creating Release Draft | |
on: | |
push: | |
branches: | |
- release/freebsd | |
tags: | |
- 'v*' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
standard: | |
name: Std | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-freebsd | |
extra: ['bin'] | |
include: | |
- target: x86_64-unknown-freebsd | |
os: ubuntu-22.04 | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Rust Toolchain Target | |
run: | | |
echo "targets = ['${{matrix.target}}']" >> rust-toolchain.toml | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/[email protected] | |
# WARN: Keep the rustflags to prevent from the winget submission error: `CAQuietExec: Error 0xc0000135` | |
with: | |
cache: false | |
rustflags: '' | |
- name: Setup Nushell | |
uses: hustcer/setup-nu@v3 | |
with: | |
version: 0.98.0 | |
- name: Release Nu Binary | |
id: nu | |
run: | | |
apt-get install tree -y --no-install-recommends | |
cargo install cross | |
cross build --release --all --target x86_64-unknown-freebsd | |
tree target | |