File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444
4545 - name : Install Rust
4646 uses : dtolnay/rust-toolchain@stable
47- with :
48- targets : ${{ matrix.target }}
47+
48+ - name : Add target
49+ run : |
50+ rustup target add ${{ matrix.target }}
51+ rustup component add rust-std-${{ matrix.target }}
4952
5053 - name : Verify Rust installation
5154 run : |
8083 target
8184 key : ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
8285
83- - name : Build binary
86+ - name : Install cross (for cross-compilation)
87+ if : matrix.target == 'aarch64-unknown-linux-gnu'
88+ run : cargo install cross --git https://github.com/cross-rs/cross
89+
90+ - name : Build binary (cross-compilation)
91+ if : matrix.target == 'aarch64-unknown-linux-gnu'
92+ run : cross build --release --target ${{ matrix.target }} -p raz-cli
93+
94+ - name : Build binary (native)
95+ if : matrix.target != 'aarch64-unknown-linux-gnu'
8496 run : cargo build --release --target ${{ matrix.target }} -p raz-cli
8597
8698 - name : Prepare binary
You can’t perform that action at this time.
0 commit comments