Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |