-
Notifications
You must be signed in to change notification settings - Fork 103
68 lines (58 loc) · 2.04 KB
/
build.yml
File metadata and controls
68 lines (58 loc) · 2.04 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
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
name: build
on: [push, pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: read-all
jobs:
# macos:
# name: macos / clang
# runs-on: macos-10.15
# env:
# CC: clang
# steps:
# - uses: actions/checkout@v2
# - name: Prepare1
# run: brew install gcc glib google-perftools libomp
# - name: Prepare2
# run: bash scripts/setup.sh
# - name: Configure CMake
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
# - name: build
# run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# - name: Run
# continue-on-error: true
# run: make test
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Prepare
run: bash scripts/install_dependency.sh
- name: Configure CMake with LSan
run: |
cmake -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_C_FLAGS="-fsanitize=leak" \
-DCMAKE_CXX_FLAGS="-fsanitize=leak"
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test with LSan
working-directory: ${{github.workspace}}/build
run: |
export ASAN_OPTIONS="detect_leaks=1:halt_on_error=1:verbosity=1"
ctest -C ${{env.BUILD_TYPE}} --output-on-failure
selfhosted:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_GLCACHE=on -DENABLE_LRB=on
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -j