From 6e9f7a24c276adf32598c63486a273a73801f0d7 Mon Sep 17 00:00:00 2001 From: James Mayclin Date: Wed, 4 Dec 2024 02:01:50 +0000 Subject: [PATCH] fix: specify asan linking for doc tests Actually, the issue was that I wasn't linking asan for the doc tests. --- .github/workflows/ci_rust.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_rust.yml b/.github/workflows/ci_rust.yml index 6c07f4d8d86..81d48a0c226 100644 --- a/.github/workflows/ci_rust.yml +++ b/.github/workflows/ci_rust.yml @@ -226,18 +226,20 @@ jobs: - name: Install Rust toolchain id: toolchain run: | - rustup toolchain install nightly \ + rustup toolchain install ${{env.RUST_NIGHTLY_TOOLCHAIN }} \ --profile minimal \ --component rust-src \ --target x86_64-unknown-linux-gnu + rustup override set ${{ env.RUST_NIGHTLY_TOOLCHAIN }} - name: Generate run: ./${{env.ROOT_PATH}}/generate.sh --skip-tests - name: Run Unit Tests under ASAN run: | + RUSTDOCFLAGS=-Zsanitizer=address \ RUSTFLAGS=-Zsanitizer=address \ - cargo +nightly test \ + cargo test \ -Zbuild-std \ --manifest-path ${{ env.ROOT_PATH}}/Cargo.toml \ --target x86_64-unknown-linux-gnu