Skip to content

Commit

Permalink
move sanitize to tests workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Jul 31, 2024
1 parent cd6a667 commit f916e1c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 50 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/sanitize.yml

This file was deleted.

42 changes: 40 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_dispatch:

jobs:
tests:
test:
defaults:
run:
shell: bash
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f916e1c

Please sign in to comment.