CI #306
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule | |
- cron: '0 0 * * 0' # at midnight of each sunday | |
name: CI | |
jobs: | |
develop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt, clippy | |
- run: cargo fmt --all -- --check | |
- run: cargo clippy -- -D warnings | |
- run: cargo build --release --workspace --tests | |
rust-version-test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- stable | |
- 1.63.0 # MSRV | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- run: | | |
if [ "${{ matrix.toolchain }}" = "stable" ]; then | |
cargo test --release --workspace --exclude simd-benches | |
else | |
cargo build --release --workspace --exclude simd-benches | |
fi | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- i686-unknown-linux-gnu | |
- aarch64-unknown-linux-gnu | |
- armv7-unknown-linux-gnueabihf | |
- wasm32-unknown-unknown | |
- mips-unknown-linux-gnu | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{ matrix.target }} | |
- uses: taiki-e/install-action@v1 | |
with: | |
tool: cross | |
- run: | | |
if [ "${{ matrix.target }}" == "wasm32-unknown-unknown" ]; then | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | bash | |
fi | |
- run: | | |
python3 ./scripts/testgen.py --target "${{ matrix.target }}" | bash -ex | |
miri: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: miri | |
- run: | | |
cargo miri test --workspace --exclude simd-benches |