Skip to content

Commit

Permalink
[Debug] test simpler
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Feb 21, 2024
1 parent 002bdab commit 3015cd2
Showing 1 changed file with 19 additions and 34 deletions.
53 changes: 19 additions & 34 deletions .github/workflows/step_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@ 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 }}
strategy:
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
Expand All @@ -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/[email protected]
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/[email protected]
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}}

0 comments on commit 3015cd2

Please sign in to comment.