From 743cf4a4d580fde6f7bfe92d4fceb64e4412368b Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Tue, 27 Dec 2022 19:27:59 +0200 Subject: [PATCH] ci: migrate to dtolnay/rust-toolchain --- .github/workflows/build-release-binaries.yml | 7 ++----- .github/workflows/ci.yml | 22 +++++++------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 9e303e5d..48b8b4fa 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -52,12 +52,9 @@ jobs: - uses: Swatinem/rust-cache@v2.2.0 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal - target: armv7-unknown-linux-gnueabihf - override: true + targets: armv7-unknown-linux-gnueabihf - name: Build ${{ matrix.target }} ${{ matrix.bin }} release binary uses: actions-rs/cargo@v1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e470729..3f007e82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,27 +75,21 @@ jobs: - uses: Swatinem/rust-cache@v2.2.0 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal - target: armv7-unknown-linux-gnueabihf - override: true + targets: armv7-unknown-linux-gnueabihf - name: Build binary if: matrix.target != 'armv7-unknown-linux-gnueabihf' - uses: actions-rs/cargo@v1 - with: - command: build - args: -p swap --target ${{ matrix.target }} + run: cargo build -p swap --target ${{ matrix.target }} + + - name: Install cross (armv7) + if: matrix.target == 'armv7-unknown-linux-gnueabihf' + run: cargo install cross --locked - name: Build binary (armv7) if: matrix.target == 'armv7-unknown-linux-gnueabihf' - uses: actions-rs/cargo@v1 - with: - command: build - args: -p swap --target ${{ matrix.target }} - use-cross: true + run: cross build -p swap --target ${{ matrix.target }} - name: Upload swap binary uses: actions/upload-artifact@v3