Skip to content

Commit

Permalink
gha: test cross-compilation to other arches
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksa Sarai <[email protected]>
  • Loading branch information
cyphar committed Oct 17, 2024
1 parent 9f3d8f2 commit 6436d16
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,37 @@ jobs:
toolchain: ${{ env.RUST_MSRV }}
- run: cargo check --workspace --all-features --all-targets

check-cross:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- armv7-unknown-linux-gnueabihf
- i686-unknown-linux-gnu
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- sparc64-unknown-linux-gnu
- s390x-unknown-linux-gnu
env:
CARGO_FLAGS: --target ${{ matrix.target }}
name: cargo check (${{ matrix.target }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
# TODO: Should we use MSRV for this?
targets: ${{ matrix.target }}
- run: cargo check $CARGO_FLAGS --workspace --all-features --all-targets
- run: make release
- run: file target/release/libpathrs.*

rustdoc:
name: cargo doc
runs-on: ubuntu-latest
Expand Down Expand Up @@ -132,6 +163,7 @@ jobs:
needs:
- check
- check-msrv
- check-cross
- rustdoc
- test
- examples
Expand All @@ -155,6 +187,7 @@ jobs:
needs:
- check
- check-msrv
- check-cross
- rustdoc
- test
- examples
Expand Down

0 comments on commit 6436d16

Please sign in to comment.