2021-07-26 07:44:18 +02:00
|
|
|
# This workflow will be executed when master is updated:
|
|
|
|
# it will run the configured tests and upload the results on vfc_ci_master.
|
|
|
|
|
|
|
|
name: "Verificarlo CI (master)"
|
|
|
|
|
|
|
|
on:
|
|
|
|
# Triggers the workflow when master is updated
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2022-11-16 22:43:26 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-07-26 07:44:18 +02:00
|
|
|
jobs:
|
|
|
|
run_verificarlo_tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: verificarlo/verificarlo
|
2022-11-16 22:43:26 +01:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2021-07-26 07:44:18 +02:00
|
|
|
|
|
|
|
steps:
|
2022-11-16 22:55:42 +01:00
|
|
|
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791
|
2021-07-26 07:44:18 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2021-07-26 08:12:48 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-07-26 08:26:15 +02:00
|
|
|
ln -s /usr/bin/python3 /usr/bin/python
|
2021-07-26 08:20:06 +02:00
|
|
|
apt update
|
2021-12-14 10:43:36 +01:00
|
|
|
apt -y install emacs pkg-config wget libhdf5-dev libblas-dev liblapack-dev
|
2021-07-26 08:12:48 +02:00
|
|
|
|
2021-10-14 21:40:14 +02:00
|
|
|
- name: Install trexio
|
|
|
|
run: |
|
2022-01-08 15:02:28 +01:00
|
|
|
export VERSION=2.1.0
|
2021-10-14 21:40:14 +02:00
|
|
|
wget https://github.com/TREX-CoE/trexio/releases/download/v${VERSION}/trexio-${VERSION}.tar.gz
|
|
|
|
tar -zxf trexio-${VERSION}.tar.gz
|
|
|
|
cd trexio-${VERSION}
|
2021-12-14 10:43:36 +01:00
|
|
|
./configure --prefix=/usr CC="gcc-7" FC="gfortran-7"
|
|
|
|
# modify LDFLAGS to include -lhdf5_hl because autoconf sometime fails to detect the HL component
|
|
|
|
make LDFLAGS="-L/usr/lib/x86_64-linux-gnu/hdf5/serial -lhdf5_hl"
|
|
|
|
make install
|
2021-10-14 21:40:14 +02:00
|
|
|
|
2021-07-26 07:44:18 +02:00
|
|
|
- name: Run tests
|
2022-09-23 12:02:14 +02:00
|
|
|
run: |
|
|
|
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
vfc_ci test -g -r
|
2021-07-26 07:44:18 +02:00
|
|
|
|
|
|
|
- name: Commit test results
|
|
|
|
run: |
|
|
|
|
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
|
|
|
|
|
|
|
git config --local user.email "action@github.com"
|
|
|
|
git config --local user.name "GitHub Action"
|
|
|
|
|
|
|
|
git checkout vfc_ci_master
|
|
|
|
mkdir -p vfcruns
|
|
|
|
mv *.vfcrun.h5 vfcruns
|
|
|
|
git add vfcruns/*
|
|
|
|
git commit -m "[auto] New test results for commit ${git_hash}"
|
|
|
|
git push
|
|
|
|
|
|
|
|
- name: Upload raw results as artifacts
|
2024-11-04 16:49:09 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-07-26 07:44:18 +02:00
|
|
|
with:
|
|
|
|
name: ${{github.sha}}.vfcraw
|
2021-07-26 08:12:48 +02:00
|
|
|
path: ./*.vfcraw.h5
|
2024-11-04 16:49:09 +01:00
|
|
|
|