-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (29 loc) · 900 Bytes
/
build-sanitized.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
name: Build + Test (Sanitized)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
merge_group:
branches: [ "main" ]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get googletest
run: |
wget https://github.com/google/googletest/archive/refs/tags/release-1.12.1.zip
unzip release-1.12.1.zip
cd googletest-release-1.12.1
mkdir build
cd build
cmake ..
make
- name: Build main executable
run: make EXTRA_CPPFLAGS="-fsanitize=address -fsanitize=undefined"
- name: Build test executable
run: make test GTEST_HDR=googletest-release-1.12.1/googletest/include GTEST_LIB=googletest-release-1.12.1/build/lib EXTRA_CPPFLAGS="-fsanitize=address -fsanitize=undefined"
- name: Run test executable
run: ./test