Skip to content

Bump nf-core/setup-nextflow from 1 to 2 #868

Bump nf-core/setup-nextflow from 1 to 2

Bump nf-core/setup-nextflow from 1 to 2 #868

Workflow file for this run

name: Coverage
on:
push:
branches:
- 'main'
pull_request:
types:
- unlabeled
workflow_dispatch:
concurrency:
group: coverage-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
env:
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin
defaults:
run:
shell: bash -Eeuxo pipefail {0}
jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-22.04
timeout-minutes: 120
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
strategy:
fail-fast: false
matrix:
include:
- name: "gcc13"
compiler: "gcc-13"
build: coverage
build_type: Coverage
cxx_flags: "-std=c++23"
steps:
# How many commits do we need to fetch to also fetch the branch point?
- name: Get fetch depth
id: fetch_depth
run: echo "depth=$(( ${{ github.event.pull_request.commits }} + 2 ))" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
with:
path: raptor
fetch-depth: ${{ steps.fetch_depth.outputs.depth }}
submodules: true
- name: Setup toolchain
uses: seqan/actions/setup-toolchain@main
with:
compiler: ${{ matrix.compiler }}
ccache_size: 525M
- name: Install CMake
uses: seqan/actions/setup-cmake@main
with:
cmake: 3.21.7
- name: Install gcovr
env:
CC: ${{ matrix.compiler }}
run: |
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100
pip install gcovr==6.0
- name: Configure tests
run: |
mkdir build
cd build
cmake ../raptor/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }} -Wno-interference-size" \
-DHIBF_NATIVE_BUILD=OFF
make -j2 gtest_main
- name: Build tests
run: |
ccache -z
cd build
make -k -j2
ccache -sv
- name: Run tests
run: |
cd build
ctest . -j2 --output-on-failure
- name: Generate coverage report
run: |
gcovr --gcov-executable ${{ github.workspace }}/raptor/.github/workflows/scripts/gcov.sh \
--root ${{ github.workspace }}/raptor/test/coverage \
${{ github.workspace }}/build \
--filter ${{ github.workspace }}/raptor/include \
--filter ${{ github.workspace }}/raptor/src \
--exclude-lines-by-pattern '^\s*$' \
--exclude-lines-by-pattern '^\s*};$' \
--exclude-lines-by-pattern '^.*GCOVR_EXCL_LINE.*$' \
--exclude-unreachable-branches \
--exclude-throw-branches \
--exclude-noncode-lines \
-j 2 \
--xml \
--output ${{ github.workspace }}/build/coverage_report.xml
- name: Submit coverage report
uses: codecov/codecov-action@v3
with:
files: ${{ github.workspace }}/build/coverage_report.xml
root_dir: ${{ github.workspace }}/raptor
fail_ci_if_error: false