ci: use cargo cross for binary builds

related to #1218
pull/1226/head
Byron Hambly 2 years ago
parent e5e7de757e
commit 206040d9d6
No known key found for this signature in database
GPG Key ID: DE8F6EA20A661697

@ -52,15 +52,19 @@ jobs:
- uses: Swatinem/rust-cache@v2.2.0 - uses: Swatinem/rust-cache@v2.2.0
- name: Install compiler for armhf arch - uses: actions-rs/toolchain@v1
if: matrix.target == 'armv7-unknown-linux-gnueabihf' with:
run: | toolchain: stable
sudo apt-get update profile: minimal
sudo apt-get install gcc-arm-linux-gnueabihf 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
run: cargo build --target=${{ matrix.target }} --release --package swap --bin ${{ matrix.bin }} with:
command: build
args: --target=${{ matrix.target }} --release --package swap --bin ${{ matrix.bin }}
use-cross: true
- name: Smoke test the binary - name: Smoke test the binary
if: matrix.target != 'armv7-unknown-linux-gnueabihf' # armv7-unknown-linux-gnueabihf is only cross-compiled, no smoke test if: matrix.target != 'armv7-unknown-linux-gnueabihf' # armv7-unknown-linux-gnueabihf is only cross-compiled, no smoke test

Loading…
Cancel
Save