Change to panic on capacity exceeded instead of silent fallback #68
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: [push, pull_request] | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| suites: | |
| # no features means default features | |
| - toolchain: stable | |
| - toolchain: nightly | |
| - toolchain: nightly | |
| features: "--all-features" | |
| targets: [x86_64-unknown-linux-gnu, x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none-softfloat] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.suites.toolchain }} | |
| components: rust-src, clippy, rustfmt | |
| targets: ${{ matrix.targets }} | |
| - name: Check rust version | |
| run: rustc --version --verbose | |
| - name: Check code format | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo +${{ matrix.suites.toolchain }} clippy --target ${{ matrix.targets }} ${{ matrix.suites.features }} -- -A clippy::new_without_default -Dwarnings | |
| - name: Build | |
| run: cargo +${{ matrix.suites.toolchain }} build --target ${{ matrix.targets }} ${{ matrix.suites.features }} | |
| - name: Unit test | |
| if: matrix.targets == 'x86_64-unknown-linux-gnu' && matrix.suites.toolchain == 'nightly' | |
| run: cargo +${{ matrix.suites.toolchain }} test --target ${{ matrix.targets }} ${{ matrix.suites.features }} -- --nocapture | |
| doc: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| permissions: | |
| contents: write | |
| env: | |
| default-branch: ${{ format('refs/heads/{0}', github.event.repository.default_branch) }} | |
| RUSTDOCFLAGS: -D rustdoc::broken_intra_doc_links -D missing-docs | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - name: Build docs | |
| continue-on-error: ${{ github.ref != env.default-branch && github.event_name != 'pull_request' }} | |
| run: | | |
| cargo doc --no-deps --all-features | |
| printf '<meta http-equiv="refresh" content="0;url=%s/index.html">' $(cargo tree | head -1 | cut -d' ' -f1) > target/doc/index.html | |
| - name: Deploy to Github Pages | |
| if: ${{ github.ref == env.default-branch }} | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| single-commit: true | |
| branch: gh-pages | |
| folder: target/doc |