forked from 1a1a11a/libCacheSim
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.91 KB
/
build.yml
File metadata and controls
59 lines (53 loc) · 1.91 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
name: build
on: [push, pull_request]
permissions:
contents: read
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
macos:
name: macos / clang
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Prepare
run: bash scripts/install_dependency.sh
- name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: ninja -C ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure --parallel
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare
run: bash scripts/install_dependency.sh
- name: Configure CMake with LSan
run: |
cmake -G Ninja -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_C_FLAGS="-fsanitize=leak" \
-DCMAKE_CXX_FLAGS="-fsanitize=leak"
- name: Build
run: ninja -C ${{github.workspace}}/build
- 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 --parallel
selfhosted:
if: github.repository == '1a1a11a/libCacheSim'
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_GLCACHE=on -DENABLE_LRB=on
- name: Build
run: ninja -C ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure --parallel