Skip to content

Instantly share code, notes, and snippets.

@pro465
Created April 5, 2022 09:03
Show Gist options
  • Save pro465/a33a080d82d2ea28725a5956abb57871 to your computer and use it in GitHub Desktop.
Save pro465/a33a080d82d2ea28725a5956abb57871 to your computer and use it in GitHub Desktop.
cross testing Rust libs in Github Actions using @action-rs/cargo
# We could use `@actions-rs/cargo` Action ability to automatically install `cross` tool
# in order to compile our application for some unusual targets.
on: [push, pull_request]
name: Cross-test
jobs:
build:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
target:
- armv7-unknown-linux-gnueabihf
- powerpc64-unknown-linux-gnu
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --target=${{ matrix.target }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment