Skip to content

Commit

Permalink
Skip doctests with sanitizer + debug build
Browse files Browse the repository at this point in the history
Part of #55.
  • Loading branch information
taiki-e committed Dec 18, 2022
1 parent 63d2e1e commit d69976d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ jobs:
persist-credentials: false
- name: Install Rust
run: rustup toolchain add nightly --no-self-update --component rust-src && rustup default nightly
- run: sudo apt-get -o Acquire::Retries=10 -qq update && sudo apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y moreutils
- run: |
echo "ASAN_OPTIONS=detect_stack_use_after_return=1" >>"${GITHUB_ENV}"
echo "RUSTFLAGS=${RUSTFLAGS} -Z sanitizer=address" >>"${GITHUB_ENV}"
Expand All @@ -309,33 +310,35 @@ jobs:
echo "RUSTFLAGS=${RUSTFLAGS} -Z sanitizer=thread" >>"${GITHUB_ENV}"
echo "RUSTDOCFLAGS=${RUSTDOCFLAGS} -Z sanitizer=thread" >>"${GITHUB_ENV}"
if: matrix.sanitizer == 'thread'
# debug build + doctests is slow
- run: |
cargo -Z build-std test -vv --workspace --exclude bench --all-features --target "$(rustc -Vv | grep host | sed 's/host: //')"
cargo -Z build-std test -vv --workspace --exclude bench --all-features --target "$(rustc -Vv | grep host | sed 's/host: //')" --tests 2>&1 | ts -i '%.s '
- run: |
cargo -Z build-std test -vv --workspace --exclude bench --all-features --release --target "$(rustc -Vv | grep host | sed 's/host: //')"
cargo -Z build-std test -vv --workspace --exclude bench --all-features --release --target "$(rustc -Vv | grep host | sed 's/host: //')" 2>&1 | ts -i '%.s '
if: matrix.sanitizer != 'memory' # https://github.com/google/sanitizers/issues/558
# LTO + doctests is very slow on some platforms
- run: |
cargo -Z build-std test -vv --workspace --exclude bench --all-features --release --target "$(rustc -Vv | grep host | sed 's/host: //')" --tests
cargo -Z build-std test -vv --workspace --exclude bench --all-features --release --target "$(rustc -Vv | grep host | sed 's/host: //')" --tests 2>&1 | ts -i '%.s '
env:
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1
CARGO_PROFILE_RELEASE_LTO: fat
if: matrix.sanitizer != 'memory' # https://github.com/google/sanitizers/issues/558
# +cmpxchg16b
# debug build + doctests is slow
- run: |
cargo -Z build-std test -vv --workspace --exclude bench --all-features --target "$(rustc -Vv | grep host | sed 's/host: //')"
cargo -Z build-std test -vv --workspace --exclude bench --all-features --target "$(rustc -Vv | grep host | sed 's/host: //')" --tests 2>&1 | ts -i '%.s '
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+cmpxchg16b
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+cmpxchg16b
- run: |
cargo -Z build-std test -vv --workspace --exclude bench --all-features --release --target "$(rustc -Vv | grep host | sed 's/host: //')"
cargo -Z build-std test -vv --workspace --exclude bench --all-features --release --target "$(rustc -Vv | grep host | sed 's/host: //')" 2>&1 | ts -i '%.s '
env:
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+cmpxchg16b
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+cmpxchg16b
if: matrix.sanitizer != 'memory' # https://github.com/google/sanitizers/issues/558
# LTO + doctests is very slow on some platforms
- run: |
cargo -Z build-std test -vv --workspace --exclude bench --all-features --release --target "$(rustc -Vv | grep host | sed 's/host: //')" --tests
cargo -Z build-std test -vv --workspace --exclude bench --all-features --release --target "$(rustc -Vv | grep host | sed 's/host: //')" --tests 2>&1 | ts -i '%.s '
env:
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1
CARGO_PROFILE_RELEASE_LTO: fat
Expand Down

0 comments on commit d69976d

Please sign in to comment.