-
Notifications
You must be signed in to change notification settings - Fork 7
36 lines (29 loc) · 863 Bytes
/
utests.yml
File metadata and controls
36 lines (29 loc) · 863 Bytes
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
name: Unit tests
on:
push:
branches: '*'
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Debug
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev
shell: bash
- name: Configure CMake
run: |
export CFLAGS="-fsanitize=address -static-libasan"
export CXXFLAGS="-fsanitize=address -static-libasan"
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBSCRATCHCPP_BUILD_UNIT_TESTS=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j$(nproc --all)
- name: Run unit tests
run: ctest --test-dir build -V