83 lines
2.3 KiB
YAML
83 lines
2.3 KiB
YAML
name: Chaos Ci
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential cmake valgrind lcov
|
|
|
|
- name: Build tests
|
|
run: |
|
|
mkdir build-debug
|
|
cmake -S . -B build-debug/ -D CMAKE_BUILD_TYPE=Debug
|
|
cmake --build build-debug/ -t ChaosTests
|
|
|
|
- name: Build tests with coverage
|
|
run: |
|
|
mkdir build-debug-coverage
|
|
cmake -S . -B build-debug-coverage/ -D CMAKE_BUILD_TYPE=Debug -D CHAOS_COVERAGE=ON
|
|
cmake --build build-debug-coverage/ -t ChaosTests
|
|
|
|
- name: Build tests with ASan and UBSan
|
|
run: |
|
|
mkdir build-debug-asanubsan
|
|
cmake -S . -B build-debug-asanubsan/ -D CMAKE_BUILD_TYPE=Debug -D CHAOS_ASANUBSAN=ON
|
|
cmake --build build-debug-asanubsan/ -t ChaosTests
|
|
|
|
- name: Run tests under valgrind
|
|
run: valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all ./build-debug/ChaosTests/ChaosTests
|
|
|
|
- name: Run tests under ASan and UBSan
|
|
run: ASAN_OPTIONS=verbosity=1 UBSAN_OPTIONS=verbosity=1 ./build-debug-asanubsan/ChaosTests/ChaosTests
|
|
|
|
- name: Run tests for coverage
|
|
run: ./build-debug-coverage/ChaosTests/ChaosTests
|
|
|
|
- name: Process coverage data
|
|
run: |
|
|
lcov --exclude '*/usr/*' --exclude '*/_deps/*' --exclude '*/ChaosTests/*' -c -d build-debug-coverage/ -o lcovout
|
|
genhtml lcovout -o coverage-report/
|
|
|
|
- name: Upload coverage report
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: CoverageReport
|
|
path: coverage-report/
|
|
if-no-files-found: error
|
|
include-hidden-files: true
|
|
retention-days: 10
|
|
|
|
benchmark:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential cmake
|
|
|
|
- name: Build benchmarks
|
|
run: |
|
|
mkdir build-release
|
|
cmake -S . -B build-release/ -D CMAKE_BUILD_TYPE=Release
|
|
cmake --build build-release/ -t ChaosBenches
|
|
|
|
- name: Run benchmarks
|
|
run: ./build-release/ChaosBenches/ChaosBenches
|