-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (37 loc) · 1.09 KB
/
ci.yml
File metadata and controls
38 lines (37 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
ci:
name: CI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Env
run: cmake -E make_directory target
- name: Configure
shell: bash
working-directory: target
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
shell: bash
working-directory: target
run: cmake --build . --config $BUILD_TYPE
- name: Test
shell: bash
working-directory: target
run: ctest -C $BUILD_TYPE --output-on-failure
- name: Memory Leak Test
if: matrix.os == 'ubuntu-latest'
shell: bash
working-directory: target
run: |
sudo apt update
sudo apt install -y valgrind --fix-missing
for testfile in ./bin/test_*; do echo "Testing ${testfile}" && valgrind --leak-check=full --show-leak-kinds=definite,indirect,possible --error-exitcode=1 "${testfile}"; done