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: Swatinem/rust-cache@v2.2.0
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: with:
toolchain: stable targets: armv7-unknown-linux-gnueabihf
profile: minimal
target: armv7-unknown-linux-gnueabihf
override: true
- name: Build ${{ matrix.target }} ${{ matrix.bin }} release binary - name: Build ${{ matrix.target }} ${{ matrix.bin }} release binary
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1

View File

@ -75,27 +75,21 @@ jobs:
- uses: Swatinem/rust-cache@v2.2.0 - uses: Swatinem/rust-cache@v2.2.0
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: with:
toolchain: stable targets: armv7-unknown-linux-gnueabihf
profile: minimal
target: armv7-unknown-linux-gnueabihf
override: true
- name: Build binary - name: Build binary
if: matrix.target != 'armv7-unknown-linux-gnueabihf' if: matrix.target != 'armv7-unknown-linux-gnueabihf'
uses: actions-rs/cargo@v1 run: cargo build -p swap --target ${{ matrix.target }}
with:
command: build - name: Install cross (armv7)
args: -p swap --target ${{ matrix.target }} if: matrix.target == 'armv7-unknown-linux-gnueabihf'
run: cargo install cross --locked
- name: Build binary (armv7) - name: Build binary (armv7)
if: matrix.target == 'armv7-unknown-linux-gnueabihf' if: matrix.target == 'armv7-unknown-linux-gnueabihf'
uses: actions-rs/cargo@v1 run: cross build -p swap --target ${{ matrix.target }}
with:
command: build
args: -p swap --target ${{ matrix.target }}
use-cross: true
- name: Upload swap binary - name: Upload swap binary
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3