From f916e1c71cef8d633a940612a711c7bca4a3478e Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 30 Jul 2024 21:58:23 -0700 Subject: [PATCH] move sanitize to tests workflow --- .github/workflows/sanitize.yml | 48 ---------------------------------- .github/workflows/tests.yml | 42 +++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/sanitize.yml diff --git a/.github/workflows/sanitize.yml b/.github/workflows/sanitize.yml deleted file mode 100644 index 5f17b234..00000000 --- a/.github/workflows/sanitize.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Sanitize - -on: - push: - branches: - - main - - pull_request: - branches: - - main - workflow_dispatch: - -jobs: - sanitize: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y libhdf5-dev libboost-all-dev - git clone https://github.com/catchorg/Catch2.git - cd Catch2 - git checkout "v3.5.3" - cmake -Bbuild -H. -DBUILD_TESTING=OFF - sudo cmake --build build/ --target install - - - name: Configure - run: cmake --preset=ci-sanitize - - - name: Build - run: cmake --build build/sanitize -j 2 - - - name: Test - working-directory: build/sanitize - env: - ASAN_OPTIONS: "strict_string_checks=1:\ - detect_stack_use_after_return=1:\ - check_initialization_order=1:\ - strict_init_order=1:\ - detect_leaks=1:\ - halt_on_error=1" - UBSAN_OPTIONS: "print_stacktrace=1:\ - halt_on_error=1" - run: ctest --output-on-failure --no-tests=error -j 2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 14c55228..0c3ac824 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: jobs: - tests: + test: defaults: run: shell: bash @@ -65,8 +65,46 @@ jobs: path: | build/tests/data/*.nwb + sanitize: + needs: test + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libhdf5-dev libboost-all-dev + git clone https://github.com/catchorg/Catch2.git + cd Catch2 + git checkout "v3.5.3" + cmake -Bbuild -H. -DBUILD_TESTING=OFF + sudo cmake --build build/ --target install + + - name: Configure + run: cmake --preset=ci-sanitize + + - name: Build + run: cmake --build build/sanitize -j 2 + + - name: Test + working-directory: build/sanitize + env: + ASAN_OPTIONS: "strict_string_checks=1:\ + detect_stack_use_after_return=1:\ + check_initialization_order=1:\ + strict_init_order=1:\ + detect_leaks=1:\ + halt_on_error=1" + UBSAN_OPTIONS: "print_stacktrace=1:\ + halt_on_error=1" + run: ctest --output-on-failure --no-tests=error -j 2 + validate: - needs: tests + needs: [test, sanitize] defaults: run: shell: bash