diff --git a/.codecov.yml b/.codecov.yml index 3271158..eb24ff3 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -19,3 +19,7 @@ coverage: if_ci_failed: success # per default, codecov would fail if any CI fails informational: true # the codecov/patch status is never "fail" only_pulls: true # only post codecov/patch status on PRs + +parsers: + cobertura: + partials_as_hits: true diff --git a/.github/workflows/ci_coverage.yml b/.github/workflows/ci_coverage.yml index d9e14d8..cd07299 100644 --- a/.github/workflows/ci_coverage.yml +++ b/.github/workflows/ci_coverage.yml @@ -22,42 +22,23 @@ defaults: jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest + name: ${{ matrix.compiler }} strategy: fail-fast: false matrix: - include: - - name: "gcc13" - compiler: "gcc-13" - + compiler: ["gcc-14"] + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: ${{ matrix.compiler }} - ccache_size: 125M - - - name: Install CMake - uses: seqan/actions/setup-cmake@main - with: - cmake: 3.25.3 - - - name: Install gcovr - run: | - sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100 - pip install gcovr==6.0 - - - name: Configure + - name: Configure tests run: | - mkdir build - cd build + mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_FLAGS="--coverage -fprofile-arcs -ftest-coverage -Werror" \ -DCMAKE_C_FLAGS="--coverage -fprofile-arcs -ftest-coverage -Werror" \ @@ -65,26 +46,24 @@ jobs: -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-lgcov" - name: Build and run tests - run: | - cd build - make -j2 -k check + working-directory: build + run: make -k check - name: Generate coverage report run: | - gcovr --gcov-executable ${{ github.workspace }}/.github/workflows/scripts/gcov.sh \ - --root ${{ github.workspace }} \ - ${{ github.workspace }}/build \ - --filter ${{ github.workspace }}/include \ - --filter ${{ github.workspace }}/src \ + gcovr --root ${GITHUB_WORKSPACE} \ + ${GITHUB_WORKSPACE}/build \ + --filter ${GITHUB_WORKSPACE}/include \ + --filter ${GITHUB_WORKSPACE}/src \ --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/codecov-action@v3 + uses: codecov/codecov-action@v3.1.5 with: - files: ${{ github.workspace }}/build/coverage_report.xml + files: build/coverage_report.xml fail_ci_if_error: false diff --git a/.github/workflows/ci_cpm.yml b/.github/workflows/ci_cpm.yml new file mode 100644 index 0000000..b6423fe --- /dev/null +++ b/.github/workflows/ci_cpm.yml @@ -0,0 +1,33 @@ +# SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin +# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik +# SPDX-License-Identifier: CC0-1.0 + +name: Update CPM + +on: + schedule: + - cron: "0 12 * * SAT" + workflow_dispatch: + +env: + TZ: Europe/Berlin + +concurrency: + group: update-cpm-actions + cancel-in-progress: true + +jobs: + update_cpm: + name: Update CPM + runs-on: ubuntu-latest + timeout-minutes: 15 + if: github.repository_owner == 'seqan' + steps: + - name: Run update CPM + uses: seqan/actions/update_cpm_package_lock@main + with: + token: ${{ secrets.SEQAN_ACTIONS_PAT }} + gpg_key: ${{ secrets.SEQAN_ACTIONS_GPG_KEY }} + gpg_passphrase: ${{ secrets.SEQAN_ACTIONS_GPG_PASSPHRASE }} + package_lock_file: cmake/package-lock.cmake + diff --git a/.github/workflows/ci_license.yml b/.github/workflows/ci_license.yml index 1f68044..81f704a 100644 --- a/.github/workflows/ci_license.yml +++ b/.github/workflows/ci_license.yml @@ -19,7 +19,7 @@ env: jobs: check: name: REUSE Compliance - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest timeout-minutes: 5 steps: - name: Checkout diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index cba423f..5b39371 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -22,53 +22,29 @@ defaults: jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest + name: ${{ matrix.compiler }} strategy: fail-fast: false matrix: + compiler: ["clang-19", "clang-18", "clang-17", "gcc-14", "gcc-13", "gcc-12", "intel"] include: - - name: "clang17" - compiler: "clang-17" - build_type: Release - cxx_flags: "-stdlib=libc++" - - - name: "gcc13" - compiler: "gcc-13" - build_type: Release - - - name: "gcc12" - compiler: "gcc-12" - build_type: Release - - - name: "gcc11" - compiler: "gcc-11" - build_type: Release - + - compiler: "intel" + cxx_flags: "-fp-model=strict -Wno-overriding-option" + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: ${{ matrix.compiler }} - ccache_size: 75M - - - name: Install CMake - uses: seqan/actions/setup-cmake@main - with: - cmake: 3.25.3 - - - name: Configure + - name: Configure tests run: | - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + mkdir build && cd build + cmake .. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }} -Werror" - name: Build and run tests - run: | - cd build - make -j2 -k check + working-directory: build + run: make -k check diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 9e90aa0..99f69ab 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -22,43 +22,32 @@ defaults: jobs: build: - name: ${{ matrix.name }} - runs-on: macos-12 - timeout-minutes: 120 + name: ${{ matrix.compiler }} + runs-on: macos-14 strategy: fail-fast: false matrix: - include: - - name: "clang17" - compiler: "clang-17" - build_type: Release - - - name: "gcc13" - compiler: "gcc-13" - build_type: Release - - - name: "gcc12" - compiler: "gcc-12" - build_type: Release - - - name: "gcc11" - compiler: "gcc-11" - build_type: Release - + compiler: ["clang-19", "clang-18", "clang-17", "gcc-14", "gcc-13", "gcc-12"] steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main + - name: Setup compiler + uses: seqan/actions/setup-compiler@main + with: + compiler: ${{ matrix.compiler }} + + - name: Patch M1 GCC + if: contains(matrix.compiler, 'gcc') && matrix.compiler != 'gcc-14' + uses: seqan/actions/patch-m1-gcc@main with: compiler: ${{ matrix.compiler }} - ccache_size: 75M - - name: Configure + - name: Configure tests run: | mkdir build && cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Werror" + cmake .. -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS="-Werror" - name: Build and run tests working-directory: build diff --git a/.github/workflows/scripts/gcov.sh b/.github/workflows/scripts/gcov.sh deleted file mode 100755 index 258340d..0000000 --- a/.github/workflows/scripts/gcov.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -# SPDX-FileCopyrightText: 2006-2023, Knut Reinert & Freie Universität Berlin -# SPDX-FileCopyrightText: 2016-2023, Knut Reinert & MPI für molekulare Genetik -# SPDX-License-Identifier: CC0-1.0 - -set -Eeuo pipefail - -args=${@/--branch-counts/""} -args=${args/--branch-probabilities/""} - -exec gcov $args diff --git a/CMakeLists.txt b/CMakeLists.txt index fc78aa2..791c533 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,13 @@ project (app-template DESCRIPTION "My application description" ) +# LTO support. +include (CheckIPOSupported) +check_ipo_supported (RESULT result OUTPUT output) +if (result) + set (CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) +endif () + # This allows including `*.cmake` files from the `cmake` directory without specifying the full path. list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") diff --git a/cmake/CPM.cmake b/cmake/CPM.cmake index 94d83b4..56cac81 100644 --- a/cmake/CPM.cmake +++ b/cmake/CPM.cmake @@ -2,8 +2,8 @@ # # SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors -set (CPM_DOWNLOAD_VERSION 0.38.7) -set (CPM_HASH_SUM "83e5eb71b2bbb8b1f2ad38f1950287a057624e385c238f6087f94cdfc44af9c5") +set (CPM_DOWNLOAD_VERSION 0.40.2) +set (CPM_HASH_SUM "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d") if (CPM_SOURCE_CACHE) set (CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") diff --git a/cmake/package-lock.cmake b/cmake/package-lock.cmake index 594acee..8f05009 100644 --- a/cmake/package-lock.cmake +++ b/cmake/package-lock.cmake @@ -6,10 +6,10 @@ # This file should be committed to version control # hibf -set (HIBF_VERSION 894f663c7b77f28cc2b1b8f4252e51c052c49bb2) +set (HIBF_VERSION 1ce6960ce2400b53f3e64d2173b33d881d3358e0) CPMDeclarePackage (hibf NAME hibf - GIT_TAG ${HIBF_VERSION} + GIT_TAG ${HIBF_VERSION} # main GITHUB_REPOSITORY seqan/hibf SYSTEM TRUE EXCLUDE_FROM_ALL TRUE @@ -17,10 +17,10 @@ CPMDeclarePackage (hibf ) # sharg -set (SHARG_VERSION 01f848eeb6dbac3d50a718a8ee26bcf695edf5a8) +set (SHARG_VERSION c4367d1049322826e60c674b6bf24d3d0a8da999) CPMDeclarePackage (sharg NAME sharg - GIT_TAG ${SHARG_VERSION} + GIT_TAG ${SHARG_VERSION} # main GITHUB_REPOSITORY seqan/sharg-parser SYSTEM TRUE EXCLUDE_FROM_ALL TRUE @@ -28,10 +28,10 @@ CPMDeclarePackage (sharg ) # seqan3 -set (SEQAN3_VERSION fee3fb8e5976b455e848dd68c57f64fd3f67c3c2) +set (SEQAN3_VERSION a79244729de1fb45b030cb7a4d8078f47f81d5f1) CPMDeclarePackage (seqan3 NAME seqan3 - GIT_TAG ${SEQAN3_VERSION} + GIT_TAG ${SEQAN3_VERSION} # main GITHUB_REPOSITORY seqan/seqan3 SYSTEM TRUE EXCLUDE_FROM_ALL TRUE @@ -39,10 +39,10 @@ CPMDeclarePackage (seqan3 ) # fmindex -set (FMINDEX_VERSION 822d4d1aa6fa725f7d34e1ea819e9c23a2b6ebc2) +set (FMINDEX_VERSION cd34f30d57926b5f4d9d10f54b1d2a8036fc59f7) CPMDeclarePackage (fmindex NAME fmindex - GIT_TAG ${FMINDEX_VERSION} + GIT_TAG ${FMINDEX_VERSION} # main GITHUB_REPOSITORY SGSSGene/fmindex-collection SYSTEM TRUE EXCLUDE_FROM_ALL TRUE @@ -50,21 +50,22 @@ CPMDeclarePackage (fmindex ) # googletest -set (GOOGLETEST_VERSION 1.14.0) +set (GOOGLETEST_VERSION 1.15.2) CPMDeclarePackage (googletest NAME GTest VERSION ${GOOGLETEST_VERSION} GITHUB_REPOSITORY google/googletest SYSTEM TRUE EXCLUDE_FROM_ALL TRUE - OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING" + OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF" "CMAKE_CXX_STANDARD 20" + "CMAKE_MESSAGE_LOG_LEVEL WARNING" ) # use_ccache set (USE_CCACHE_VERSION d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37) CPMDeclarePackage (use_ccache NAME use_ccache - GIT_TAG ${USE_CCACHE_VERSION} + GIT_TAG ${USE_CCACHE_VERSION} # main GITHUB_REPOSITORY seqan/cmake-scripts SOURCE_SUBDIR ccache SYSTEM TRUE