Skip to content

Commit c65e7c9

Browse files
committed
[#957] Disable rust sanitizers
Signed-off-by: Ziad Mostafa <[email protected]>
1 parent 4ac6d58 commit c65e7c9

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

.github/workflows/build-test.yml

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ jobs:
684684
strategy:
685685
matrix:
686686
os: [ubuntu-latest, macos-latest]
687-
toolchain: [nightly] # Rust sanitizers require nightly
687+
toolchain: [stable] # Rust sanitizers require nightly
688688
sanitizer: ["address", "ub", "address;ub", "thread"]
689689
exclude:
690690
# Thread sanitizer is not well supported on macOS
@@ -725,36 +725,34 @@ jobs:
725725
internal/scripts/ci_prepare_ubuntu.sh
726726
uname -a
727727
728-
- name: Set Rust sanitizer flags
729-
run: |
730-
# Set default target based on OS
731-
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
732-
RUST_TARGET="x86_64-unknown-linux-gnu"
733-
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
734-
RUST_TARGET="x86_64-apple-darwin"
735-
fi
728+
# - name: Set Rust sanitizer flags
729+
# run: |
730+
# # Set default target based on OS
731+
# if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
732+
# RUST_TARGET="x86_64-unknown-linux-gnu"
733+
# elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
734+
# RUST_TARGET="x86_64-apple-darwin"
735+
# fi
736736

737-
# Set sanitizer-specific flags
738-
if [[ "${{ matrix.sanitizer }}" == "address" ]]; then
739-
echo "RUSTFLAGS=-Zsanitizer=address -Copt-level=1" >> $GITHUB_ENV
740-
elif [[ "${{ matrix.sanitizer }}" == "ub" ]]; then
741-
# Rust doesn't have a specific undefined behavior sanitizer, but we can enable debug assertions
742-
echo "RUSTFLAGS=-Cdebug-assertions=on -Coverflow-checks=on -Copt-level=1" >> $GITHUB_ENV
743-
elif [[ "${{ matrix.sanitizer }}" == "address;ub" ]]; then
744-
echo "RUSTFLAGS=-Zsanitizer=address -Cdebug-assertions=on -Coverflow-checks=on -Copt-level=1" >> $GITHUB_ENV
745-
elif [[ "${{ matrix.sanitizer }}" == "thread" ]]; then
746-
echo "RUSTFLAGS=-Zsanitizer=thread -Copt-level=1" >> $GITHUB_ENV
747-
fi
737+
# # Set sanitizer-specific flags
738+
# if [[ "${{ matrix.sanitizer }}" == "address" ]]; then
739+
# echo "RUSTFLAGS=-Zsanitizer=address -Copt-level=1" >> $GITHUB_ENV
740+
# elif [[ "${{ matrix.sanitizer }}" == "ub" ]]; then
741+
# # Rust doesn't have a specific undefined behavior sanitizer, but we can enable debug assertions
742+
# echo "RUSTFLAGS=-Cdebug-assertions=on -Coverflow-checks=on -Copt-level=1" >> $GITHUB_ENV
743+
# elif [[ "${{ matrix.sanitizer }}" == "address;ub" ]]; then
744+
# echo "RUSTFLAGS=-Zsanitizer=address -Cdebug-assertions=on -Coverflow-checks=on -Copt-level=1" >> $GITHUB_ENV
745+
# elif [[ "${{ matrix.sanitizer }}" == "thread" ]]; then
746+
# echo "RUSTFLAGS=-Zsanitizer=thread -Copt-level=1" >> $GITHUB_ENV
747+
# fi
748748

749-
echo "RUST_TARGET=$RUST_TARGET" >> $GITHUB_ENV
749+
# echo "RUST_TARGET=$RUST_TARGET" >> $GITHUB_ENV
750750

751751
- name: Run cargo build
752-
run: |
753-
rustup component add rust-src --toolchain ${{ matrix.toolchain }}
754-
cargo build -Zbuild-std --workspace --all-targets --target ${{ env.RUST_TARGET }}
752+
run: cargo build --workspace --all-targets
755753

756754
- name: Run cargo nextest
757-
run: cargo nextest run --workspace --all-targets --no-fail-fast --target ${{ env.RUST_TARGET }}
755+
run: cargo nextest run --workspace --all-targets --no-fail-fast
758756

759757
- name: Build iceoryx_hoofs
760758
run: internal/scripts/ci_build_and_install_iceoryx_hoofs.sh
@@ -768,7 +766,7 @@ jobs:
768766
-DSANITIZERS="${{ matrix.sanitizer }}" \
769767
-DCMAKE_INSTALL_PREFIX=target/ff/cc/install \
770768
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/target/ff/iceoryx/install" \
771-
-DRUST_BUILD_ARTIFACT_PATH="${{ github.workspace }}/target/${{ env.RUST_TARGET }}/debug"
769+
-DRUST_BUILD_ARTIFACT_PATH="${{ github.workspace }}/target/debug"
772770
cmake --build target/ff/cc/build
773771
cmake --install target/ff/cc/build
774772

0 commit comments

Comments
 (0)