-
Notifications
You must be signed in to change notification settings - Fork 208
228 lines (180 loc) · 5.75 KB
/
CI-Tests.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
name: CI-Tests
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
push:
branches:
- 'master'
jobs:
Code-Style:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: clang-format
run: sh/run_test_format.sh
Test-Setup:
name: Test-Setup
runs-on: ubuntu-latest
strategy:
matrix:
n-chunks: [5]
outputs:
n-chunks: ${{ matrix.n-chunks }}
chunks: ${{ steps.set-test-ids.outputs.chunks }}
steps:
- name: checkout
uses: actions/checkout@v4
- id: set-test-ids
uses: ./.github/actions/set-test-ids
with:
n-chunks: ${{ matrix.n-chunks }}
Ubuntu-CMake:
needs: Test-Setup
timeout-minutes: 150
name: Ubuntu-CMake-${{ matrix.domain }} (chunk ${{ matrix.chunk }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
domain: [32bit, 64bit, 64bit-noomp]
chunk: ${{ fromJSON(needs.Test-Setup.outputs.chunks) }}
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: install-lcov
if: ${{ matrix.domain == '32bit' }}
run: sudo apt-get update && sudo apt-get install lcov
- name: install-deps
run: sudo sh/setup/install_ubuntu_deps.sh
- name: cmake-test-32bit
if: ${{ matrix.domain == '32bit' }}
uses: ./.github/actions/cmake-test
with:
cmake-flags: -DSOUFFLE_CODE_COVERAGE=ON -DSOUFFLE_TEST_DEBUG_REPORT=ON
n-chunks: ${{ needs.Test-Setup.outputs.n-chunks }}
chunk: ${{ matrix.chunk }}
- name: cmake-test-64bit
if: ${{ matrix.domain == '64bit' }}
uses: ./.github/actions/cmake-test
with:
cmake-flags: -DSOUFFLE_DOMAIN_64BIT=ON
n-chunks: ${{ needs.Test-Setup.outputs.n-chunks }}
chunk: ${{ matrix.chunk }}
- name: cmake-test-64bit-noomp
if: ${{ matrix.domain == '64bit-noomp' }}
uses: ./.github/actions/cmake-test
with:
cmake-flags: -DSOUFFLE_DOMAIN_64BIT=ON -DSOUFFLE_USE_OPENMP=OFF
n-chunks: ${{ needs.Test-Setup.outputs.n-chunks }}
chunk: ${{ matrix.chunk }}
- name: create-coverage-report
if: ${{ matrix.domain == '32bit' }}
run: lcov --capture --directory build --output-file coverage.info
- name: remove-system-files-from-coverage-report
if: ${{ matrix.domain == '32bit' }}
run: lcov --remove coverage.info '/usr/*' --output-file coverage.info
- name: upload-coverage-artifact
if: ${{ matrix.domain == '32bit' }}
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.domain }}-${{ matrix.chunk }}
path: coverage.info
OSX-CMake:
needs: Test-Setup
timeout-minutes: 150
name: OSX-CMake (chunk ${{ matrix.chunk }})
strategy:
fail-fast: false
matrix:
chunk: ${{ fromJSON(needs.Test-Setup.outputs.chunks) }}
runs-on: macos-12
steps:
- name: Select XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
# Pending https://github.com/actions/runner-images/issues/6350
xcode-version: '13.4'
- name: checkout
uses: actions/checkout@v4
- name: install-deps
run: sh/setup/install_macos_deps.sh
- name: cmake-test-32bit
uses: ./.github/actions/cmake-test
with:
cmake-flags: ''
n-chunks: ${{ needs.Test-Setup.outputs.n-chunks }}
chunk: ${{ matrix.chunk }}
AppleM-CMake:
needs: Test-Setup
timeout-minutes: 150
name: AppleM-CMake (chunk ${{ matrix.chunk }})
strategy:
fail-fast: false
matrix:
chunk: ${{ fromJSON(needs.Test-Setup.outputs.chunks) }}
runs-on: macos-14
steps:
- name: Select XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.2'
- name: checkout
uses: actions/checkout@v4
- name: install-deps
run: sh/setup/install_macos_arm_deps.sh
- name: cmake-test-64bit
uses: ./.github/actions/cmake-test
with:
# disable openmp on ARM architecture, see souffle-lang/souffle#2476
cmake-flags: -DSOUFFLE_DOMAIN_64BIT=ON -DSOUFFLE_USE_OPENMP=OFF
n-chunks: ${{ needs.Test-Setup.outputs.n-chunks }}
chunk: ${{ matrix.chunk }}
Memory-Check:
needs: Test-Setup
timeout-minutes: 150
name: Memory-Check (chunk ${{ matrix.chunk }})
strategy:
fail-fast: false
matrix:
chunk: ${{ fromJSON(needs.Test-Setup.outputs.chunks) }}
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: install-deps
run: sudo sh/setup/install_ubuntu_deps.sh
- name: fix mmap_rnd_bits
# issue with ubuntu:latest runner and ASAN
# https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
- name: cmake-test-32bit
uses: ./.github/actions/cmake-test
with:
cmake-flags: -DSOUFFLE_SANITISE_MEMORY=ON -DSOUFFLE_TEST_EVALUATION=OFF
n-chunks: ${{ needs.Test-Setup.outputs.n-chunks }}
chunk: ${{ matrix.chunk }}
Code-Coverage:
needs: Ubuntu-CMake
timeout-minutes: 150
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install-lcov
run: sudo apt-get update && sudo apt-get install lcov
- name: download-coverage-artifacts
uses: actions/download-artifact@v4
- name: merge-coverage-report
run: lcov $(for i in coverage-*-*/coverage.info; do echo -a $i; done) --output-file coverage.info
- name: upload-coverage-report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.info