ci: migrate to dtolnay/rust-toolchain

This commit is contained in:
Byron Hambly 2022-12-27 19:27:59 +02:00
parent 656c8df676
commit 743cf4a4d5
No known key found for this signature in database
GPG Key ID: DE8F6EA20A661697
2 changed files with 10 additions and 19 deletions

View File

@ -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

View File

@ -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