50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Chaos Ci
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test-and-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 valgrind lcov
|
|
|
|
- name: Configure and build [Debug]
|
|
run: |
|
|
mkdir build-debug
|
|
cmake -S . -B build-debug/ -D CMAKE_BUILD_TYPE=Debug
|
|
cmake --build build-debug/
|
|
|
|
- name: Configure and build [Release]
|
|
run: |
|
|
mkdir build-release
|
|
cmake -S . -B build-release/ -D CMAKE_BUILD_TYPE=Release
|
|
cmake --build build-release/
|
|
|
|
- name: Run tests
|
|
run: valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all ./build-debug/ChaosTests/ChaosTests
|
|
|
|
- name: Run benchmarks
|
|
run: ./build-release/ChaosBenches/ChaosBenches
|
|
|
|
- name: Process coverage data
|
|
run: |
|
|
lcov --ignore-errors inconsistent,mismatch -c -d build-debug/ -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
|