Merge pull request #40 from Bluefinger/fill-method #148
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
RUSTFLAGS: -D warnings | |
RUST_BACKTRACE: 1 | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
rust: [nightly, beta, stable] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe. | |
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} | |
- name: Install wasm-pack | |
uses: taiki-e/install-action@wasm-pack | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: Run cargo check | |
run: cargo check --all --all-features --all-targets | |
if: startsWith(matrix.rust, 'nightly') | |
- name: Run cargo check (without dev-dependencies to catch missing feature flags) | |
if: startsWith(matrix.rust, 'nightly') | |
run: cargo check -Z features=dev_dep | |
- run: cargo test --all-features | |
- name: Test wasm | |
run: wasm-pack test --headless --chrome --firefox -- --features chacha,atomic,rand,std,fmt | |
if: startsWith(matrix.os, 'ubuntu') | |
miri: | |
name: "Miri" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Miri | |
run: | | |
rustup toolchain install nightly --component miri | |
rustup override set nightly | |
cargo miri setup | |
- name: Test with Miri | |
run: MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-strict-provenance" cargo miri test --all-features |