Skip to content

Commit

Permalink
fix10
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolLoong committed Sep 4, 2024
1 parent c62a479 commit 74b9a7c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ jobs:
run: cargo install cross
- name: Build with Cargo or Cross
run: |
if [ "${{ matrix.arch }}" == "arm64" ] && [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
cross build --verbose --release --target=${{ matrix.rust_target }}
else
rustup set auto-self-update disable
rustup target add ${{ matrix.rust_target }}
cargo build --verbose --release --target=${{ matrix.rust_target }}
fi
node -e "const { execSync } = require('child_process'); const arch = process.env.MATRIX_ARCH; const os = process.env.MATRIX_OS; const rustTarget = process.env.MATRIX_RUST_TARGET; if (arch === 'arm64' && os === 'ubuntu-latest') { console.log('Using cross to build...'); execSync('cross build --verbose --release --target=' + rustTarget, { stdio: 'inherit' }); } else { console.log('Using cargo to build...'); execSync('rustup set auto-self-update disable', { stdio: 'inherit' }); execSync('rustup target add ' + rustTarget, { stdio: 'inherit' }); execSync('cargo build --verbose --release --target=' + rustTarget, { stdio: 'inherit' }); }"
env:
MATRIX_ARCH: ${{ matrix.arch }}
MATRIX_OS: ${{ matrix.os }}
MATRIX_RUST_TARGET: ${{ matrix.rust_target }}
- run: npm install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 74b9a7c

Please sign in to comment.