Skip to content

Commit

Permalink
ci: Add doc test
Browse files Browse the repository at this point in the history
- Simplify sanitizer ci settings
  • Loading branch information
inflation committed Dec 19, 2024
1 parent ad4542f commit 17834e3
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
with:
sweep-cache: true
- name: Tests
run: cargo nextest run --all-features --workspace
run: |
cargo nextest run --all-features --workspace
cargo test --doc --all-features --workspace
coverage:
name: Code Coverage
Expand Down Expand Up @@ -70,11 +72,7 @@ jobs:
name: Sanitizers
strategy:
matrix:
include:
- sanitizer: address
cfg: asan
- sanitizer: thread
cfg: tsan
sanitizer: [address, thread]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -90,12 +88,21 @@ jobs:
- uses: Leafwing-Studios/[email protected]
with:
sweep-cache: true
- name: Setup Sanitizer
id: setup
run: |
if [ ${{ matrix.sanitizer }} == "address" ]; then
echo "CFG=asan" >> "$GITHUB_OUTPUT"
elif [ ${{ matrix.sanitizer }} == "thread" ]; then
echo "CFG=tsan" >> "$GITHUB_OUTPUT"
fi
- name: Test with Sanitizer
run: cargo +nightly nextest run
-Z build-std --target=x86_64-unknown-linux-gnu --all-features
run: |
cargo +nightly nextest run -Z build-std --target=x86_64-unknown-linux-gnu --all-features
cargo +nightly test --doc -Z build-std --target=x86_64-unknown-linux-gnu --all-features
env:
RUSTFLAGS: "-Zsanitizer=${{matrix.sanitizer}} --cfg=${{matrix.cfg}}"
RUSTDOCFLAGS: "-Zsanitizer=${{matrix.sanitizer}} --cfg=${{matrix.cfg}}"
RUSTFLAGS: "-Zsanitizer=${{ matrix.sanitizer }} --cfg=${{ steps.setup.outputs.CFG }}"
RUSTDOCFLAGS: "-Zsanitizer=${{ matrix.sanitizer }} --cfg=${{ steps.setup.outputs.CFG }}"

msrv:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 17834e3

Please sign in to comment.