Skip to content

Commit

Permalink
matrix the test workflow (and debug)
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky authored Aug 16, 2023
1 parent f7d63f6 commit a734dcd
Showing 1 changed file with 37 additions and 19 deletions.
56 changes: 37 additions & 19 deletions .github/workflows/build-test-cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ concurrency:

jobs:
valgrind:
if: false
name: valgrind ubuntu
runs-on: ubuntu-20.04
steps:
Expand All @@ -26,42 +27,59 @@ jobs:
valgrind --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all ctest -j 6 --output-on-failure
asan:
name: ASAN ubuntu
name: ${{ matrix.mode.name }} ubuntu
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
mode:
- name: ASAN
matrix: asan
cmake: ASAN
- name: TSAN
matrix: tsan
cmake: TSAN
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: cmake, RunTests with address- and undefined sanitizer on Ubuntu
- name: list packages before
if: always()
run: |
apt list --installed
- name: ASAN prep
if: matrix.mode.matrix == 'asan'
run: |
sudo fallocate -l 16G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
swapon -s
mkdir build-asan
cd build-asan
cmake -DCMAKE_BUILD_TYPE=ASAN ../
- name: build
env:
TSAN_OPTIONS: memory_limit_mb=6000
run: |
mkdir build-san
cd build-san
cmake -DCMAKE_BUILD_TYPE=${{ matrix.mode.cmake }} ../
cmake --build . -- -j 6
swapon -s
./RunTests
tsan:
name: TSAN ubuntu
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: test
env:
TSAN_OPTIONS: memory_limit_mb=6000
run: |
cd build-san
./RunTests
- name: cmake, RunTests with thread sanitizer on Ubuntu
- name: list packages after
if: always()
run: |
mkdir build-tsan
cd build-tsan
cmake -DCMAKE_BUILD_TYPE=TSAN ../
cmake --build . -- -j 6
TSAN_OPTIONS="memory_limit_mb=6000" ./RunTests
apt list --installed
windows:
if: false
name: Windows Latest
runs-on: windows-latest
steps:
Expand Down

0 comments on commit a734dcd

Please sign in to comment.