Try on push #2
Workflow file for this run
This file contains 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: Sanitizers | |
on: | |
push: | |
paths: | |
- '**/sanitizer.yml' | |
workflow_dispatch: | |
jobs: | |
address: | |
runs-on: ubuntu-latest | |
container: | |
image: osgeo/gdal:ubuntu-full-3.6.0 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install build deps | |
shell: bash | |
run: | | |
apt-get update -y | |
apt-get install build-essential curl pkg-config libclang-dev -y | |
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y | |
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH | |
- name: Setup building | |
run: | | |
export CC="clang-9" | |
export CXX="clang++-9" | |
- name: Install Rust nightly | |
run: | | |
rustup toolchain install nightly --profile minimal --component rust-src | |
rustup override set nightly | |
- name: Get target triple | |
run: | | |
echo "TARGET=$(rustc -vV | awk '/^host: / { print $2 }')" >>${GITHUB_ENV} | |
- name: Run test with address sanitizer | |
env: | |
RUSTFLAGS: -Z sanitizer=address | |
RUSTDOCFLAGS: -Z sanitizer=address | |
# Note: because we don't build GDAL with sanitizers, we need to turn off | |
# leak detection, otherwise it'll report memory leak false positives | |
ASAN_OPTIONS: verbose=1:atexit=1:detect_stack_use_after_return=1:strict_string_checks=1:detect_leaks=0 | |
run: cargo test -Zbuild-std --all --target ${{ env.TARGET }} | |
# - name: Run tests with memory sanitizer | |
# env: | |
# RUSTFLAGS: -Z sanitizer=memory | |
# RUSTDOCFLAGS: -Z sanitizer=memory | |
# run: cargo test -Zbuild-std --target ${{ env.TARGET }} | |
- name: Run tests with careful | |
run: | | |
cargo install cargo-careful | |
cargo careful test --all -Zcareful-sanitizer |