From d48194877c2a12113a65529df1e4200d8e1751e4 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Wed, 21 Feb 2024 17:43:15 +0100 Subject: [PATCH] [Debug] test simpler Signed-off-by: Cristian Le --- .github/workflows/ci.yaml | 2 ++ .github/workflows/step_test.yaml | 55 ++++++++++++-------------------- 2 files changed, 22 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fff68e0d..3f4e3244 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,6 +26,8 @@ jobs: name: test needs: [ pre-commit ] uses: ./.github/workflows/step_test.yaml + with: + mask-experimental: ${{ github.event_name == 'push' }} tests-makefile: name: test Makefile diff --git a/.github/workflows/step_test.yaml b/.github/workflows/step_test.yaml index 9c661d2e..5f25c88d 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 @@ -24,7 +33,7 @@ jobs: steps: - name: Install missing packages run: dnf install -y bzip2 python-unversioned-command - - name: Load mpi module ${{ matrix.mpi }} + - name: Load mpi module ${{ matrix.mpi || '' }} run: | # Get interactive profile to be able to load modules source /etc/profile @@ -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}}