diff --git a/.codecov.yml b/.codecov.yml index 272c2eba..15614a36 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -20,3 +20,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/api.yml b/.github/workflows/api.yml index 808dff87..f3bb10e4 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -2,7 +2,7 @@ # SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik # SPDX-License-Identifier: CC0-1.0 -name: Sharg API-Stability +name: API-Stability on: # Will always run on the default branch @@ -16,96 +16,82 @@ concurrency: cancel-in-progress: true env: - CMAKE_VERSION: 3.16.9 SHARG_NO_VERSION_CHECK: 1 TZ: Europe/Berlin ISSUE: 146 # Issue number to use for reporting failures defaults: run: - shell: bash -exo pipefail {0} + shell: bash -Eeuxo pipefail {0} jobs: build: - name: API-Stability gcc${{ matrix.compiler }} - runs-on: ubuntu-22.04 - timeout-minutes: 300 + name: API-Stability ${{ matrix.compiler }} + runs-on: ubuntu-latest if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' strategy: fail-fast: false matrix: - compiler: [11, 12, 13] - + compiler: ["gcc-14", "gcc-13", "gcc-12"] + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - - name: Checkout Sharg + - name: Checkout uses: actions/checkout@v4 with: - path: sharg - fetch-depth: 1 submodules: true - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: gcc-${{ matrix.compiler }} - ccache_size: 75M - - - name: Install CMake - uses: seqan/actions/setup-cmake@main - with: - cmake: 3.16.9 - - name: Configure tests run: | - mkdir sharg-build - cd sharg-build - cmake ../sharg/test/api_stability -DCMAKE_BUILD_TYPE=Release + mkdir build && cd build + cmake ../test/api_stability -DCMAKE_BUILD_TYPE=Release - name: Build tests - run: | - cd sharg-build - CMAKE_BUILD_PARALLEL_LEVEL=2 cmake --build . -- -k 2>&1 | tee build.log - - - name: Setup Python - if: ${{ failure() }} - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Process Log - if: ${{ failure() }} - run: | - FILE="seqan3/.github/ISSUE_TEMPLATE/cron_comment_template.md" - python3 seqan3/.github/workflows/scripts/process_compiler_error_log.py sharg-build/build.log >> $FILE + working-directory: build + run: make -k 2>&1 | tee build.log - name: Create comment body - if: ${{ failure() }} + if: always() id: comment-body run: | - FILE="sharg/.github/ISSUE_TEMPLATE/cron_comment_template.md" - URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" - sed -i "s@{{ build }}@${{ matrix.build }}@" $FILE - sed -i "s@{{ compiler }}@${{ matrix.compiler }}@" $FILE - sed -i "s@{{ url }}@$URL@" $FILE - echo "body<> $GITHUB_OUTPUT - cat $FILE >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + if [[ "${{ job.status }}" == "success" ]]; then + echo "body=Success ${{ matrix.build }} on ${{ matrix.compiler }}" >> $GITHUB_OUTPUT + else + FILE=".github/ISSUE_TEMPLATE/cron_comment_template.md" + python3 .github/workflows/scripts/process_compiler_error_log.py build/build.log >> ${FILE} + URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" + sed -i "s@{{ build }}@${{ matrix.build }}@" ${FILE} + sed -i "s@{{ compiler }}@${{ matrix.compiler }}@" ${FILE} + sed -i "s@{{ url }}@$URL@" ${FILE} + echo "body<> $GITHUB_OUTPUT + cat ${FILE} >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + fi - name: Reopen issue - if: ${{ failure() }} - uses: octokit/request-action@v2.x - with: - route: PATCH /repos/{owner}/{repo}/issues/{issue_number} - owner: ${{ github.repository_owner }} - repo: sharg-parser - issue_number: ${{ env.ISSUE }} - state: "open" + if: failure() + run: gh issue reopen ${{ env.ISSUE }} env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.SEQAN_ACTIONS_PAT }} + GH_REPO: ${{ github.repository }} - - name: Create comment - if: ${{ failure() }} + - name: Find Comment + if: always() + uses: peter-evans/find-comment@v3 + id: find_comment + with: + issue-number: ${{ env.ISSUE }} + body-includes: ${{ matrix.build }} on ${{ matrix.compiler }} + + - name: Update comment + if: always() uses: peter-evans/create-or-update-comment@v4 with: + comment-id: ${{ steps.find_comment.outputs.comment-id }} issue-number: ${{ env.ISSUE }} body: ${{ steps.comment-body.outputs.body }} + edit-mode: replace + token: ${{ secrets.SEQAN_ACTIONS_PAT }} + diff --git a/.github/workflows/ci_cmake.yml b/.github/workflows/ci_cmake.yml index e0c69c1a..0f10359f 100644 --- a/.github/workflows/ci_cmake.yml +++ b/.github/workflows/ci_cmake.yml @@ -28,59 +28,42 @@ defaults: jobs: build: name: "External project ${{ contains(matrix.SHARG_NO_TDL, 'OFF') && 'with TDL' || 'without TDL' }}" - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' strategy: fail-fast: false matrix: SHARG_NO_TDL: [ON, OFF] - + container: + image: ghcr.io/seqan/gcc-14 + volumes: + - /home/runner:/home/runner steps: - name: Checkout uses: actions/checkout@v4 with: - path: sharg-parser - fetch-depth: 1 submodules: true - - name: Install CMake - uses: seqan/actions/setup-cmake@main - with: - cmake: 3.16.9 - - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: gcc-13 - - name: Install dependencies if: matrix.SHARG_NO_TDL == 'OFF' run: | git clone --depth 1 --single-branch --branch 0.8.0 https://github.com/jbeder/yaml-cpp.git - cd yaml-cpp - mkdir build - cd build + cd yaml-cpp && mkdir build && cd build cmake ../ -DCMAKE_BUILD_TYPE=Debug \ -DYAML_CPP_BUILD_CONTRIB=OFF \ -DYAML_CPP_BUILD_TOOLS=OFF \ -DYAML_BUILD_SHARED_LIBS=OFF \ -DYAML_CPP_INSTALL=ON \ - -DYAML_CPP_BUILD_TESTS=OFF \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - make -j2 - sudo make install + -DYAML_CPP_BUILD_TESTS=OFF + make install - name: Configure tests run: | - mkdir sharg-build - cd sharg-build - cmake ../sharg-parser/test/external_project -DCMAKE_BUILD_TYPE=Debug \ - -DSHARG_NO_TDL=${{ matrix.SHARG_NO_TDL }} - make -j2 sharg_test_prerequisite + mkdir build && cd build + cmake ../test/external_project -DCMAKE_BUILD_TYPE=Debug \ + -DSHARG_NO_TDL=${{ matrix.SHARG_NO_TDL }} + make -k sharg_test_prerequisite - name: Build tests - run: | - cd sharg-build - make -k -j2 - + working-directory: build + run: make -k diff --git a/.github/workflows/ci_coverage.yml b/.github/workflows/ci_coverage.yml index 9feedcf1..3188e1fa 100644 --- a/.github/workflows/ci_coverage.yml +++ b/.github/workflows/ci_coverage.yml @@ -7,21 +7,15 @@ name: Coverage on: push: branches: - # Push events to branches matching refs/heads/main - 'main' - # Push events to branches matching refs/heads/release* - - 'release*' - # Trigger after PR was unlabeled pull_request: types: - unlabeled - # Enables a manual trigger, may run on any branch workflow_dispatch: -# Do not cancel on push events concurrency: group: coverage-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: false # PRs will be canceled by the clang-format CI + cancel-in-progress: false env: SHARG_NO_VERSION_CHECK: 1 @@ -33,70 +27,72 @@ defaults: jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + 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: - path: sharg - fetch-depth: ${{ steps.fetch_depth.outputs.depth }} + fetch-depth: 0 submodules: true - - 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 + - name: Load ccache + uses: actions/cache@v4 with: - cmake: 3.16.9 + path: /home/runner/.ccache + key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }} + restore-keys: | + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }} + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }} - - name: Install gcovr - run: | - sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100 - pip install gcovr==6.0 + - name: Increase ccache size + run: echo "CCACHE_MAXSIZE=300M" >> "${GITHUB_ENV}" - name: Configure tests run: | - mkdir sharg-build - cd sharg-build - cmake ../sharg/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSHARG_VERBOSE_TESTS=OFF \ - -DSHARG_COVERAGE_PARALLEL_LEVEL=2 - make -j2 gtest_build yaml-cpp + mkdir build && cd build + cmake ../test/coverage -DCMAKE_BUILD_TYPE=Coverage + make gtest_build yaml-cpp - name: Build tests - env: - CCACHE_IGNOREOPTIONS: "-fprofile-abs-path" - GCOV: ${{ github.workspace }}/sharg/.github/workflows/scripts/gcov.sh + working-directory: build run: | ccache -z - cd sharg-build - make -k -j2 - ccache -sv + make -k + ccache -svvx + + - name: Run tests + working-directory: build + run: ctest . -j --output-on-failure --no-tests=error + + - name: Generate coverage report + run: | + gcovr --root ${GITHUB_WORKSPACE}/test/coverage \ + ${GITHUB_WORKSPACE}/build \ + --filter ${GITHUB_WORKSPACE}/include/sharg \ + --filter ${GITHUB_WORKSPACE}/test/include/sharg/test \ + --exclude ${GITHUB_WORKSPACE}/include/sharg/contrib \ + --exclude ${GITHUB_WORKSPACE}/include/sharg/std \ + --exclude-lines-by-pattern '^\s*$' \ + --exclude-lines-by-pattern '^\s*};$' \ + --exclude-unreachable-branches \ + --exclude-throw-branches \ + --exclude-noncode-lines \ + -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 }}/sharg-build/sharg_coverage.xml - root_dir: ${{ github.workspace }}/sharg + files: build/coverage_report.xml + fail_ci_if_error: false diff --git a/.github/workflows/ci_documentation.yml b/.github/workflows/ci_documentation.yml index 38a1ea48..ae93121b 100644 --- a/.github/workflows/ci_documentation.yml +++ b/.github/workflows/ci_documentation.yml @@ -19,7 +19,7 @@ concurrency: cancel-in-progress: ${{ github.event_name != 'push' }} env: - SEQAN3_NO_VERSION_CHECK: 1 + SHARG_NO_VERSION_CHECK: 1 TZ: Europe/Berlin defaults: diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index f9fbffbb..f131ff79 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -2,20 +2,15 @@ # SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik # SPDX-License-Identifier: CC0-1.0 -name: Unit Linux +name: Linux on: push: branches: - # Push events to branches matching refs/heads/main - 'main' - # Push events to branches matching refs/heads/release* - - 'release*' - # Trigger after PR was unlabeled pull_request: types: - unlabeled - # Enables a manual trigger, may run on any branch workflow_dispatch: concurrency: @@ -23,99 +18,61 @@ concurrency: cancel-in-progress: ${{ github.event_name != 'push' }} env: - SHARG_NO_VERSION_CHECK: 1 + SEQAN3_NO_VERSION_CHECK: 1 TZ: Europe/Berlin defaults: run: - shell: bash -Eexuo pipefail {0} + shell: bash -Eeuxo pipefail {0} jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest + name: ${{ matrix.compiler }}${{ matrix.name_append }} if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' strategy: - fail-fast: true + 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: unit - build_type: Release - cxx_flags: "-stdlib=libc++" - - - name: "clang17 no TDL" - compiler: "clang-17" - build: unit - build_type: Release - cxx_flags: "-stdlib=libc++" - - - name: "gcc13" - compiler: "gcc-13" - build: unit - build_type: Release - - - name: "gcc13 no TDL" - compiler: "gcc-13" - build: unit - build_type: Release - - - name: "gcc12" - compiler: "gcc-12" - build: unit - build_type: Release - - - name: "gcc11" - compiler: "gcc-11" - build: unit - build_type: Release - - - name: "IntelLLVM" - compiler: "intel" - build: unit - build_type: Release - cxx_flags: "-fp-model=strict" - + - 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 with: - path: sharg - fetch-depth: 1 submodules: true - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: ${{ matrix.compiler }} - ccache_size: 75M - - - name: Install CMake - if: contains(matrix.compiler, 'intel') == false - uses: seqan/actions/setup-cmake@main + - name: Load ccache + uses: actions/cache@v4 with: - cmake: 3.16.9 + path: /home/runner/.ccache + key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }} + restore-keys: | + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }} + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }} - name: Configure tests run: | - mkdir sharg-build - cd sharg-build - cmake ../sharg/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSHARG_VERBOSE_TESTS=OFF \ - ${{ contains(matrix.name, 'no TDL') && '-DSHARG_NO_TDL=ON' || '' }} - make -j2 gtest_build ${{ contains(matrix.name, 'no TDL') == false && 'yaml-cpp' || '' }} + $CXX --version || true + cmake --version || true + mkdir build && cd build + cmake ../test/unit -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" + make gtest_build yaml-cpp - name: Build tests + working-directory: build run: | ccache -z - cd sharg-build - make -k -j2 - ccache -sv + make -k + ccache -svvx - name: Run tests - run: | - cd sharg-build - ctest . -j2 --output-on-failure + working-directory: build + run: ctest . -j --output-on-failure --no-tests=error + diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 2b3d2278..0fcac0ab 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -2,20 +2,15 @@ # SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik # SPDX-License-Identifier: CC0-1.0 -name: Unit macOS +name: macOS on: push: branches: - # Push events to branches matching refs/heads/main - 'main' - # Push events to branches matching refs/heads/release* - - 'release*' - # Trigger after PR was unlabeled pull_request: types: - unlabeled - # Enables a manual trigger, may run on any branch workflow_dispatch: concurrency: @@ -28,45 +23,21 @@ env: defaults: run: - shell: bash -Eexuo pipefail {0} + shell: bash -Eeuxo pipefail {0} jobs: build: - name: ${{ matrix.name }} + name: ${{ matrix.compiler }} runs-on: macos-14 - timeout-minutes: 120 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: "clang17" - compiler: "clang-17" - build: unit - build_type: Release - cxx_flags: "-stdlib=libc++" # For verbosity. This is already the default. - - - name: "gcc13" - compiler: "gcc-13" - build: unit - build_type: Release - - - name: "gcc12" - compiler: "gcc-12" - build: unit - build_type: Release - - - name: "gcc11" - compiler: "gcc-11" - build: unit - build_type: Release - + compiler: ["clang-19", "clang-18", "clang-17", "gcc-14", "gcc-13", "gcc-12"] steps: - name: Checkout uses: actions/checkout@v4 with: - path: sharg - fetch-depth: 1 submodules: true - name: Setup toolchain @@ -75,28 +46,19 @@ jobs: compiler: ${{ matrix.compiler }} ccache_size: 75M - - name: Install CMake - uses: seqan/actions/setup-cmake@main - with: - cmake: 3.16.9 - - name: Configure tests run: | - mkdir sharg-build - cd sharg-build - cmake ../sharg/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSHARG_VERBOSE_TESTS=OFF - make -j3 gtest_build yaml-cpp + mkdir build && cd build + cmake ../test/unit -DCMAKE_BUILD_TYPE=Release + make gtest_main - name: Build tests + working-directory: build run: | ccache -z - cd sharg-build - make -k -j3 - ccache -sv + make -k + ccache -svvx - name: Run tests - run: | - cd sharg-build - ctest . -j3 --output-on-failure + working-directory: build + run: ctest . -j --output-on-failure --no-tests=error diff --git a/.github/workflows/ci_misc.yml b/.github/workflows/ci_misc.yml index 59802144..b4d6dc9e 100644 --- a/.github/workflows/ci_misc.yml +++ b/.github/workflows/ci_misc.yml @@ -2,20 +2,15 @@ # SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik # SPDX-License-Identifier: CC0-1.0 -name: Linux +name: Misc on: push: branches: - # Push events to branches matching refs/heads/main - 'main' - # Push events to branches matching refs/heads/release* - - 'release*' - # Trigger after PR was unlabeled pull_request: types: - unlabeled - # Enables a manual trigger, may run on any branch workflow_dispatch: concurrency: @@ -28,105 +23,54 @@ env: defaults: run: - shell: bash -Eexuo pipefail {0} + shell: bash -Eeuxo pipefail {0} jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + name: ${{ matrix.build }} ${{ matrix.compiler }} + runs-on: ubuntu-latest if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' strategy: fail-fast: false matrix: + compiler: ["clang-19", "gcc-14", "gcc-12", "intel"] + build: ["snippet", "header"] include: - - name: "Snippet clang17" - compiler: "clang-17" - build: snippet - build_type: Release - cxx_flags: "-stdlib=libc++" - test_threads: 1 - - - name: "Snippet gcc11" - compiler: "gcc-11" - build: snippet - build_type: Release - test_threads: 1 # snippets create and delete files and some separate tests create/delete the same files - - - name: "Header clang17 cpp23" - compiler: "clang-17" - build: header - build_type: Release - cxx_flags: "-stdlib=libc++ -std=c++23" - test_threads: 2 - - - name: "Header clang17" - compiler: "clang-17" - build: header - build_type: Release - cxx_flags: "-stdlib=libc++" - test_threads: 2 - - - name: "Header gcc13 cpp23" - compiler: "gcc-13" - build: header - build_type: Debug - cxx_flags: "-std=c++23" - test_threads: 2 - - - name: "Header gcc13" - compiler: "gcc-13" - build: header - build_type: Debug - test_threads: 2 - - - name: "Header gcc11" - compiler: "gcc-11" - build: header - build_type: Debug - test_threads: 2 - + - 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 with: - path: sharg - fetch-depth: 1 submodules: true - - 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 + - name: Load ccache + uses: actions/cache@v4 with: - cmake: 3.16.9 + path: /home/runner/.ccache + key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.build }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }} + restore-keys: | + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.build }}-${{ matrix.compiler }}-${{ github.ref }} + ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.build }}-${{ matrix.compiler }} - name: Configure tests run: | - mkdir sharg-build - cd sharg-build - cmake ../sharg/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \ - -DSHARG_VERBOSE_TESTS=OFF \ - ${{ contains(matrix.name, 'Header') && '-DSHARG_NO_TDL=ON' || '' }} - - case "${{ matrix.build }}" in - snippet) make -j2 gtest_build yaml-cpp;; - header) make -j2 gtest_build gbenchmark_build;; - esac + mkdir build && cd build + cmake ../test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" + make gtest_build yaml-cpp - name: Build tests + working-directory: build run: | ccache -z - cd sharg-build - make -k -j2 - ccache -sv + make -k + ccache -svvx - name: Run tests - run: | - cd sharg-build - ctest . -j${{ matrix.test_threads }} --output-on-failure + working-directory: build + run: ctest . -j${{ matrix.build == 'snippet' && '1' || '' }} --output-on-failure --no-tests=error diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c2777574..1ad29a70 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,66 +16,25 @@ defaults: jobs: # Cancel other workflows that are dependent on this workflow by adding jobs that have the same concurrency group. - cancel_linux: - name: Cancel running Workflows + cancel_running_workflows: + name: Cancel ${{ matrix.workflow}} + strategy: + fail-fast: false + matrix: + workflow: ["linux", "macos", "coverage", "misc", "documentation", "cmake"] concurrency: - group: linux-${{ github.event.pull_request.number }} + group: ${{ matrix.workflow }}-${{ github.event.pull_request.number }} cancel-in-progress: true - runs-on: ubuntu-22.04 - steps: - - name: "Cancel Linux" - run: echo "Cancelling Linux" - cancel_macos: - name: Cancel running Workflows - concurrency: - group: macos-${{ github.event.pull_request.number }} - cancel-in-progress: true - runs-on: ubuntu-22.04 - steps: - - name: "Cancel macOS" - run: echo "Cancelling macOS" - cancel_misc: - name: Cancel running Workflows - concurrency: - group: misc-${{ github.event.pull_request.number }} - cancel-in-progress: true - runs-on: ubuntu-22.04 - steps: - - name: "Cancel Misc" - run: echo "Cancelling Misc" - cancel_coverage: - name: Cancel running Workflows - concurrency: - group: coverage-${{ github.event.pull_request.number }} - cancel-in-progress: true - runs-on: ubuntu-22.04 - steps: - - name: "Cancel Coverage" - run: echo "Cancelling Coverage" - cancel_documentation: - name: Cancel running Workflows - concurrency: - group: documentation-${{ github.event.pull_request.number }} - cancel-in-progress: true - runs-on: ubuntu-22.04 - steps: - - name: "Cancel Documentation" - run: echo "Cancelling Documentation" - cancel_cmake: - name: Cancel running Workflows - concurrency: - group: cmake-${{ github.event.pull_request.number }} - cancel-in-progress: true - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - name: "Cancel CMake" - run: echo "Cancelling CMake" + - name: "Cancel ${{ matrix.workflow }}" + run: echo "Cancelling ${{ matrix.workflow }}" lint: name: Lint concurrency: group: lint-${{ github.event.pull_request.number }} cancel-in-progress: true - needs: [cancel_linux, cancel_macos, cancel_misc, cancel_coverage, cancel_documentation, cancel_cmake] + needs: cancel_running_workflows runs-on: ubuntu-22.04 timeout-minutes: 15 steps: diff --git a/.github/workflows/scripts/gcov.sh b/.github/workflows/scripts/gcov.sh deleted file mode 100755 index 86ba2abf..00000000 --- a/.github/workflows/scripts/gcov.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -# 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 - -args=${@/--branch-counts/""} -args=${args/--branch-probabilities/""} - -exec gcov $args diff --git a/.github/workflows/scripts/process_compiler_error_log.py b/.github/workflows/scripts/process_compiler_error_log.py new file mode 100644 index 00000000..d8f1f137 --- /dev/null +++ b/.github/workflows/scripts/process_compiler_error_log.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 + +# 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 +# +# Usage process_compiler_error_log.py +# +# Processes a build log and writes a GitHub-Markdown-formatted list of build errors to stdcout. +import html +import re +import sys + +# https://regex101.com/r/aE0qX3/2 +tokenise_regex = re.compile(r"(\[\s*\d+%\](?:.(?!\[\s*\d+%\]))+(?:: error:).*?(?=\[\s*\d+%\]|$))", re.DOTALL) +# Match line containg 'error:', but stop at linebreak, semicolon or parenthesis. +error_regex = re.compile(r"(error:[^(;\n]*)") + +with open(sys.argv[1]) as file: + content = file.read() + +counter = 1 +log = '' +# One `group` (a string) is all messages in the log associated with one failing compilation +for group in [match.groups()[0] for match in tokenise_regex.finditer(content)]: + error_message = html.escape(re.search(error_regex, group).group().rstrip()[:110]) + log += '
Error {}: {}\n\n```text\n'.format(counter, error_message) + log += '\n'.join(group.split('\n')[:30]).rstrip() # Only take first 30 lines + log += '\n```\n
\n' + counter += 1 + +# Truncate to 65300 to not exceed the limit of GitHub's API +print(log[:65300]) diff --git a/test/cmake/sharg_macro_benchmark.cmake b/test/cmake/sharg_macro_benchmark.cmake deleted file mode 100644 index 16493575..00000000 --- a/test/cmake/sharg_macro_benchmark.cmake +++ /dev/null @@ -1,66 +0,0 @@ -# SPDX-FileCopyrightText: 2006-2024, Knut Reinert & Freie Universität Berlin -# SPDX-FileCopyrightText: 2016-2024, Knut Reinert & MPI für molekulare Genetik -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required (VERSION 3.10) - -# Adds a macro benchmark target and a test which executes that macro benchmark -# -# Example: -# -# sharg_macro_benchmark( -# edit_distance_macro_benchmark.cpp -# REPETITIONS 3 # optional, default value is 3 -# META_DATA # optional -# foo bar # user-specified data -# sharg_version 3.0.1 # automatically set -# sharg_git_version a1829272d7bafea48580af6eaac2bfbb678c3861 # automatically set -# range-v3_version 0.10.0 # automatically set -# range-v3_git_version 5daa38e80238a1b50a18c08b4a582178f414404c # automatically set -# sdsl_version 3.0.0 # automatically set -# sdsl_git_version 9a0d5676fd09fb8b52af214eca2d5809c9a32dbe # automatically set -# ) -# -# This produces an executable target with the name `edit_distance_macro_benchmark`. -# -# When calling ctest, the executable `edit_distance_macro_benchmark` will be executed and a json file (i.e. -# `edit_distance_macro_benchmark.json`) with the benchmark results will be generated. -# -# Options: -# -# * REPETITIONS: [default value: 3] -# -# Repeats the benchmark `REPETITIONS`-many times. -# -# Under the hood executes the target with `--benchmark_repetitions = ${REPETITIONS}`. -# -# * META_DATA: -# -# Adds the meta data to the generated json file. -function (sharg_macro_benchmark macro_benchmark_cpp) - cmake_parse_arguments ( - "MACRO_BENCHMARK" # - "" # - "REPETITIONS" # - "META_DATA" # - ${ARGN}) - - if (NOT MACRO_BENCHMARK_REPETITIONS) - set (MACRO_BENCHMARK_REPETITIONS "3") - endif () - - file (RELATIVE_PATH macro_benchmark "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_LIST_DIR}/${macro_benchmark_cpp}") - - include (sharg_test_component) - sharg_test_component (target "${macro_benchmark}" TARGET_NAME) - sharg_test_component (test_name "${macro_benchmark}" TEST_NAME) - - add_executable (${target} ${macro_benchmark_cpp}) - target_link_libraries (${target} seqan3::test::performance) - add_test (NAME "${test_name}" - COMMAND ${target} # - --benchmark_repetitions=${MACRO_BENCHMARK_REPETITIONS} # - --benchmark_min_time=0 # - --benchmark_out=$.json # - --benchmark_out_format=json) -endfunction () diff --git a/test/cmake/sharg_require_benchmark.cmake b/test/cmake/sharg_require_benchmark.cmake deleted file mode 100644 index 737296a3..00000000 --- a/test/cmake/sharg_require_benchmark.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2006-2024, Knut Reinert & Freie Universität Berlin -# SPDX-FileCopyrightText: 2016-2024, Knut Reinert & MPI für molekulare Genetik -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required (VERSION 3.16) - -# Exposes the google-benchmark target `benchmark` and `benchmark_main`. -# CMake 3.24: https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_TRY_FIND_PACKAGE_MODE -macro (sharg_require_benchmark) - enable_testing () - - set (benchmark_version "1.7.0") - set (gbenchmark_git_tag "v${benchmark_version}") - - find_package (benchmark ${benchmark_version} EXACT QUIET) - - if (NOT benchmark_FOUND) - message (STATUS "Fetching Google Benchmark ${benchmark_version}") - - include (FetchContent) - FetchContent_Declare ( - gbenchmark_fetch_content - GIT_REPOSITORY "https://github.com/google/benchmark.git" - GIT_TAG "${gbenchmark_git_tag}") - option (BENCHMARK_ENABLE_TESTING "" OFF) - option (BENCHMARK_ENABLE_WERROR "" OFF) # Does not apply to Debug builds. - option (BENCHMARK_ENABLE_INSTALL "" OFF) - FetchContent_MakeAvailable (gbenchmark_fetch_content) - else () - message (STATUS "Found Google Benchmark ${benchmark_version}") - endif () - - # NOTE: google benchmark's CMakeLists.txt already defines Shlwapi - if (NOT TARGET gbenchmark_build) - add_custom_target (gbenchmark_build DEPENDS benchmark_main benchmark) - endif () - -endmacro () diff --git a/test/cmake/sharg_require_test.cmake b/test/cmake/sharg_require_test.cmake index 3bf30d74..2b0463fd 100644 --- a/test/cmake/sharg_require_test.cmake +++ b/test/cmake/sharg_require_test.cmake @@ -9,8 +9,8 @@ cmake_minimum_required (VERSION 3.16) macro (sharg_require_test) enable_testing () - set (gtest_version "1.12.1") - set (gtest_git_tag "release-${gtest_version}") + set (gtest_version "1.15.2") + set (gtest_git_tag "v${gtest_version}") find_package (GTest ${gtest_version} EXACT QUIET) diff --git a/test/coverage/CMakeLists.txt b/test/coverage/CMakeLists.txt index ccf74a68..b5c0ad60 100644 --- a/test/coverage/CMakeLists.txt +++ b/test/coverage/CMakeLists.txt @@ -5,133 +5,32 @@ cmake_minimum_required (VERSION 3.10...3.22) project (sharg_test_coverage CXX) -include (../sharg-test.cmake) - -if (CMAKE_BUILD_TYPE AND NOT ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")) - message (WARNING "Coverage test must be build in debug mode [build type = ${CMAKE_BUILD_TYPE}]") -endif () - -find_program (GCOVR_COMMAND NAMES gcovr) - -if (NOT GCOVR_COMMAND) - message (FATAL_ERROR "gcovr not found! Aborting...") -endif () - -# Holds all target's defined by sharg_test -set_property (GLOBAL PROPERTY GLOBAL_TEST_COVERAGE_ALL_TESTS "") - -set (SHARG_COVERAGE_PARALLEL_LEVEL - "1" - CACHE STRING "Number of threads to use for coverage report generation.") - -set (SHARG_GCOVR_ARGUMENTS "") - -macro (sharg_append_gcovr_args) - set (key ${ARGV0}) - if (${ARGC} EQUAL 1) - list (APPEND SHARG_GCOVR_ARGUMENTS ${key}) - else () - string (REPLACE "'^" "\\''^" value "${ARGV1}") - string (REPLACE "$'" "$$'\\'" value "${value}") - string (REPLACE ";" "\\\\\\;" value "${value}") - list (APPEND SHARG_GCOVR_ARGUMENTS ${key} ${value}) - endif () -endmacro () - -# Arguments for gcovr. -# Each line is an argument, ';' will end up being a whitespace due to expansion by CMake. -# Special characters like '"', '\', ')' need to be escaped by a number of '\', depending how often they are evaluated. -# gcovr uses python regex expressions. -# See https://gcovr.com/en/5.0/guide.html#the-gcovr-command for an overview of parameters. -# See https://gcovr.com/en/5.0/faq.html#why-does-c-code-have-so-many-uncovered-branches for an explanation on branches. - -# The directory of the CMakeLists.txt used for invoking cmake. -sharg_append_gcovr_args ("--root" "${CMAKE_CURRENT_LIST_DIR}") -# The build directory. -sharg_append_gcovr_args ("${PROJECT_BINARY_DIR}") -# Include all files whose path match '${SHARG_CLONE_DIR}/include/sharg/.*'. -sharg_append_gcovr_args ("--filter" "${SHARG_CLONE_DIR}/include/sharg") -# Include all files whose path match '${SHARG_CLONE_DIR}/test/include/sharg/test/.*'. -sharg_append_gcovr_args ("--filter" "${SHARG_CLONE_DIR}/test/include/sharg/test") -# Remove all files whose path match '${SHARG_CLONE_DIR}/include/sharg/contrib/.*'. -sharg_append_gcovr_args ("--exclude" "${SHARG_CLONE_DIR}/include/sharg/contrib") -# Remove all files whose path match '${SHARG_CLONE_DIR}/include/sharg/std/.*'. -sharg_append_gcovr_args ("--exclude" "${SHARG_CLONE_DIR}/include/sharg/std") -# Remove line coverage for all lines that match '^\s*$', i.e. empty lines. -sharg_append_gcovr_args ("--exclude-lines-by-pattern" [['^\\s*$']]) -# Remove line coverage for all lines that match "^\s*[\{\}]\s*\;*\s*(//.*)?$", i.e. lines with a single '{' or '}' which -# might be followed by a semicolon or a comment '//'. -sharg_append_gcovr_args ("--exclude-lines-by-pattern" [['^\\s*[{}]{0,2}\\s*;*\\s*(//.*)?$']]) -# Will exclude branches that are unreachable. -sharg_append_gcovr_args ("--exclude-unreachable-branches") -# Will exclude branches that are only generated for exception handling. -sharg_append_gcovr_args ("--exclude-throw-branches") -# Will exclude non-code lines, e.g. lines with closing braces. -sharg_append_gcovr_args ("--exclude-noncode-lines") -# Run up to this many gcov instances in parallel. -sharg_append_gcovr_args ("-j" "${SHARG_COVERAGE_PARALLEL_LEVEL}") - -add_custom_command (OUTPUT ${PROJECT_BINARY_DIR}/sharg_coverage.xml - # Run tests. - COMMAND ${CMAKE_CTEST_COMMAND} -j ${SHARG_COVERAGE_PARALLEL_LEVEL} --output-on-failure - # Run gcovr and create XML report. - COMMAND ${GCOVR_COMMAND} ${SHARG_GCOVR_ARGUMENTS} --xml --output - ${PROJECT_BINARY_DIR}/sharg_coverage.xml - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - COMMENT "Processing code coverage counters and generating XML report." - COMMAND_EXPAND_LISTS) - -add_custom_target (coverage ALL DEPENDS ${PROJECT_BINARY_DIR}/sharg_coverage.xml) - -add_custom_command (OUTPUT ${PROJECT_BINARY_DIR}/html/index.html - # Run tests. - COMMAND ${CMAKE_CTEST_COMMAND} -j ${SHARG_COVERAGE_PARALLEL_LEVEL} --output-on-failure - # Create output directory. - COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/html/ - # Run gcovr and create HTML report. - COMMAND ${GCOVR_COMMAND} ${SHARG_GCOVR_ARGUMENTS} --html-details --output - ${PROJECT_BINARY_DIR}/html/index.html - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - COMMENT "Processing code coverage counters and generating HTML report." - COMMAND_EXPAND_LISTS) - -add_custom_target (coverage_html - DEPENDS ${PROJECT_BINARY_DIR}/html/index.html - COMMENT "Generate coverage report.") - -add_custom_command (TARGET coverage_html - POST_BUILD - COMMAND ; - COMMENT "Open ${PROJECT_BINARY_DIR}/html/index.html in your browser to view the coverage report.") - -macro (sharg_test unit_test_cpp) - file (RELATIVE_PATH unit_test "${CMAKE_SOURCE_DIR}/../unit" "${CMAKE_CURRENT_LIST_DIR}/${unit_test_cpp}") - sharg_test_component (target "${unit_test}" TARGET_NAME) - sharg_test_component (test_name "${unit_test}" TEST_NAME) - - add_executable (${target} ${unit_test_cpp}) - target_link_libraries (${target} sharg::test::coverage) - add_test (NAME "${test_name}" COMMAND ${target}) - - # any change of a target will invalidate the coverage result; - # NOTE that this is a GLOBAL variable, because a normal - # `set(GLOBAL_TEST_COVERAGE_ALL_TESTS)` would not propagate the result when - # CMakeLists.txt goes out of scope due to a `add_subdirectory` - set_property (GLOBAL APPEND PROPERTY GLOBAL_TEST_COVERAGE_ALL_TESTS ${target}) - - unset (unit_test) - unset (target) - unset (test_name) -endmacro () - -sharg_require_ccache () -sharg_require_test () - -# add all unit tests -add_subdirectories_of ("${CMAKE_CURRENT_SOURCE_DIR}/../unit") - -# add collected test cases as dependency -get_property (TEST_COVERAGE_ALL_TESTS GLOBAL PROPERTY GLOBAL_TEST_COVERAGE_ALL_TESTS) -add_custom_command (OUTPUT ${PROJECT_BINARY_DIR}/sharg_coverage.xml - DEPENDS ${TEST_COVERAGE_ALL_TESTS} - APPEND) +# Add a custom build type: Coverage +# +# `--coverage` is equivalent to `-fprofile-arcs -ftest-coverage` +# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-gcov +# +# `-fprofile-update=atomic` prevents profile corruption in multi-threaded tests +# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-update +# +# `-fprofile-abs-path` converts relative source file names to absolute paths in the coverage files +# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-abs-path + +set (CMAKE_CXX_FLAGS_COVERAGE + "${CMAKE_CXX_FLAGS_DEBUG} --coverage -g -O0 -fprofile-abs-path -fprofile-update=atomic" + CACHE STRING "Flags used by the C++ compiler during coverage builds." FORCE) +set (CMAKE_C_FLAGS_COVERAGE + "${CMAKE_C_FLAGS_DEBUG} --coverage -g -O0 -fprofile-abs-path -fprofile-update=atomic" + CACHE STRING "Flags used by the C compiler during coverage builds." FORCE) +set (CMAKE_EXE_LINKER_FLAGS_COVERAGE + "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Wl,-lgcov" + CACHE STRING "Flags used for linking binaries during coverage builds." FORCE) +set (CMAKE_SHARED_LINKER_FLAGS_COVERAGE + "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -Wl,-lgcov" + CACHE STRING "Flags used by the shared libraries linker during coverage builds." FORCE) + +mark_as_advanced (CMAKE_CXX_FLAGS_COVERAGE CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_COVERAGE + CMAKE_SHARED_LINKER_FLAGS_COVERAGE) + +enable_testing () +add_subdirectory ("../unit" "${CMAKE_CURRENT_BINARY_DIR}/unit") diff --git a/test/documentation/sharg-doxygen.cmake b/test/documentation/sharg-doxygen.cmake index e5d2c9b5..280dc20b 100644 --- a/test/documentation/sharg-doxygen.cmake +++ b/test/documentation/sharg-doxygen.cmake @@ -52,7 +52,6 @@ ExternalProject_Add ( add_test (NAME cppreference-doxygen-web-tag COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target download-cppreference-doxygen-web-tag) - # doxygen does not show any warnings (doxygen prints warnings / errors to cerr) set (SHARG_TEST_DOXYGEN_FAIL_ON_WARNINGS " diff --git a/test/header/CMakeLists.txt b/test/header/CMakeLists.txt index 07f1d444..ef55d5b6 100644 --- a/test/header/CMakeLists.txt +++ b/test/header/CMakeLists.txt @@ -64,7 +64,6 @@ macro (sharg_header_test component header_base_path exclude_regex) endmacro () sharg_require_ccache () -sharg_require_benchmark () sharg_require_test () sharg_header_test (sharg "${SHARG_INCLUDE_DIR}" "") diff --git a/test/header/generate_header_source.cmake b/test/header/generate_header_source.cmake index e884b4ce..43eecb02 100644 --- a/test/header/generate_header_source.cmake +++ b/test/header/generate_header_source.cmake @@ -32,7 +32,6 @@ endif () file (APPEND "${HEADER_TARGET_SOURCE}" " #include -#include TEST(${HEADER_TEST_NAME_SAFE}) {}") # test that sharg headers include platform.hpp diff --git a/test/sharg-test.cmake b/test/sharg-test.cmake index 0fd558f4..8e81f30b 100644 --- a/test/sharg-test.cmake +++ b/test/sharg-test.cmake @@ -51,15 +51,6 @@ if (NOT TARGET sharg::test) add_library (sharg::test ALIAS sharg_test) endif () -# sharg::test::performance specifies required flags, includes and libraries -# needed for performance test cases in sharg/test/performance -if (NOT TARGET sharg::test::performance) - add_library (sharg_test_performance INTERFACE) - target_link_libraries (sharg_test_performance INTERFACE "sharg::test" "benchmark_main" "benchmark") - - add_library (sharg::test::performance ALIAS sharg_test_performance) -endif () - # sharg::test::unit specifies required flags, includes and libraries # needed for unit test cases in sharg/test/unit if (NOT TARGET sharg::test::unit) @@ -91,7 +82,6 @@ endif () if (NOT TARGET sharg::test::header) add_library (sharg_test_header INTERFACE) target_link_libraries (sharg_test_header INTERFACE "sharg::test::unit") - target_link_libraries (sharg_test_header INTERFACE "sharg::test::performance") target_compile_options (sharg_test_header INTERFACE "-Wno-unused-const-variable") target_compile_definitions (sharg_test_header INTERFACE -DSHARG_DISABLE_DEPRECATED_WARNINGS) target_compile_definitions (sharg_test_header INTERFACE -DSHARG_HEADER_TEST) @@ -115,6 +105,5 @@ list (APPEND SHARG_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_VERBOSE_MAKEFILE=${CMAKE include (sharg_test_component) include (sharg_test_files) include (sharg_require_ccache) -include (sharg_require_benchmark) include (sharg_require_test) include (add_subdirectories)