-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.41 KB
/
test.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
---
name: Test
on:
pull_request:
paths:
- .github/workflows/test.yml
- .clang-format
- .clang-tidy
- .clangd
- CMakeLists.txt
- include/*.h
- src/*.c
- test/CMakeLists.txt
- test/*/CMakeLists.txt
push:
paths:
- .github/workflows/test.yml
- .clang-format
- .clang-tidy
- .clangd
- CMakeLists.txt
- include/*.h
- src/*.c
- test/CMakeLists.txt
- test/*/CMakeLists.txt
workflow_dispatch:
jobs:
test_linux:
name: linux
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt update && sudo apt install -y --no-install-{recommends,suggests} \
clang{,-{format,tidy}} cmake ninja-build libgc-dev libreadline-dev libasan5 libubsan1
- name: Build Ploy
env: { CC: clang, CC_LD: lld, CMAKE_GENERATOR: Ninja }
run: |
cmake -B build/ \
-DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo"\
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \
-DPLOY_USE_ASAN:BOOL=ON
ninja -C build/
- name: Test Ploy
run: ninja -C build/ test
- name: clang-format
run: ninja -C build/ clang-format
# TODO(jcmdln): Only in actions, clang-tidy warns about suppressed warnings
- name: clang-tidy
run: ninja -C build/ clang-tidy