refactor: rework as fastant #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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
features: [ "atomic", "atomic,fallback-coarse" ] | |
rust: [ stable ] | |
env: | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Set up toolchains | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt, clippy | |
- name: Check format | |
run: cargo fmt --all -- --check | |
- name: Build | |
run: cargo build --workspace --all-targets --features ${{ matrix.features }} | |
- name: Clippy | |
run: cargo clippy --workspace --all-targets --features ${{ matrix.features }} -- -D warnings | |
- name: Run tests | |
run: cargo test --workspace --all-targets --features ${{ matrix.features }} -- --nocapture | |
- name: Run benches | |
run: cargo bench --workspace --all-targets --features ${{ matrix.features }} | |
build-wasm: | |
runs-on: ubuntu-latest | |
env: | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up toolchains | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- run: wasm-pack test --node |