Update CI-intel.yml #557
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: CI-Linux | |
on: [push] | |
jobs: | |
build: | |
env: | |
testfail: false | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
cl: [gui, nogui] | |
release: [debug, release] | |
include: | |
# Setup some GUI/NOGUI specific variables | |
- cl: gui | |
guiflag: yes | |
testsuffix: GUI | |
removeguitst: | |
fbrunner: xvfb-run -a | |
- cl: nogui | |
guiflag: no | |
testsuffix: | |
removeguitst: rm gui.tst | |
fbrunner: | |
- release: debug | |
testoption: -s | |
- release: release | |
testoption: | |
steps: | |
- name: Checkout crystals | |
uses: actions/checkout@v4 | |
# LINUX ONLY | |
- name: Install Ubuntu compiler and tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gfortran libopenblas-dev | |
# LINUX ONLY | |
- name: Install Ubuntu wxWidgets | |
if: matrix.cl == 'gui' | |
run: | | |
sudo apt-key adv --fetch-keys https://repos.codelite.org/CodeLite.asc | |
sudo apt-add-repository 'deb https://repos.codelite.org/wx3.1.4/ubuntu/ focal universe' | |
sudo apt-get update | |
sudo apt-get install -y libwxbase3.1-0-unofficial libwxbase3.1-dev libwxgtk3.1-0-unofficial libwxgtk3.1-dev wx3.1gtk2-headers wx-common libwxgtk-media3.1-0-unofficial libwxgtk-media3.1-dev libwxbase3.1-0-unofficial-dbg libwxgtk3.1-0-unofficial-dbg libwxgtk-media3.1-0-unofficial-dbg wx3.1-i18n | |
- name: Create build folder | |
run: mkdir ci | |
# Build LINUX | |
- name: Build CRYSTALS linux | |
working-directory: ci | |
run: | | |
cmake -DuseGUI=${{ matrix.guiflag }} -DuseOPENMP=no -DCMAKE_BUILD_TYPE=${{ matrix.release }} .. | |
make -j2 | |
# | |
- name: Test CRYSTALS linux | |
working-directory: test_suite | |
# Prevent interactive scripts from running | |
# Prevent gui test from running for this cl version | |
# Setup environment | |
# Compcode sets folder with reference test outputs | |
# Go | |
timeout-minutes: 10 | |
run: | | |
mkdir -p script | |
${{ matrix.removeguitst }} | |
export COMPCODE=LINUXGH${{ matrix.testsuffix }} | |
export CRYSDIR=./,../ci/ | |
echo CRYSDIR is $CRYSDIR | |
echo PATH is $PATH | |
mv LINUXGH${{ matrix.testsuffix }}.org safe.dir | |
rm -Rf *.org | |
mv safe.dir LINUXGH${{ matrix.testsuffix }}.org | |
echo "%SCRIPT NONE" > script/tipauto.scp | |
echo "%END SCRIPT" >> script/tipauto.scp | |
echo "%SCRIPT NONE" > script/guideauto.scp | |
echo "%END SCRIPT" >> script/guideauto.scp | |
perl ../editor/filepp.pl -ds -w -o diffin.tst -DTESTLINUX diffin.tss | |
perl ../editor/filepp.pl -ds -w -o diffin2.tst -DTESTLINUX diffin2.tss | |
perl ../editor/filepp.pl -ds -w -o diffin3.tst -DTESTLINUX diffin3.tss | |
perl ../editor/filepp.pl -ds -w -o shelx2cry.tst -DTESTLINUX shelx2cry.tss | |
${{ matrix.fbrunner }} perl testsuite.pl ${{ matrix.testoption }} | |
cd ../bits/shelx2cry | |
ln -s ../../ci/shelx2cry shelx2cry | |
cd regressions_tests | |
./run.sh | |
# | |
# If failures, set variable to trigger next two stages (one to tidy, one to upload) | |
- name: Tidy failed test outputs ubuntu | |
working-directory: test_suite | |
if: failure() | |
run: | | |
echo "testfail=true" >> $GITHUB_ENV | |
rm -f LINUXGH${{ matrix.testsuffix }}.org/* | |
cp *.out LINUXGH${{ matrix.testsuffix }}.org | |
rm -Rf Artifacts || echo | |
rm -Rf tmp || echo | |
rm -Rf logs || echo | |
rm -Rf data || echo | |
rm -Rf script || echo | |
rm -f * || echo | |
- name: Upload outputs if failures | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test-outputs-ubuntu-${{ matrix.cl }} | |
path: test_suite |