-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (109 loc) · 3.55 KB
/
ci.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
jobs:
macos-clang-check:
strategy:
matrix:
build-type: [Debug, Release]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up CWhy
run: |
python3 -m pip install --break-system-packages --upgrade pip
python3 -m pip install --break-system-packages cwhy
- name: Configure CMake
run: >
cmake . -B build
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
-DCMAKE_C_COMPILER="$(python3 -m cwhy --wrapper --- clang)"
-DCMAKE_CXX_COMPILER="$(python3 -m cwhy --wrapper --- clang++)"
env:
CWHY_DISABLE: ON
- name: Build
run: cmake --build build --parallel
windows-msvc-check:
strategy:
matrix:
build-type: [Debug, Release]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ninja
run: choco install ninja
- name: Set up CWhy
run: |
python3 -m pip install --upgrade pip
python3 -m pip install cwhy
- uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: >
cmake . -B build -G Ninja
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
-DCMAKE_C_COMPILER="$(python3 -m cwhy --wrapper --- cl)"
-DCMAKE_CXX_COMPILER="$(python3 -m cwhy --wrapper --- cl)"
env:
CWHY_DISABLE: ON
- name: Build
run: cmake --build build --parallel
ubuntu-gcc-check:
strategy:
matrix:
build-type: [Debug, Release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download GCC
run: sudo apt install -y gcc-11 g++-11
- name: Set up CWhy
run: |
python3 -m pip install --upgrade pip
python3 -m pip install cwhy
- name: Configure CMake (GCC)
run: >
cmake . -B build
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
-DCMAKE_C_COMPILER="$(python3 -m cwhy --wrapper --- gcc-11)"
-DCMAKE_CXX_COMPILER="$(python3 -m cwhy --wrapper --- g++-11)"
env:
CWHY_DISABLE: ON
- name: Build
run: cmake --build build --parallel
ubuntu-clang-check:
strategy:
matrix:
build-type: [Debug, Release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download LLVM
run: |
sudo apt install -y lsb-release wget software-properties-common gnupg
curl -sSf https://apt.llvm.org/llvm.sh | sudo bash -s -- 17 all
- name: Set up CWhy
run: |
python3 -m pip install --upgrade pip
python3 -m pip install cwhy
- name: Configure CMake (Clang)
run: >
cmake . -B build
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_C_COMPILER="$(python3 -m cwhy --wrapper --- clang-17)"
-DCMAKE_CXX_COMPILER="$(python3 -m cwhy --wrapper --- clang++-17)"
env:
CWHY_DISABLE: ON
- name: Build
run: cmake --build build --parallel
- name: Check clang-format
if: ${{ matrix.build-type == 'Debug' }}
run: find src -name '*.cpp' -o -name '*.h' -o -name '*.hpp' | xargs clang-format-17 --dry-run --Werror
- name: Check clang-tidy
if: ${{ matrix.build-type == 'Debug' }}
run: find src -name '*.cpp' | xargs clang-tidy-17 -p build --warnings-as-errors='*'