Skip to content

Commit e60e06e

Browse files
fix release.yml
1 parent d11229e commit e60e06e

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ jobs:
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: |
@@ -80,7 +83,16 @@ jobs:
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

0 commit comments

Comments
 (0)