Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matrix the test workflow (and debug) #387

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 43 additions & 20 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,64 @@ jobs:
valgrind --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all ctest -j 6 --output-on-failure

asan:
name: ASAN ubuntu
runs-on: ubuntu-20.04
name: Ubuntu ${{ matrix.os.name }} ${{ matrix.mode.name }}
runs-on: ${{ matrix.os.runs-on }}
strategy:
fail-fast: false
matrix:
mode:
- name: ASAN
matrix: asan
cmake: ASAN
- name: TSAN
matrix: tsan
cmake: TSAN
os:
- name: 20.04
runs-on: ubuntu-20.04
- name: 22.04
runs-on: ubuntu-22.04
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