chore: release v0.2.0 #90
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: Cargo Build & Test | |
| on: | |
| push: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, synchronize, reopened, assigned] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| rustfmt: | |
| name: Check Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - run: | | |
| rustup update nightly && rustup default nightly | |
| rustup component add rustfmt clippy | |
| - run: | | |
| cargo clippy --all-targets -- -D warnings | |
| RUSTFLAGS="--cfg loom" cargo clippy --all-targets -- -D warnings | |
| cargo fmt --all --check -- --config \ | |
| "format_code_in_doc_comments=true,wrap_comments=true" | |
| docs: | |
| name: Docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - run: rustup update nightly && rustup default nightly | |
| - run: cargo doc --all-features --no-deps | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: | |
| - stable | |
| - beta | |
| - nightly | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Prepare | |
| run: | | |
| rustup update ${{ matrix.toolchain }} | |
| rustup default ${{ matrix.toolchain }} | |
| cargo install cargo-all-features | |
| - run: cargo build --verbose | |
| - run: cargo test --verbose | |
| - name: All-features Test | |
| run: | | |
| cargo all-features test | |
| cargo all-features test --release | |
| - name: Sanitizers Test | |
| if: matrix.toolchain == 'nightly' | |
| run: | | |
| rustup component add rust-src | |
| for args in "" "-F compact-mono"; do | |
| for flags in "--cfg tsan -Z sanitizer=thread" "-Z sanitizer=leak" "-Z sanitizer=address"; do | |
| RUSTFLAGS="$flags" cargo test $args \ | |
| -Z build-std --target x86_64-unknown-linux-gnu --lib --tests | |
| done | |
| done | |
| - name: Miri Test | |
| if: matrix.toolchain == 'nightly' | |
| env: | |
| MIRIFLAGS: "-Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-tree-borrows" | |
| run: | | |
| rustup component add miri | |
| cargo miri test | |
| cargo miri test -F compact-mono | |
| - name: No-std Build Test | |
| if: matrix.toolchain == 'stable' | |
| run: | | |
| cargo install cross | |
| RUSTFLAGS="--cfg portable_atomic_unsafe_assume_single_core" \ | |
| cross build -F portable-atomic --target thumbv6m-none-eabi | |
| - name: Loom Test | |
| if: matrix.toolchain == 'stable' | |
| env: | |
| RUSTFLAGS: "--cfg loom" | |
| run: | | |
| cargo test --lib --tests --release | |
| cargo test -F compact-mono --lib --tests --release | |
| test-on-multi-platforms: | |
| name: Test on Multiple Platforms | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| - os: windows-latest | |
| target: x86_64-pc-windows-gnu | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Prepare | |
| run: | | |
| rustup update stable | |
| rustup default stable | |
| cargo install cargo-all-features | |
| - name: All-features Test | |
| run: | | |
| cargo all-features test --target ${{ matrix.target }} | |
| cargo all-features test --target ${{ matrix.target }} --release | |
| dependabot: | |
| name: Dependabot Auto-merge | |
| if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} | |
| needs: [build-and-test, rustfmt, docs] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| actions: write | |
| steps: | |
| - id: metadata | |
| uses: dependabot/fetch-metadata@v2 | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| - run: | | |
| gh pr review --approve "$PR_URL" | |
| gh pr merge --squash --auto "$PR_URL" | |
| env: | |
| PR_URL: ${{github.event.pull_request.html_url}} | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |