feat: add auto_configure_system_set
#238
Workflow file for this run
This file contains hidden or 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: | |
| # Trigger the workflow on push and pull requests to the main branch | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: --deny warnings | |
| RUSTDOCFLAGS: --deny warnings | |
| jobs: | |
| # ---------- native targets ---------- | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| feature-set: [ default, inventory ] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Run tests | |
| run: | | |
| echo "Testing with features: ${{ matrix.feature-set }}" | |
| cargo test --workspace --no-default-features --features "${{ matrix.feature-set }}" | |
| doc-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Rust (stable) | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Compile Rust documentation | |
| run: cargo +stable doc --no-deps | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Rust with rustfmt | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| override: true | |
| - name: Run rustfmt | |
| run: cargo +stable fmt --all -- --check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Rust with clippy | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| override: true | |
| - name: Run clippy | |
| run: cargo +stable clippy --all-targets --all-features -- -D warnings | |
| # ---------- Browser WebAssembly target ---------- | |
| web-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| feature-set: [ default, inventory ] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Rust with wasm32 target | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| - name: Setup Node (for wasm-bindgen test runner) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install wasm-bindgen CLI (provides the test runner) | |
| run: cargo install wasm-bindgen-cli --locked | |
| - name: Run web (browser wasm) tests | |
| env: | |
| RUSTFLAGS: --deny warnings --cfg getrandom_backend="wasm_js" | |
| run: | | |
| echo "Test wasm32 (browser) with features: web,${{ matrix['feature-set'] }}" | |
| cargo test --workspace --target wasm32-unknown-unknown --no-default-features --features "_web,web,${{ matrix['feature-set'] }}" |