@@ -2,21 +2,30 @@ name: test
22
33on :
44 workflow_call :
5+ inputs :
6+ mask-experimental :
7+ type : boolean
8+ default : true
9+ description : Always report experimental test as successful
510
611permissions :
712 contents : read
813
914jobs :
1015 tests :
11- name : Check on ${{ matrix.toolchain }} toolchain ${{ matrix.mpi }}
16+ name : >
17+ 🖥️ ${{ matrix.os || 'Fedora' }}
18+ ${{ !matrix.os && format('🛠️ {0} +', matrix.toolchain) || '' }}
19+ ${{ !matrix.mpi && format('🖧 {0} +', matrix.mpi) || '' }}
20+ ${{ matrix.experimental && '[🧪 Experimental]' || '' }}
1221 runs-on : ${{ matrix.os || 'ubuntu-latest' }}
1322 container : ${{ !matrix.os && 'ghcr.io/lecrisut/dev-env:main' || '' }}
1423 continue-on-error : ${{ matrix.experimental || false }}
1524 strategy :
1625 fail-fast : false
1726 matrix :
1827 toolchain : [ gcc, llvm, intel ]
19- mpi : ['' , openmpi, mpich, intel]
28+ mpi : [false , openmpi, mpich, intel]
2029 include :
2130 # flang is missing features in 16.0.6
2231 - toolchain : llvm
@@ -40,47 +49,23 @@ jobs:
4049
4150 # Set MPI flag on
4251 echo "WITH_MPI=ON" >> $GITHUB_ENV
43- if : ${{ matrix.mpi }}
52+ if : matrix.mpi
4453 - name : Enable msvc toolchain on windows
4554 uses : ilammy/msvc-dev-cmd@v1
4655 if : contains(matrix.os, 'windows')
4756 - name : Activate Intel compilers
57+ # Not elegant, it will propagate all environment variable.
58+ # Intel does not provide a way to output the environment variables to a file
59+ # Note: PATH needs to be exported to GITHUB_PATH otherwise it can be overwritten
4860 run : |
49- source /etc/profile
50- printenv > orig_env
51- module load compiler
52- printenv > module_env
53- diff orig_env module_env | sed -n 's/> //p' >> $GITHUB_ENV
61+ source /opt/intel/oneapi/setvars.sh
62+ printenv >> $GITHUB_ENV
5463 echo $PATH >> $GITHUB_PATH
5564 if : matrix.toolchain == 'intel'
5665 - uses : actions/checkout@v3
5766 - uses : lukka/get-cmake@latest
58- - name : Run CMake configuration for ${{ matrix.toolchain }} toolchain
67+ - name : Run CMake workflow ${{ matrix.toolchain }}-ci
5968 uses : lukka/run-cmake@v10.3
6069 with :
6170 workflowPreset : " ${{ matrix.toolchain }}-ci"
62-
63- coverage :
64- name : Check test coverage
65- runs-on : ubuntu-latest
66- needs : [ tests ]
67- steps :
68- - uses : actions/checkout@v3
69- - uses : lukka/get-cmake@latest
70- - name : Get test coverage
71- uses : lukka/run-cmake@v10.3
72- with :
73- workflowPreset : ci-coverage
74- - name : Get lcov data
75- uses : danielealbano/lcov-action@v3
76- with :
77- # Note lcov-action prepends and appends wild-cards *. Account for those
78- # https://github.com/danielealbano/lcov-action/issues/11
79- remove_patterns : /test/,/cmake-build*/
80- - name : Upload coverage to Codecov
81- uses : codecov/codecov-action@v3
82- with :
83- name : ${{ matrix.coverage }} coverage
84- files : coverage.info
85- flags : ${{ matrix.coverage }}
86- verbose : true
71+ continue-on-error : ${{ matrix.experimental && inputs.mask-experimental}}
0 commit comments