forked from gap-system/gap
-
Notifications
You must be signed in to change notification settings - Fork 0
213 lines (190 loc) · 7.79 KB
/
Copy pathCI.yml
File metadata and controls
213 lines (190 loc) · 7.79 KB
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
name: CI
# Trigger the workflow on push or pull request
on:
- push
- pull_request
jobs:
test:
name: ${{ matrix.test-suites }} - ${{ matrix.extra }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# base test: fast first test
os: [ubuntu-latest]
test-suites: ["testinstall"]
# add a few extra tests
include:
- os: ubuntu-latest
test-suites: "docomp teststandard"
- os: ubuntu-latest
test-suites: "docomp teststandard"
extra: "ABI=32 CONFIGFLAGS=\"\""
# FIXME: we used to run `teststandard` for HPC-GAP under Travis CI,
# but somehow when running on GitHub Actions, it takes almost 4
# hours (!) to complete instead of 25 minutes. So for now we just
# run testinstall.
- os: ubuntu-latest
test-suites: "docomp testinstall"
extra: "HPCGAP=yes ABI=64"
# compile packages and run GAP tests
# don't use --enable-debug to prevent the tests from taking too long
- os: ubuntu-latest
test-suites: "testpackages testinstall-loadall"
extra: "ABI=64"
packages: "
4ti2
libboost-dev
libcdd-dev
libcurl4-openssl-dev
libfplll-dev
libmpc-dev
libmpfi-dev
libmpfr-dev
libncurses5-dev
libzmq3-dev
pari-gp
singular
"
# compile packages and run GAP tests in 32 bit mode
# it seems profiling is having trouble collecting the coverage data
# here, so we use NO_COVERAGE=1
- os: ubuntu-latest
test-suites: "testpackages testinstall-loadall"
extra: "ABI=32 NO_COVERAGE=1"
packages: "
4ti2
libboost-dev
libcdd-dev
libcurl4-openssl-dev
libfplll-dev
libmpc-dev
libmpfi-dev
libmpfr-dev
libncurses5-dev
libzmq3-dev
pari-gp
singular
"
- os: macos-latest
test-suites: "docomp testinstall"
# test creating the manual
# TODO: make the resulting HTML and PDF files available as build
# artifacts so that one can read the latest documentation (or even
# preview doc changes for PRs). Use the `upload-artifact` action and
# make it conditional. Or perhaps move the `makemanuals` job into
# a separate workflow job?
- os: ubuntu-latest
test-suites: "makemanuals"
packages: "
texlive-latex-base
texlive-latex-recommended
texlive-latex-extra
texlive-extra-utils
texlive-fonts-recommended
texlive-fonts-extra
"
# run tests contained in the manual
- os: ubuntu-latest
test-suites: "testmanuals"
# run bugfix regression tests
# Also turn on '--enable-memory-checking' to make sure GAP compiles
# with the flag enabled. We do not actually test the memory
# checking, as this slows down GAP too much.
- os: ubuntu-latest
test-suites: "testbugfix"
extra: "CONFIGFLAGS=\"--enable-memory-checking\""
# out of tree builds -- these are mainly done to verify that the
# build system work in this scenario. Since we don't expect the test
# results to vary compared to the in-tree builds, we turn off
# coverage reporting by setting NO_COVERAGE=1; this has the extra
# benefit of also running the tests at least once with the
# ReproducibleBehaviour option turned off.
# The '--enable-valgrind' checks that GAP builds and runs correctly
# when compiled with valgrind support. We do not actually run any
# tests using valgrind, as it is too slow.
- os: ubuntu-latest
test-suites: "docomp testbuildsys testinstall"
extra: "NO_COVERAGE=1 ABI=64 BUILDDIR=out-of-tree
CONFIGFLAGS=\"--enable-valgrind\""
packages: "valgrind"
# same as above, but in 32 bit mode, also turn off debugging (see
# elsewhere in this file for an explanation).
- os: ubuntu-latest
test-suites: "docomp testbuildsys testinstall"
extra: "NO_COVERAGE=1 ABI=32 BUILDDIR=out-of-tree CONFIGFLAGS=\"\""
# test error reporting and compiling as well as libgap
- os: ubuntu-latest
test-suites: "testspecial test-compile testlibgap testkernel"
# test Julia integration
- os: ubuntu-latest
test-suites: "testinstall"
extra: "JULIA=yes CONFIGFLAGS=\"--enable-debug --disable-Werror\""
# TODO: add back big endian test (we had s390x on Travis)
# TODO: add back test with an older GCC, e.g. 4.7
# TODO: restore Slack notifications for failed CI branch builds
env:
CFLAGS: "--coverage -O2 -g"
CXXFLAGS: "--coverage -O2 -g"
LDFLAGS: "--coverage"
# default config flags: enable debug asserts
CONFIGFLAGS: "--enable-debug"
COVERALLS_PARALLEL: true
TEST_SUITES: ${{ matrix.test-suites }}
steps:
- uses: actions/checkout@v2
- name: "Set up Python 3.7"
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: "Install dependencies"
run: |
${{ matrix.extra }}
if [ "$RUNNER_OS" == "Linux" ]; then
packages=(${{ matrix.packages }})
if [[ $TEST_SUITES == *testbuildsys* ]] ; then
sudo apt-get remove libgmp-dev libreadline-dev zlib1g-dev
else
packages+=(libgmp-dev libreadline-dev zlib1g-dev)
fi
if [[ $ABI == 32 ]] ; then
sudo dpkg --add-architecture i386
for i in "${!packages[@]}"; do
packages[$i]="${packages[$i]}:i386"
done
packages+=(gcc-multilib g++-multilib)
fi
sudo apt-get update
sudo apt-get install "${packages[@]}"
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install gmp readline zlib
else
echo "$RUNNER_OS not supported"
exit 1
fi
python -m pip install gcovr
- name: "Compile GAP and download packages"
run: ${{ matrix.extra }} bash etc/ci-prepare.sh
- name: "Run tests"
run: ${{ matrix.extra }} bash etc/ci.sh
- name: "Gather coverage"
run: ${{ matrix.extra }} bash etc/ci-gather-coverage.sh
- name: "Upload coverage data to codecov"
run: ${{ matrix.extra }} bash etc/ci-run-codecov.sh
# - uses: codecov/codecov-action@v1
# TODO: fix coveralls integration
#- name: Coveralls Parallel
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.github_token }}
# flag-name: run-${{ matrix.test_number }}
# parallel: true
# finish:
# needs: test
# runs-on: ubuntu-latest
# steps:
# - name: Coveralls Finished
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.github_token }}
# parallel-finished: true