Skip to content

Commit d2b2dd2

Browse files
authored
Merge pull request #249 from eseiler/infra/deps
[INFRA] Update dependencies and CI
2 parents f48073b + b481282 commit d2b2dd2

File tree

13 files changed

+358
-275
lines changed

13 files changed

+358
-275
lines changed

.codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ coverage:
1616
if_ci_failed: success # per default, codecov would fail if any CI fails
1717
informational: true # the codecov/patch status is never "fail"
1818
only_pulls: true # only post codecov/patch status on PRs
19+
20+
parsers:
21+
cobertura:
22+
partials_as_hits: true

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2+
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
6+
7+
version: 2
8+
updates:
9+
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"

.github/workflows/ci_codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CodeQL
2+
3+
on:
4+
schedule:
5+
- cron: "0 6 * * SAT"
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: codeql-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
SHARG_NO_VERSION_CHECK: 1
14+
TZ: Europe/Berlin
15+
16+
defaults:
17+
run:
18+
shell: bash -Eeuxo pipefail {0}
19+
20+
jobs:
21+
codeql:
22+
name: CodeQL
23+
runs-on: ubuntu-latest
24+
permissions:
25+
security-events: write
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v3
32+
with:
33+
languages: cpp
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v3
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v3
40+
with:
41+
category: "/language:cpp"

.github/workflows/ci_coverage.yml

Lines changed: 34 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,89 +19,70 @@ env:
1919

2020
defaults:
2121
run:
22-
shell: bash -Eexuo pipefail {0}
22+
shell: bash -Eeuxo pipefail {0}
2323

2424
jobs:
2525
build:
26-
name: ${{ matrix.name }}
27-
runs-on: ubuntu-22.04
28-
timeout-minutes: 120
26+
runs-on: ubuntu-latest
27+
name: ${{ matrix.compiler }}
2928
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
3029
strategy:
3130
fail-fast: false
3231
matrix:
33-
include:
34-
- name: "gcc13"
35-
compiler: "gcc-13"
36-
build_type: Coverage
37-
32+
compiler: ["gcc-14"]
33+
container:
34+
image: ghcr.io/seqan/${{ matrix.compiler }}
35+
volumes:
36+
- /home/runner:/home/runner
3837
steps:
39-
# How many commits do we need to fetch to also fetch the branch point?
40-
- name: Get fetch depth
41-
id: fetch_depth
42-
run: echo "depth=$(( ${{ github.event.pull_request.commits }} + 2 ))" >> $GITHUB_OUTPUT
43-
4438
- name: Checkout
45-
uses: actions/checkout@v3
46-
with:
47-
fetch-depth: ${{ steps.fetch_depth.outputs.depth }}
48-
49-
- name: Setup toolchain
50-
uses: seqan/actions/setup-toolchain@main
39+
uses: actions/checkout@v4
5140
with:
52-
compiler: ${{ matrix.compiler }}
53-
ccache_size: 200M
41+
fetch-depth: 0
5442

55-
- name: Install CMake
56-
uses: seqan/actions/setup-cmake@main
43+
- name: Load ccache
44+
uses: actions/cache@v4
5745
with:
58-
cmake: 3.25.3
59-
60-
- name: Install gcovr
61-
run: |
62-
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100
63-
pip install gcovr==6.0
46+
path: /home/runner/.ccache
47+
save-always: true
48+
key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}
6449

6550
- name: Configure tests
6651
run: |
67-
mkdir build
68-
cd build
69-
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
52+
mkdir build && cd build
53+
cmake .. -DCMAKE_BUILD_TYPE=Coverage \
7054
-DCMAKE_CXX_FLAGS="-Werror -Wno-interference-size"
71-
make -j2 gtest_main
55+
make gtest_main
7256
7357
- name: Build tests
58+
working-directory: build
7459
run: |
7560
ccache -z
76-
cd build
77-
make -k -j2 api_test cli_test display_layout measure_hyperloglog
78-
ccache -sv
61+
make -k api_test cli_test display_layout measure_hyperloglog
62+
ccache -svvx
7963
8064
- name: Run tests
81-
run: |
82-
cd build
83-
ctest . -j2 --output-on-failure
65+
working-directory: build
66+
run: ctest . -j --output-on-failure
8467

8568
- name: Generate coverage report
8669
run: |
87-
gcovr --gcov-executable ${{ github.workspace }}/.github/workflows/scripts/gcov.sh \
88-
--root ${{ github.workspace }}/test/coverage \
89-
${{ github.workspace }}/build \
90-
--filter ${{ github.workspace }}/include \
91-
--filter ${{ github.workspace }}/src \
92-
--exclude ${{ github.workspace }}/src/util \
70+
gcovr --root ${GITHUB_WORKSPACE}/test/coverage \
71+
${GITHUB_WORKSPACE}/build \
72+
--filter ${GITHUB_WORKSPACE}/include \
73+
--filter ${GITHUB_WORKSPACE}/src \
74+
--exclude ${GITHUB_WORKSPACE}/src/util \
9375
--exclude-lines-by-pattern '^\s*$' \
9476
--exclude-lines-by-pattern '^\s*};$' \
95-
--exclude-lines-by-pattern '^.*GCOVR_EXCL_LINE.*$' \
9677
--exclude-unreachable-branches \
9778
--exclude-throw-branches \
9879
--exclude-noncode-lines \
99-
-j 2 \
100-
--xml \
101-
--output ${{ github.workspace }}/build/coverage_report.xml
80+
-j \
81+
--cobertura \
82+
--output ${GITHUB_WORKSPACE}/build/coverage_report.xml
10283
103-
- name: Submit coverage build
104-
uses: codecov/codecov-action@v3
84+
- name: Submit coverage report
85+
uses: codecov/codecov-action@v3.1.5
10586
with:
106-
files: ${{ github.workspace }}/build/coverage_report.xml
87+
files: build/coverage_report.xml
10788
fail_ci_if_error: false

.github/workflows/ci_documentation.yml

Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,39 @@ on:
44
push:
55
branches:
66
- 'main'
7-
pull_request:
7+
pull_request_target:
88
types:
99
- unlabeled
10+
- closed
1011
workflow_dispatch:
1112

1213
concurrency:
1314
group: documentation-${{ github.event.pull_request.number || github.ref }}
1415
cancel-in-progress: ${{ github.event_name != 'push' }}
1516

1617
env:
17-
SHARG_NO_VERSION_CHECK: 1
1818
TZ: Europe/Berlin
1919

2020
defaults:
2121
run:
22-
shell: bash -Eexuo pipefail {0}
22+
shell: bash -Eeuxo pipefail {0}
2323

2424
jobs:
2525
build:
2626
name: Documentation
27-
runs-on: ubuntu-22.04
28-
timeout-minutes: 120
29-
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
27+
runs-on: ubuntu-latest
28+
if: ( github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' ) && github.event.action != 'closed'
3029
steps:
3130
- name: Checkout
32-
uses: actions/checkout@v3
33-
with:
34-
fetch-depth: 1
31+
if: github.event_name != 'pull_request_target'
32+
uses: actions/checkout@v4
3533

36-
- name: Install CMake
37-
uses: seqan/actions/setup-cmake@main
34+
# pull_request_target does not checkout the merge commit by default
35+
- name: Checkout
36+
if: github.event_name == 'pull_request_target'
37+
uses: actions/checkout@v4
3838
with:
39-
cmake: 3.25.3
39+
ref: "refs/pull/${{ github.event.number }}/merge"
4040

4141
- name: Install Doxygen
4242
uses: seqan/actions/setup-doxygen@main
@@ -45,24 +45,45 @@ jobs:
4545

4646
- name: Configure tests
4747
run: |
48-
mkdir build
49-
cd build
48+
mkdir build && cd build
5049
cmake ..
5150
5251
- name: Run tests
52+
working-directory: build
5353
run: |
54-
cd build
55-
make -k -j2 doc 2>doxygen_warnings.txt
54+
make -k doc 2>doxygen_warnings.txt
5655
cat doxygen_warnings.txt
5756
test ! -s doxygen_warnings.txt
5857
59-
- name: Package documentation
60-
continue-on-error: true
61-
run: tar -zcf documentation.tar.gz build
58+
- name: Deploy Preview
59+
if: github.event_name == 'pull_request_target'
60+
uses: seqan/actions/documentation_deploy_preview@main
61+
with:
62+
deploy_host: ${{ secrets.DEPLOY_HOST }}
63+
deploy_user: ${{ secrets.DEPLOY_USER }}
64+
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
65+
deploy_base_path: ${{ secrets.DEPLOY_PREVIEW_BASE_PATH }}
66+
source_path_user_doc: build/doc/html
67+
token: ${{ secrets.SEQAN_ACTIONS_PAT }}
6268

63-
- name: Upload documentation
64-
continue-on-error: true
65-
uses: actions/upload-artifact@v3
69+
- name: Deploy Documentation
70+
if: github.event_name == 'push'
71+
uses: seqan/actions/documentation_deploy_production@main
72+
with:
73+
deploy_host: ${{ secrets.DEPLOY_HOST }}
74+
deploy_user: ${{ secrets.DEPLOY_USER }}
75+
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
76+
source_path_user_doc: build/doc/html
77+
deploy_path_user_doc: ${{ secrets.DEPLOY_PRODUCTION_BASE_PATH }}/main
78+
delete:
79+
name: Delete Preview
80+
runs-on: ubuntu-latest
81+
if: github.repository_owner == 'seqan' && github.event_name == 'pull_request_target' && github.event.action == 'closed'
82+
steps:
83+
- name: Delete Preview
84+
uses: seqan/actions/documentation_delete_preview@main
6685
with:
67-
name: documentation
68-
path: documentation.tar.gz
86+
deploy_host: ${{ secrets.DEPLOY_HOST }}
87+
deploy_user: ${{ secrets.DEPLOY_USER }}
88+
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
89+
deploy_base_path: ${{ secrets.DEPLOY_PREVIEW_BASE_PATH }}

.github/workflows/ci_header.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Header
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
types:
9+
- unlabeled
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: misc-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: ${{ github.event_name != 'push' }}
15+
16+
env:
17+
SHARG_NO_VERSION_CHECK: 1
18+
TZ: Europe/Berlin
19+
20+
defaults:
21+
run:
22+
shell: bash -Eeuxo pipefail {0}
23+
24+
jobs:
25+
build:
26+
name: ${{ matrix.compiler }}
27+
runs-on: ubuntu-latest
28+
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
compiler: ["clang-18", "gcc-14", "gcc-12", "intel"]
33+
include:
34+
- cxx_flags: "-Wno-interference-size"
35+
- compiler: "clang-18"
36+
cxx_flags: ""
37+
- compiler: "intel"
38+
cxx_flags: "-fp-model=strict -Wno-overriding-option"
39+
container:
40+
image: ghcr.io/seqan/${{ matrix.compiler }}
41+
volumes:
42+
- /home/runner:/home/runner
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
47+
- name: Load ccache
48+
uses: actions/cache@v4
49+
with:
50+
path: /home/runner/.ccache
51+
save-always: true
52+
key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}
53+
54+
- name: Configure tests
55+
run: |
56+
mkdir build && cd build
57+
cmake .. -DCMAKE_BUILD_TYPE=Release \
58+
-DCMAKE_CXX_FLAGS="-Werror ${{ matrix.cxx_flags }}" \
59+
-DCHOPPER_HEADER_TEST_ONLY=ON
60+
61+
- name: Build tests
62+
working-directory: build
63+
run: |
64+
ccache -z
65+
make -k test
66+
ccache -svvx
67+
68+
- name: Run tests
69+
working-directory: build
70+
run: ctest . -j --output-on-failure

0 commit comments

Comments
 (0)