generated from seqan/library-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
111 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,90 +26,69 @@ defaults: | |
|
||
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' | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.compiler }} | ||
# if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' | ||
strategy: | ||
fail-fast: true | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- name: "gcc13" | ||
compiler: "gcc-13" | ||
build: coverage | ||
build_type: Coverage | ||
|
||
compiler: ["gcc-14"] | ||
container: | ||
image: ghcr.io/seqan/${{ matrix.compiler }} | ||
volumes: | ||
- /home/runner:/home/runner | ||
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: | ||
fetch-depth: ${{ steps.fetch_depth.outputs.depth }} | ||
submodules: false | ||
|
||
- name: Setup toolchain | ||
uses: seqan/actions/setup-toolchain@main | ||
with: | ||
compiler: ${{ matrix.compiler }} | ||
ccache_size: 525M | ||
fetch-depth: 0 | ||
|
||
- name: Install CMake | ||
uses: seqan/actions/setup-cmake@main | ||
- name: Load ccache | ||
uses: actions/cache@v4 | ||
with: | ||
cmake: 3.18.6 | ||
|
||
- name: Install gcovr | ||
run: | | ||
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100 | ||
pip install gcovr==6.0 | ||
path: /home/runner/.ccache | ||
save-always: true | ||
key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }} | ||
|
||
- name: Configure tests | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake ../test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | ||
-DHIBF_VERBOSE_TESTS=OFF | ||
make -j2 gtest_main | ||
cmake ../test/coverage -DCMAKE_BUILD_TYPE=Coverage | ||
make -j gtest_main | ||
- name: Build tests | ||
env: | ||
CCACHE_IGNOREOPTIONS: "-fprofile-abs-path" | ||
working-directory: build | ||
run: | | ||
ccache -z | ||
cd build | ||
make -k -j2 | ||
make -k -j | ||
ccache -sv | ||
- name: Run tests | ||
working-directory: build | ||
run: | | ||
cd build | ||
ctest . -j2 --output-on-failure | ||
ctest . -j --output-on-failure | ||
- name: Generate coverage report | ||
run: | | ||
gcovr --gcov-executable ${{ github.workspace }}/.github/workflows/scripts/gcov.sh \ | ||
--root ${{ github.workspace }}/test/coverage \ | ||
${{ github.workspace }}/build \ | ||
--filter ${{ github.workspace }}/include \ | ||
--filter ${{ github.workspace }}/test/include \ | ||
--filter ${{ github.workspace }}/src \ | ||
--exclude ${{ github.workspace }}/include/hibf/contrib \ | ||
--exclude ${{ github.workspace }}/test/include/hibf/test/iterator_test_template.hpp \ | ||
gcovr --root ${GITHUB_WORKSPACE}/test/coverage \ | ||
${GITHUB_WORKSPACE}/build \ | ||
--filter ${GITHUB_WORKSPACE}/include \ | ||
--filter ${GITHUB_WORKSPACE}/test/include \ | ||
--filter ${GITHUB_WORKSPACE}/src \ | ||
--exclude ${GITHUB_WORKSPACE}/include/hibf/contrib \ | ||
--exclude ${GITHUB_WORKSPACE}/test/include/hibf/test/iterator_test_template.hpp \ | ||
--exclude-lines-by-pattern '^\s*$' \ | ||
--exclude-lines-by-pattern '^\s*};$' \ | ||
--exclude-unreachable-branches \ | ||
--exclude-throw-branches \ | ||
--exclude-noncode-lines \ | ||
-j 2 \ | ||
--xml \ | ||
--output ${{ github.workspace }}/build/coverage_report.xml | ||
-j \ | ||
--cobertura \ | ||
--output ${GITHUB_WORKSPACE}/build/coverage_report.xml | ||
- name: Submit coverage build | ||
uses: codecov/[email protected] | ||
with: | ||
files: ${{ github.workspace }}/build/coverage_report.xml | ||
files: build/coverage_report.xml | ||
fail_ci_if_error: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.