From 1f3898c1771fcaa98c271a9844eb30a970689356 Mon Sep 17 00:00:00 2001 From: Mic Neale Date: Wed, 18 Dec 2024 16:14:53 +1100 Subject: [PATCH] use cross --- .github/workflows/cli-release.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml index e6005b43e7..ee1ad1aea0 100644 --- a/.github/workflows/cli-release.yml +++ b/.github/workflows/cli-release.yml @@ -26,26 +26,21 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Rust + - name: Install Rust uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - target: ${{ matrix.architecture }}-${{ matrix.suffix }} + + - name: Install Cross + run: cargo install cross - name: Add Rust target for cross-compilation - if: matrix.architecture == 'aarch64' - run: rustup target add aarch64-unknown-linux-gnu - - - name: Install dependencies for cross-compilation - if: matrix.architecture == 'aarch64' && matrix.os == 'ubuntu-latest' run: | - sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu + rustup target add ${{ matrix.architecture }}-${{ matrix.suffix }} - id: build shell: bash run: | export TARGET=${{ matrix.architecture }}-${{ matrix.suffix }} - cargo build --release --target $TARGET + cross build --release --target $TARGET cd target/${TARGET}/release tar -cjf goose-${TARGET}.tar.bz2 goose goosed export TARGET_PATH="target/${TARGET}/release/goose-${TARGET}.tar.bz2" @@ -55,8 +50,6 @@ jobs: with: name: goose-${{ matrix.architecture }}-${{ matrix.suffix }} path: ${{ steps.build.outputs.TARGET_PATH }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release: name: Release