-
Notifications
You must be signed in to change notification settings - Fork 18
262 lines (224 loc) · 8.99 KB
/
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
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
name: tests
on:
# branches together with paths-ignore work like 'or', not like 'and'
# no idea how to fix it
push:
branches:
- master
- development
paths-ignore:
- '*.rst'
- 'AUTHORS'
- 'COPYING'
- 'doc/**'
pull_request:
branches:
- master
- development
paths-ignore:
- '*.rst'
- 'AUTHORS'
- 'COPYING'
- 'doc/**'
jobs:
no-meta:
strategy:
matrix:
OS: [macos-10.15, ubuntu-20.04]
CXXCOMPILER: [g++, clang++]
runs-on: ${{ matrix.OS }}
if: false
steps:
- name: Homebrew
if: runner.os == 'macOS'
run: |
brew update
brew upgrade
brew reinstall gcc
brew install gsl
- name: Checkout
uses: actions/checkout@v2
- name: Install conan
run: |
pip3 install --user conan
export PATH=$(python3 -c 'import site; print(site.USER_BASE + "/bin")'):$PATH
conan profile new default --detect
- name: Setup conan
run: |
export PATH=$(python3 -c 'import site; print(site.USER_BASE + "/bin")'):$PATH
conan profile update settings.compiler.libcxx=libstdc++11 default
env:
CXX: ${{ matrix.CXXCOMPILER }}
if: ${{ runner.os == 'Linux' }}
- name: Install dependencies
run: |
export PATH=$(python3 -c 'import site; print(site.USER_BASE + "/bin")'):$PATH
conan remote add conan-hep https://api.bintray.com/conan/expander/conan-hep --force
conan install . --build=missing
- name: Configure
env:
CXXCOMPILER: ${{ matrix.CXXCOMPILER }}
run: |
./configure \
--with-cxxflags="-std=c++14 -fPIC" \
--with-cxx=$CXXCOMPILER \
--with-optional-modules=test \
--with-loop-libraries=collier,looptools \
--with-install-dir=install \
--disable-meta
make showbuild
- name: Make
run: make -j2
- name: Build compiled tests
run: make -j2 alltest
- name: Run compiled and shell script (Softsusy)
# Makefile doesn't know about FLEXIBLESUSY_LOOP_LIBRARY flag so tests are not
# re-run on FLEXIBLESUSY_LOOP_LIBRARY change. Every run must clean logs after itself.
run: |
FLEXIBLESUSY_LOOP_LIBRARY=0 make -j2 execute-compiled-tests execute-shell-tests
make clean-test-log
- name: Run compiled and shell script (Collier)
run: |
FLEXIBLESUSY_LOOP_LIBRARY=1 make -j2 execute-compiled-tests execute-shell-tests
make clean-test-log
- name: Run compiled and shell script (LoopTools)
run: |
FLEXIBLESUSY_LOOP_LIBRARY=2 make -j2 execute-compiled-tests execute-shell-tests
make clean-test-log
- name: Run compiled and shell script (fflite)
run: |
FLEXIBLESUSY_LOOP_LIBRARY=3 make -j2 execute-compiled-tests execute-shell-tests
make clean-test-log
- name: Install
run: make install-src
with-meta:
# Pull requests don't share secrets with a fork so we run tests only on PRs
# comming from the FlexibleSUSY/FlexibleSUSY repo.
# For non PR triggers we check for the name of the repo so that if someone
# forks FS github doesn't try to run tests on their code.
if: (!github.event.pull_request && github.repository == 'FlexibleSUSY/FlexibleSUSY') || github.event.pull_request.head.repo.url == 'https://api.github.com/repos/FlexibleSUSY/FlexibleSUSY'
runs-on: ubuntu-20.04
container:
image: navir/opensuseleap-for-flexiblesusy:0.6.1
strategy:
matrix:
CXXCOMPILER: [g++, clang++]
PART: [1, 2]
env:
FORMCALC_VERSION: '9.9'
MODELS: 'MSSM CMSSM CMSSMCKM MSSMCPV MSSMNoFV NUHMSSMNoFVHimalaya ScalarLeptoquarks LRLR E6SSM SM THDMII MRSSM2 MRSSM2CKM'
steps:
# action checks-out our repository directly under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
- name: Activate Wolfram Engine
env:
MY_MATH_PASS: ${{ secrets.MY_MATH_PASS }}
MY_MAIL_ADDRESS: ${{ secrets.MY_MAIL_ADDRESS }}
run: |
wolframscript << EOF
$MY_MAIL_ADDRESS
$MY_MATH_PASS
EOF
printf "Checking if wolframscript command is workings... "; if [ $(wolframscript -code 1+2) -eq 3 ]; then echo OK; else echo fail && exit 1; fi
printf "Checking if math command is workings... "; if [[ $(math -run "Print[7 673, $SystemID]; Exit[]" < /dev/null) =~ 4711([^$"\r\n"]*) ]]; then echo OK; else echo fail && exit 1; fi
- name: Install FormCalc
run: |
cd /
wget -q -O - http://www.feynarts.de/formcalc/FormCalc-$FORMCALC_VERSION.tar.gz | tar xzf -
cd FormCalc-$FORMCALC_VERSION
./compile
echo 'AppendTo[$Path, "/FormCalc-$FORMCALC_VERSION"];' >> /root/.WolframEngine/Kernel/init.m
- name: Create models
env:
PART: ${{ matrix.PART }}
run: |
models=$(ruby -e "MODELS=ARGV.drop(1); puts MODELS.each_slice(MODELS.length/2).to_a[ARGV[0].to_i-1].join(' ')" -- $PART $MODELS)
for m in $models; do ./createmodel --name=$m; done
- name: Configure
env:
CXXCOMPILER: ${{ matrix.CXXCOMPILER }}
PART: ${{ matrix.PART }}
run: |
models=$(ruby -e "MODELS=ARGV.drop(1); puts MODELS.each_slice(MODELS.length/2).to_a[ARGV[0].to_i-1].join(',')" -- $PART $MODELS)
./configure \
--with-cxx=$CXXCOMPILER \
--with-models=$models \
--with-loop-libraries=collier,looptools \
--with-looptools-incdir=/LoopTools-$CXXCOMPILER/include \
--with-looptools-libdir=/LoopTools-$CXXCOMPILER/lib64 \
--with-collier-incdir=/COLLIER/include \
--with-collier-libdir=/COLLIER/lib \
--enable-himalaya \
--with-himalaya-incdir=/Himalaya-$CXXCOMPILER/include \
--with-himalaya-libdir=/Himalaya-$CXXCOMPILER/lib64 \
--enable-gm2calc \
--with-gm2calc-incdir=/GM2Calc-$CXXCOMPILER/include \
--with-gm2calc-libdir=/GM2Calc-$CXXCOMPILER/lib64 \
--with-tsil-incdir=/tsil-$CXXCOMPILER \
--with-tsil-libdir=/tsil-$CXXCOMPILER \
--with-optional-modules=test \
--enable-librarylink \
--with-cxxflags="-std=c++14 -O2 -fPIC -Wall -Wpedantic -pipe"
make showbuild
- name: Make
run: make -j2
- name: Run Mathematica tests
run: make -j2 execute-meta-tests
- name: Build compiled tests
run: make -j2 alltest
# Having a single name entry and a bash loop over integers in the run tag would save a
# little writing but splitting it into multiple entries makes it easier to see on github which loop
# library has failed
- name: Run compiled and shell script (Softsusy)
# Makefile doesn't know about FLEXIBLESUSY_LOOP_LIBRARY flag so tests are not
# re-run on FLEXIBLESUSY_LOOP_LIBRARY change. Every run must clean logs after itself.
run: |
FLEXIBLESUSY_LOOP_LIBRARY=0 make -j2 execute-compiled-tests execute-shell-tests
make clean-test-log
- name: Run compiled and shell script (Collier)
run: |
FLEXIBLESUSY_LOOP_LIBRARY=1 make -j2 execute-compiled-tests execute-shell-tests
make clean-test-log
- name: Run compiled and shell script (LoopTools)
run: |
FLEXIBLESUSY_LOOP_LIBRARY=2 make -j2 execute-compiled-tests execute-shell-tests
make clean-test-log
- name: Run compiled and shell script (fflite)
run: |
FLEXIBLESUSY_LOOP_LIBRARY=3 make -j2 execute-compiled-tests execute-shell-tests
make clean-test-log
- name: Testing pack-SM-src
if: ${{ matrix.PART == 2 }}
env:
CXXCOMPILER: ${{ matrix.CXXCOMPILER }}
run: |
make pack-SM-src
rm -rf models/SM
tar -xf SM.tar.gz
./configure \
--with-cxx=$CXXCOMPILER \
--with-models=SM \
--with-loop-libraries=collier,looptools \
--with-looptools-incdir=/LoopTools-$CXXCOMPILER/include \
--with-looptools-libdir=/LoopTools-$CXXCOMPILER/lib64 \
--with-collier-incdir=/COLLIER/include \
--with-collier-libdir=/COLLIER/lib \
--disable-meta \
--with-optional-modules=test
make -j2
make -j2 execute-meta-tests
make -j2 alltest
for i in {0..3}
do
FLEXIBLESUSY_LOOP_LIBRARY=$i make -j2 execute-compiled-tests execute-shell-tests
make clean-test-log
done
- name: (Optional) Save logs in case of an error
uses: actions/upload-artifact@v2
if: failure()
with:
name: ${{matrix.CXXCOMPILER}}-${{matrix.LOOPLIBRARY}}_test-logs
path: |
config.*
test/test_*.log