From bba6a1b8ba95fc4999f2963252ad9c6520e26d05 Mon Sep 17 00:00:00 2001 From: Emre YILMAZ Date: Mon, 27 May 2024 17:28:00 -0400 Subject: [PATCH] fix workflow Signed-off-by: Emre YILMAZ --- .github/workflows/release.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0b210f..f899cff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,9 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{matrix.target}} + container: ${{matrix.container}} + name: dist (${{matrix.target}}) strategy: matrix: @@ -37,6 +39,25 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Install Rust toolchain + run: | + rustup update --no-self-update stable + rustup target add ${{ matrix.target }} + rustup component add rust-src + - name: Update apt repositories + if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf' + run: sudo apt-get update + + + - name: Install AArch64 target toolchain + if: matrix.target == 'aarch64-unknown-linux-gnu' + run: sudo apt-get install gcc-aarch64-linux-gnu + + - name: Install ARM target toolchain + if: matrix.target == 'arm-unknown-linux-gnueabihf' + run: sudo apt-get install gcc-arm-linux-gnueabihf + + - name: Build run: cargo build --release --target ${{ matrix.target }}