-
Notifications
You must be signed in to change notification settings - Fork 8
74 lines (65 loc) · 1.8 KB
/
tests.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# Copyright Soramitsu Co., 2021-2023
# Copyright Quadrivium Co., 2023
# All Rights Reserved
# SPDX-License-Identifier: Apache-2.0
#
name: Tests
on:
push:
branches: [ master ]
tags: [ '*' ]
pull_request:
env:
BUILD_DIR: build
CTEST_OUTPUT_ON_FAILURE: 1
GITHUB_HUNTER_USERNAME: ${{ secrets.HUNTER_USERNAME }}
GITHUB_HUNTER_TOKEN: ${{ secrets.HUNTER_TOKEN }}
CACHE_PATHS: |
~/Library/Caches/pip
~/.ccache
~/.hunter
jobs:
tests:
strategy:
fail-fast: false
matrix:
options:
- name: "Address Sanitizer"
sanitizer: ASAN
- name: "Leak Sanitizer"
sanitizer: LSAN
- name: "Thread Sanitizer"
sanitizer: TSAN
- name: "Undefined Behavior Sanitizer"
sanitizer: UBSAN
name: "${{ matrix.options.name }}"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
with:
submodules: true
clean: true
fetch-depth: 1
- name: install dependencies
run: |
set -e
sudo apt-get update || true
sudo apt-get install -y ninja-build
# sudo python3 -m pip install --upgrade pip
# sudo pip3 install cmake requests gitpython gcovr pyyaml
- name: cmake
env:
CC: gcc
CXX: g++
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # has to be included to access other secrets
GITHUB_HUNTER_USERNAME: ${{ secrets.GITHUB_HUNTER_USERNAME }}
GITHUB_HUNTER_TOKEN: ${{ secrets.GITHUB_HUNTER_TOKEN }}
run: cmake . -Bbuild -D${{ matrix.options.sanitizer }}=ON
- name: build
run: cmake --build build -- -j4
- name: test
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: cmake --build build --target test