-
-
Notifications
You must be signed in to change notification settings - Fork 2
315 lines (306 loc) · 8.79 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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
name: CI
on:
#schedule:
# - cron: '0 2 * * *' # run at 2 AM UTC
push:
branches:
- master
pull_request:
branches:
- master
jobs:
# disable visual studio build until the exported symbols problem is fixed once and for all
# visual-studio:
# timeout-minutes: 60
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# - name: Setup python
# uses: actions/setup-python@v1
# with:
# python-version: 3.8
# - uses: ilammy/msvc-dev-cmd@v1
# - uses: BSFishy/meson-build@v1.0.1
# with:
# action: test
# setup-options: -Dwith-fortran=false
macos:
timeout-minutes: 60
strategy:
matrix:
cc:
- clang
- gcc-10
buildsystem:
- autotools
- meson
include:
- cc: clang
cxx: clang++
- cc: gcc-10
cxx: g++-10
runs-on: macos-latest
steps:
- name: Install homebrew dependencies
run: |
set -ex
brew update
brew upgrade
brew install autoconf automake libtool gsl wget pkg-config gcc@10 doxygen git meson ninja
brew install tschoonj/tap/fgsl
set +ex
- uses: actions/checkout@v2
- name: Build and test with Autotools
if: matrix.buildsystem == 'autotools'
run: |
set -ex
autoreconf -fi
./configure --enable-fortran || (cat config.log && exit 1)
make
make distcheck
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
- name: Build and test with Meson
if: matrix.buildsystem == 'meson'
run: |
set -ex
mkdir build-tmp
cd build-tmp
meson --buildtype=debugoptimized -Dwith-fortran=true ..
ninja
ninja dist
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
LDFLAGS: -L/usr/local/opt/gcc/lib/gcc/10
msys2:
timeout-minutes: 60
strategy:
matrix:
cc:
- clang
- gcc
buildsystem:
- autotools
- meson
include:
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
exclude:
- cc: clang
buildsystem: autotools
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v1
with:
update: true
install: >
base-devel
git
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-gsl
mingw-w64-x86_64-libtool
mingw-w64-x86_64-meson
mingw-w64-x86_64-clang
mingw-w64-x86_64-lld
mingw-w64-x86_64-fgsl
mingw-w64-x86_64-pkg-config
automake
autoconf
make
patch
- uses: actions/checkout@v2
- name: Build and test with Autotools
if: matrix.buildsystem == 'autotools'
run: |
set -ex
autoreconf -fi
./configure --enable-fortran || (cat config.log && exit 1)
make
make distcheck
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
- name: Build and test with Meson
if: matrix.buildsystem == 'meson'
run: |
set -ex
mkdir build-tmp
cd build-tmp
meson --buildtype=debugoptimized -Dwith-fortran=true ..
ninja
ninja dist
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
linux:
timeout-minutes: 60
strategy:
matrix:
image:
- ubuntu:bionic
- ubuntu:focal
- debian:buster
- centos:7
- centos:8
- fedora:latest
cc:
- clang
- gcc
buildsystem:
- autotools
- meson
include:
- with_fortran_autotools: enable
with_fortran_meson: "true"
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
- os: centos:7
with_fortran_autotools: disable
with_fortran_meson: "false"
exclude:
# these builds are excluded as the git they ship is too old to perform a clone,
# necessary for meson dist to work
- image: ubuntu:bionic
buildsystem: meson
- image: centos:7
buildsystem: meson
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
steps:
- name: Install ubuntu dependencies
if: startsWith(matrix.image, 'ubuntu') || startsWith(matrix.image, 'debian')
run: |
set -ex
apt-get --yes --force-yes update
apt-get --yes --force-yes install autoconf automake libtool gfortran gcc clang python3-pip python3-wheel python3-setuptools libgsl-dev pkg-config git curl
pip3 install meson ninja
set +ex
env:
DEBIAN_FRONTEND: noninteractive
- name: Split image names
uses: jungwinter/split@v1
id: image_splitted
with:
msg: ${{ matrix.image }}
seperator: ':'
- name: Install FGSL on ubuntu/debian
if: startsWith(matrix.image, 'ubuntu') || startsWith(matrix.image, 'debian')
run: |
set -ex
curl http://xmi-apt.tomschoonjans.eu/xmi.packages.key | apt-key add -
echo "deb http://xmi-apt.tomschoonjans.eu/${{ steps.image_splitted.outputs._0 }} ${{ steps.image_splitted.outputs._1 }} stable" >> /etc/apt/sources.list
apt-get --yes --force-yes update
apt-get --yes --force-yes install libfgsl1-dev
set +ex
env:
DEBIAN_FRONTEND: noninteractive
- name: Activate CentOS 8 PowerTools and EPEL and XMI repos
if: matrix.image == 'centos:8'
run: |
set -ex
yum update -y
yum clean all -y
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum install -y http://xmi-yum.tomschoonjans.eu/xmi-repo-key-8.0-1.el8.noarch.rpm
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --set-enabled PowerTools
set +ex
- name: Activate CentOS 7 EPEL and XMI repos
if: matrix.image == 'centos:7'
run: |
set -ex
yum update -y
yum clean all -y
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y http://xmi-yum.tomschoonjans.eu/xmi-repo-key-7.0-1.el7.noarch.rpm
set +ex
- name: Activate Fedora XMI repos
if: startsWith(matrix.image, 'fedora')
run: |
set -ex
yum update -y
yum clean all -y
yum install -y http://xmi-yum.tomschoonjans.eu/xmi-repo-key-fedora.noarch.rpm
set +ex
- name: Install RHEL dependencies
if: startsWith(matrix.image, 'centos') || startsWith(matrix.image, 'fedora')
run: |
set -ex
yum clean all -y
yum install -y make autoconf automake libtool gcc-gfortran gcc clang libstdc++-devel gcc-c++ python3-pip gsl-devel pkgconfig git fgsl-devel xz
pip3 install meson ninja
set +ex
# checkout needs to happen later, as git needs to be installed to ensure a clone happens
- uses: actions/checkout@v2
- name: Primary build and test with Autotools
if: matrix.buildsystem == 'autotools'
run: |
set -ex
autoreconf -fi
./configure --${{ matrix.with_fortran_autotools }}-fortran || (cat config.log && exit 1)
make
make distcheck
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
- name: Secondary build with Meson
if: matrix.buildsystem == 'autotools'
run: |
set -ex
export PATH=${HOME}/.local/bin:${PATH}
TARBALL=$(ls *.tar.gz)
tar xfz $TARBALL
cd ${TARBALL%.tar.gz}
mkdir build-meson
cd build-meson
meson --buildtype=debugoptimized -Dwith-fortran=${{ matrix.with_fortran_meson }} ..
ninja
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
- name: Primary build and test with meson
if: matrix.buildsystem == 'meson'
run: |
set -ex
export PATH=${HOME}/.local/bin:${PATH}
mkdir build-tmp
cd build-tmp
meson --buildtype=debugoptimized -Dwith-fortran=${{ matrix.with_fortran_meson }} ..
ninja
ninja dist
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
- name: Secondary build with Autotools
if: matrix.buildsystem == 'meson'
run: |
set -ex
cd build-tmp/meson-dist/
TARBALL=$(ls *.tar.xz)
tar xfJ $TARBALL
cd ${TARBALL%.tar.xz}
autoreconf -fi
./configure --${{ matrix.with_fortran_autotools }}-fortran
make
set +ex
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}