Skip to content
10 changes: 10 additions & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ RUN cargo clippy -- -D warnings
RUN cargo build -r

RUN cargo test

# Install rustup and nightly toolchain for ASAN tests
RUN curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly && \
source "${HOME}"/.cargo/env && \
rustup component add rust-src --toolchain nightly

# Run ASAN tests
RUN source "${HOME}"/.cargo/env && \
TARGET=$(rustc --version --verbose | grep host | cut -d" " -f2) && \
RUSTFLAGS="-Z sanitizer=address" cargo +nightly test -Z build-std --target "$TARGET"
Loading