Skip to content

[MISC] Remove compression for HIBF #494

[MISC] Remove compression for HIBF

[MISC] Remove compression for HIBF #494

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:
CMAKE_VERSION: 3.18.4
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: "gcc12"
cxx: "g++-12"
cc: "gcc-12"
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@v3
with:
path: raptor
fetch-depth: ${{ steps.fetch_depth.outputs.depth }}
submodules: true
- name: Add package source
run: bash ./raptor/lib/seqan3/.github/workflows/scripts/configure_apt.sh
- name: Install CMake
run: bash ./raptor/lib/seqan3/.github/workflows/scripts/install_cmake.sh
- name: Install ccache
run: sudo apt-get install --yes ccache
- name: Install compiler ${{ matrix.cxx }}
run: sudo apt-get install --yes ${{ matrix.cxx }}
- name: Install gcovr
env:
CC: ${{ matrix.cc }}
run: |
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100
pip install gcovr==5.2
- name: Load ccache
uses: actions/cache@v3
with:
path: .ccache
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-
- name: Tool versions
run: |
env cmake --version
env ${{ matrix.cxx }} --version
- name: Configure tests
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
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" \
-DRAPTOR_NATIVE_BUILD=OFF
make -j2 gtest_build
- name: Build tests
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 12
CCACHE_MAXSIZE: 525M
CCACHE_IGNOREOPTIONS: "-fprofile-abs-path"
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/lib/seqan3/.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 \
-j 2 \
--xml \
--output ${{ github.workspace }}/build/coverage_report.xml
- name: Submit coverage report
id: submission1
uses: codecov/codecov-action@v3
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/build/coverage_report.xml
root_dir: ${{ github.workspace }}/raptor
fail_ci_if_error: true
# When running on a PR, the token is not available. Because of the token-less upload, GitHub API rate limits apply
# and the upload may fail.
- name: Wait before retrying submission
if: steps.submission1.outcome == 'failure'
run: sleep 15
- name: Retry submission
id: submission2
uses: codecov/codecov-action@v3
if: steps.submission1.outcome == 'failure'
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/build/coverage_report.xml
root_dir: ${{ github.workspace }}/raptor
fail_ci_if_error: true
- name: Wait before retrying submission
if: steps.submission2.outcome == 'failure'
run: sleep 15
- name: Retry submission
if: steps.submission2.outcome == 'failure'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/build/coverage_report.xml
root_dir: ${{ github.workspace }}/raptor