Trim down CI and add cross tests for i686-linux and aarch64-linux #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cross | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: "17 3 * * *" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
cross-build-arm-default: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: ["1.38.0", stable, beta, nightly] | |
features: ["--features std", ""] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
targets: arm-unknown-linux-gnueabi, aarch64-unknown-linux-gnu | |
- name: Build | |
run: | | |
for target in arm-unknown-linux-gnueabi aarch64-unknown-linux-gnu | |
do | |
cargo build --no-default-features --target $target --verbose | |
cargo build --no-default-features --target $target --verbose | |
done | |
cross-build-i686: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: [1.38.0, stable, nightly] | |
rustflags: | |
[ | |
"-D warnings", | |
"-D warnings -C target-feature=+avx2", | |
"-D warnings -C target-feature=+sse4.2", | |
] | |
env: | |
RUSTFLAGS: ${{ matrix.rustflags }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
targets: i686-unknown-linux-gnu | |
- name: Run tests | |
run: | | |
cargo build --no-default-features --target i686-unknown-linux-gnu --verbose | |
cargo build --no-default-features --target i686-unknown-linux-gnu --verbose --features std | |
cargo build --no-default-features --target i686-unknown-linux-gnu --verbose --features public_imp | |
cargo build --no-default-features --target i686-unknown-linux-gnu --verbose --features std,public_imp | |
- name: Run nightly tests | |
run: | | |
cargo build --no-default-features --target i686-unknown-linux-gnu --verbose --all-features | |
if: ${{ matrix.toolchain == 'nightly' }} |