-
Notifications
You must be signed in to change notification settings - Fork 5
233 lines (206 loc) · 7.33 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
229
230
231
232
233
name: Linux CI
on:
push:
branches:
# Push events to branches matching refs/heads/master
- 'main'
# Push events to branches matching refs/heads/release*
- 'release*'
# Trigger after PR was unlabeled
pull_request:
# Enables a manual trigger, may run on any branch
workflow_dispatch:
concurrency:
group: linux-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
TZ: Europe/Berlin
defaults:
run:
shell: bash -ex {0}
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os == '' && 'ubuntu-22.04' || matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- name: "Unit clang16 + clang-tidy"
cxx: "clang++-16"
cc: "clang-16"
pkg: "clang-16 clang-tidy-16 g++-12"
build: clang_tidy
build_type: Debug
- name: "Unit gcc10 Debug"
cxx: "g++-10"
cc: "gcc-10"
pkg: "gcc-10 g++-10"
build: unit
build_type: Debug
- name: "Unit gcc11 Release"
cxx: "g++-11"
cc: "gcc-11"
pkg: "gcc-11 g++-11"
build: unit
build_type: Release
- name: "Unit gcc12 ASAN+UBSAN"
cxx: "g++-12"
cc: "gcc-12"
pkg: "gcc-12 g++-12"
build: unit
build_type: Debug
cxx_flags: "-fsanitize=address,undefined"
- name: "Unit gcc13 Debug"
cxx: "g++-13"
cc: "gcc-13"
pkg: "gcc-13 g++-13"
build: unit
build_type: Debug
- name: "Integration gcc12"
cxx: "g++-12"
cc: "gcc-12"
pkg: "gcc-12 g++-12"
build: integration
build_type: Debug
- name: "Documentation"
pkg: "doxygen"
build: documentation
build_type: Debug
version: 1.9.6
- name: "Clang Format"
pkg: "clang-format-16"
build: clang_format
build_type: Debug
- name: "Coverage gcc12"
cxx: "g++-12"
cc: "gcc-12"
pkg: "gcc-12 g++-12"
build: coverage
build_type: Debug
- name: "Snippet gcc10"
cxx: "g++-10"
cc: "gcc-10"
pkg: "gcc-10 g++-10"
build: snippet
build_type: Debug
- name: "Snippet gcc12"
cxx: "g++-12"
cc: "gcc-12"
pkg: "gcc-12 g++-12"
build: snippet
build_type: Release
- name: "Snippet Clang-16"
cxx: "clang++-16"
cc: "clang-16"
pkg: "clang-16 g++-12"
build: snippet
build_type: Release
- name: "Performance gcc12"
cxx: "g++-12"
cc: "gcc-12"
pkg: "gcc-12 g++-12"
build: performance
build_type: Release
- name: "Header gcc12"
cxx: "g++-12"
cc: "gcc-12"
pkg: "gcc-12 g++-12"
build: header
build_type: Release
steps:
- name: Checkout BioC++
uses: actions/checkout@v2
with:
path: biocpp-core
fetch-depth: 2
submodules: true
#- name: Checkout SeqAn2
#uses: actions/checkout@v2
#with:
#repository: seqan/seqan
#ref: develop
#path: biocpp-core/submodules/seqan
#fetch-depth: 2
- name: Configure APT (llvm)
continue-on-error: true
if: contains(matrix.pkg, 'clang')
run: |
sudo apt-add-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
- name: Configure APT
continue-on-error: true
run: |
echo 'APT::Acquire::Retries "5";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/ppa
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/test
sudo apt-get update
- name: Install CMake
run: sudo apt-get install --yes cmake
- name: Install ccache
run: sudo apt-get install --yes ccache
- name: Install compiler/tool ${{ matrix.pkg }}
run: sudo apt-get install --yes ${{ matrix.pkg }}
- name: Install doxygen
if: matrix.build == 'documentation'
run: |
sudo apt-get install --yes texlive-font-utils ghostscript texlive-latex-extra graphviz
mkdir -p /tmp/doxygen-download
wget --retry-connrefused --waitretry=30 --read-timeout=30 --timeout=30 --tries=20 --no-clobber --quiet --directory-prefix=/tmp/doxygen-download/ https://github.com/doxygen/doxygen/releases/download/Release_$(echo ${{ matrix.version }} | sed -e 's/\./_/g')/doxygen-${{ matrix.version }}.linux.bin.tar.gz
tar -C /tmp/ -zxf /tmp/doxygen-download/doxygen-${{ matrix.version }}.linux.bin.tar.gz
echo "/tmp/doxygen-${{ matrix.version }}/bin" >> $GITHUB_PATH # Only available in subsequent steps!
- name: Install gcovr
if: matrix.build == 'coverage'
env:
CC: ${{ matrix.cc }}
run: |
sudo apt-get install --yes gcovr
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100
- name: Load ccache
if: matrix.build != 'documentation'
uses: actions/cache@v2
with:
path: .ccache
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-
- name: Tool versions
run: |
env cmake --version
env ${{ matrix.cxx }} --version
- name: Configure tests
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
run: |
mkdir biocpp-core-build
cd biocpp-core-build
cmake ../biocpp-core/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
- name: Build tests
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 12
CCACHE_MAXSIZE: ${{ matrix.build == 'coverage' && '525M' || '75M' }}
CCACHE_IGNOREOPTIONS: "-fprofile-abs-path"
run: |
ccache -z
cd biocpp-core-build
make -k -j2
ccache -sv
- name: Run tests
if: ${{ matrix.build != 'coverage' && matrix.build != 'clang_format' }}
run: |
cd biocpp-core-build
ctest . -j2 --output-on-failure
- name: Submit coverage build
if: matrix.build == 'coverage'
uses: codecov/codecov-action@v2
with:
files: ${{ github.workspace }}/biocpp-core-build/biocpp_coverage.xml
root_dir: ${{ github.workspace }}/biocpp-core