diff --git a/.github/workflows/step_test.yaml b/.github/workflows/step_test.yaml index 9c661d2e..9f2241c1 100644 --- a/.github/workflows/step_test.yaml +++ b/.github/workflows/step_test.yaml @@ -2,13 +2,22 @@ name: test on: workflow_call: + inputs: + mask-experimental: + type: boolean + default: true + description: Always report experimental test as successful permissions: contents: read jobs: tests: - name: Check on ${{ matrix.toolchain }} toolchain ${{ matrix.mpi }} + name: > + ๐Ÿ–ฅ๏ธ ${{ matrix.os || 'Fedora' }} + ${{ !matrix.os && format('๐Ÿ› ๏ธ {0} +', matrix.toolchain) || '' }} + ${{ !matrix.mpi && format('๐Ÿ–ง {0} +', matrix.mpi) || '' }} + ${{ matrix.experimental && '[๐Ÿงช Experimental]' || '' }} runs-on: ${{ matrix.os || 'ubuntu-latest' }} container: ${{ !matrix.os && 'ghcr.io/lecrisut/dev-env:main' || '' }} continue-on-error: ${{ matrix.experimental || false }} @@ -16,7 +25,7 @@ jobs: fail-fast: false matrix: toolchain: [ gcc, llvm, intel ] - mpi: ['', openmpi, mpich, intel] + mpi: [false, openmpi, mpich, intel] include: # flang is missing features in 16.0.6 - toolchain: llvm @@ -40,47 +49,23 @@ jobs: # Set MPI flag on echo "WITH_MPI=ON" >> $GITHUB_ENV - if: ${{ matrix.mpi }} + if: matrix.mpi - name: Enable msvc toolchain on windows uses: ilammy/msvc-dev-cmd@v1 if: contains(matrix.os, 'windows') - name: Activate Intel compilers + # Not elegant, it will propagate all environment variable. + # Intel does not provide a way to output the environment variables to a file + # Note: PATH needs to be exported to GITHUB_PATH otherwise it can be overwritten run: | - source /etc/profile - printenv > orig_env - module load compiler - printenv > module_env - diff orig_env module_env | sed -n 's/> //p' >> $GITHUB_ENV + source /opt/intel/oneapi/setvars.sh + printenv >> $GITHUB_ENV echo $PATH >> $GITHUB_PATH if: matrix.toolchain == 'intel' - uses: actions/checkout@v3 - uses: lukka/get-cmake@latest - - name: Run CMake configuration for ${{ matrix.toolchain }} toolchain + - name: Run CMake workflow ${{ matrix.toolchain }}-ci uses: lukka/run-cmake@v10.3 with: workflowPreset: "${{ matrix.toolchain }}-ci" - - coverage: - name: Check test coverage - runs-on: ubuntu-latest - needs: [ tests ] - steps: - - uses: actions/checkout@v3 - - uses: lukka/get-cmake@latest - - name: Get test coverage - uses: lukka/run-cmake@v10.3 - with: - workflowPreset: ci-coverage - - name: Get lcov data - uses: danielealbano/lcov-action@v3 - with: - # Note lcov-action prepends and appends wild-cards *. Account for those - # https://github.com/danielealbano/lcov-action/issues/11 - remove_patterns: /test/,/cmake-build*/ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - name: ${{ matrix.coverage }} coverage - files: coverage.info - flags: ${{ matrix.coverage }} - verbose: true + continue-on-error: ${{ matrix.experimental && inputs.mask-experimental}}