-
Notifications
You must be signed in to change notification settings - Fork 3
228 lines (228 loc) · 7.87 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
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
on: [push]
permissions:
contents: write
jobs:
analysis-headers:
runs-on: ubuntu-latest
container: ubuntu:20.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Generate Headers & Compare
run: |
./scripts/generate_streampu_header.sh streampu.hpp
diff streampu.hpp include/streampu.hpp
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: analysis-headers
path: streampu.hpp
analysis-clang-format:
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install clang-format
run: |
apt-get update
apt-get -y install clang-format
shell: bash
- name: Invoke clang-format on the source code & Compare
run: |
mkdir original_code
cp -r include original_code
cp -r src original_code
cp -r tests original_code
cp -r signal_tracer original_code
./scripts/apply_clang_format.sh
mkdir new_code
cp -r include new_code
cp -r src new_code
cp -r tests new_code
cp -r signal_tracer new_code
diff -r new_code original_code
shell: bash
build-linux-gcc-x64-avx2:
runs-on: ubuntu-latest
needs: [analysis-headers]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_gcc:v9.3.0
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: |
export CXX="g++"
export CFLAGS="-Wall -funroll-loops -m64 -mavx2 -mfma"
export LFLAGS="-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lrt -lpthread -Wl,--no-whole-archive"
export GIT_TAG="v0.0.0"
export CMAKE_OPT="-DSPU_TESTS=ON -DSPU_COMPILE_STATIC_LIB=ON -DSPU_COMPILE_SHARED_LIB=ON -DSPU_STACKTRACE=OFF -DSPU_OVERRIDE_VERSION=$GIT_TAG"
export NAME="build_linux_gcc_x64_avx2"
source ./ci/tools/threads.sh
./ci/build-linux-macos.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build-linux-gcc-x64-avx2
path: build_linux_gcc_x64_avx2
build-linux-gcc-coverage:
runs-on: ubuntu-latest
needs: [analysis-headers]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_gcc:v9.3.0
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: |
export CXX="g++"
export CFLAGS="-Wall -funroll-loops -msse4.2 --coverage"
export LFLAGS="--coverage"
export GIT_TAG="v0.0.0"
export CMAKE_OPT="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG=-O0 -DSPU_TESTS=ON -DSPU_COMPILE_STATIC_LIB=ON -DSPU_COMPILE_SHARED_LIB=ON -DSPU_OVERRIDE_VERSION=$GIT_TAG"
source ./ci/tools/threads.sh
./ci/build-linux-macos.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: build
build-linux-clang:
runs-on: ubuntu-latest
needs: [analysis-headers]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_clang:v10.0.0
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: |
export CXX="clang++"
export CFLAGS="-Wall -Wno-overloaded-virtual -funroll-loops"
export GIT_TAG="v0.0.0"
export CMAKE_OPT="-DSPU_TESTS=ON -DSPU_COMPILE_STATIC_LIB=ON -DSPU_COMPILE_SHARED_LIB=ON -DSPU_OVERRIDE_VERSION=$GIT_TAG"
export NAME="build_linux_clang"
source ./ci/tools/threads.sh
./ci/build-linux-macos.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build-linux-clang
path: build_linux_clang
test-coverage-regression:
runs-on: ubuntu-latest
needs: [build-linux-gcc-coverage]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_coverage
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: build
path: build/
- name: Run Tests & Collect Code Coverage
run: |
ls -lah ./build/
ls -lah ./build/bin/
chmod +x ./build/bin/*
./ci/test-coverage-regression.sh
shell: bash
- name: Generate Code Coverage Report Files
run: ./ci/coverage-linux.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: test-regression-code-coverage-report
path: |
code_coverage_report/
build/Testing
test-memcheck-regression:
runs-on: ubuntu-latest
needs: [analysis-headers]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_valgrind
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true
- name: Build & Memcheck
run: |
export CXX="g++"
export CFLAGS="-Wall -funroll-loops -m64 -mavx2 -mfma"
export GIT_TAG="v0.0.0"
export CMAKE_OPT="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DSPU_TESTS=ON -DSPU_COMPILE_STATIC_LIB=ON -DSPU_COMPILE_SHARED_LIB=ON -DSPU_LINK_HWLOC=ON -DSPU_OVERRIDE_VERSION=$GIT_TAG"
source ./ci/tools/threads.sh
./ci/build-linux-macos.sh
./ci/test-memcheck-regression.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: test-memcheck-regression
path: build/Testing
coverage:
runs-on: ubuntu-latest
needs: [test-coverage-regression]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: test-regression-code-coverage-report
path: test_regression_code_coverage_report/
- name: Produce the Coverage Report
uses: insightsengineering/coverage-action@v2
with:
# Path to the Cobertura XML report.
path: ./test_regression_code_coverage_report/code_coverage_report/streampu.xml
# Minimum total coverage, if you want to the
# workflow to enforce it as a standard.
# This has no effect if the `fail` arg is set to `false`.
threshold: 50.000
# Fail the workflow if the minimum code coverage
# reuqirements are not satisfied.
fail: true
# Publish the rendered output as a PR comment
publish: true
# Create a coverage diff report.
diff: true
# Branch to diff against.
# Compare the current coverage to the coverage
# determined on this branch.
diff-branch: master
# This is where the coverage reports for the
# `diff-branch` are stored.
# Branch is created if it doesn't already exist'.
diff-storage: _xml_coverage_reports
# A custom title that can be added to the code
# coverage summary in the PR comment.
coverage-summary-title: "Code Coverage Summary"
deploy:
if: contains( github.ref, 'develop')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force