1226: ci: use cargo cross for binary builds r=delta1 a=delta1

related to #1218

see: https://github.com/comit-network/xmr-btc-swap/pull/1225#issuecomment-1327637918 

Co-authored-by: Byron Hambly <bhambly@blockstream.com>
This commit is contained in:
bors[bot] 2022-11-25 16:13:52 +00:00 committed by GitHub
commit ee06b2a0e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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