-
-
Notifications
You must be signed in to change notification settings - Fork 7
74 lines (65 loc) · 1.9 KB
/
check.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
74
name: Make Check
on:
pull_request:
types: [opened, synchronize]
paths-ignore:
- "**.md"
- "**.rst"
- LICENSE
push:
branches: [main]
paths-ignore:
- "**.md"
- "**.rst"
- LICENSE
jobs:
job:
name: ${{ matrix.os }}-make-check
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip check')"
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
compiler:
- gcc
- clang
unistr:
- On
- Off
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Dependencies (Linux)
run: sudo apt-get install -y valgrind libunistring-dev python3
if: "contains( matrix.os, 'ubuntu')"
- name: Install Dependencies (MacOS)
run: brew install libunistring python3
if: "contains( matrix.os, 'macos')"
- name: Create Build Environment
run: |
cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake (CLANG)
shell: bash
working-directory: ${{github.workspace}}/build
run: |
export CC=${{ matrix.compiler }}
cmake $GITHUB_WORKSPACE -DENABLE_CHECK=On -DENABLE_ADDRESS_SANITIZER=On -DENABLE_DEBUG=On -DENABLE_UNISTR=${{ matrix.unistr }}
if: "contains( matrix.compiler, 'clang')"
- name: Configure CMake (GCC)
shell: bash
working-directory: ${{github.workspace}}/build
run: |
export CC=${{ matrix.compiler }}
cmake $GITHUB_WORKSPACE -DENABLE_CHECK=On -DENABLE_VALGRIND=On -DENABLE_DEBUG=On -DENABLE_UNISTR=${{ matrix.unistr }}
if: "contains( matrix.compiler, 'gcc')"
- name: Build Check
shell: bash
working-directory: ${{github.workspace}}/build
run: |
make
sudo make install
ASAN_OPTIONS="detect_leaks=1" make check