Skip to content

Commit ab593b1

Browse files
committed
[INFRA] Update CI
1 parent 098d32f commit ab593b1

File tree

11 files changed

+254
-498
lines changed

11 files changed

+254
-498
lines changed

.github/workflows/api.yml

+8-20
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
compiler: [10, 11, 12]
33+
compiler: [11, 12, 13]
3434

3535
steps:
3636
- name: Checkout Sharg
@@ -40,30 +40,18 @@ jobs:
4040
fetch-depth: 1
4141
submodules: true
4242

43-
# To reuse scripts
44-
- name: Checkout SeqAn3
45-
uses: actions/checkout@v3
43+
- name: Setup toolchain
44+
uses: seqan/actions/setup-toolchain@main
4645
with:
47-
repository: seqan/seqan3
48-
ref: aa3df18a6df59679e07e9fe2de4e0998a94af7e7
49-
path: seqan3
50-
fetch-depth: 1
51-
submodules: false
52-
53-
- name: Configure APT
54-
continue-on-error: true
55-
run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh
46+
compiler: gcc-${{ matrix.compiler }}
47+
ccache_size: 75M
5648

5749
- name: Install CMake
58-
run: bash ./seqan3/.github/workflows/scripts/install_cmake.sh
59-
60-
- name: Install compiler g++-${{ matrix.compiler }}
61-
run: sudo apt-get install --yes g++-${{ matrix.compiler }}
50+
uses: seqan/actions/setup-cmake@main
51+
with:
52+
cmake: 3.16.9
6253

6354
- name: Configure tests
64-
env:
65-
CXX: g++-${{ matrix.compiler }}
66-
CC: gcc-${{ matrix.compiler }}
6755
run: |
6856
mkdir sharg-build
6957
cd sharg-build

.github/workflows/ci_coverage.yml

+15-57
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI on Linux
1+
name: Coverage
22

33
on:
44
push:
@@ -20,29 +20,27 @@ concurrency:
2020
cancel-in-progress: false # PRs will be canceled by the clang-format CI
2121

2222
env:
23-
CMAKE_VERSION: 3.16.9
2423
SHARG_NO_VERSION_CHECK: 1
2524
TZ: Europe/Berlin
2625

2726
defaults:
2827
run:
29-
shell: bash -ex {0}
28+
shell: bash -Eexuo pipefail {0}
3029

3130
jobs:
3231
build:
3332
name: ${{ matrix.name }}
3433
runs-on: ubuntu-22.04
3534
timeout-minutes: 120
36-
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'clang-format'
35+
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
3736
strategy:
3837
fail-fast: true
3938
matrix:
4039
include:
41-
- name: "Coverage gcc12"
42-
cxx: "g++-12"
43-
cc: "gcc-12"
40+
- name: "gcc13"
41+
compiler: "gcc-13"
4442
build: coverage
45-
build_type: Debug
43+
build_type: Coverage
4644

4745
steps:
4846
# How many commits do we need to fetch to also fetch the branch point?
@@ -57,58 +55,23 @@ jobs:
5755
fetch-depth: ${{ steps.fetch_depth.outputs.depth }}
5856
submodules: true
5957

60-
# To reuse scripts
61-
- name: Checkout SeqAn3
62-
uses: actions/checkout@v3
58+
- name: Setup toolchain
59+
uses: seqan/actions/setup-toolchain@main
6360
with:
64-
repository: seqan/seqan3
65-
ref: aa3df18a6df59679e07e9fe2de4e0998a94af7e7
66-
path: seqan3
67-
fetch-depth: 1
68-
submodules: false
69-
70-
- name: Configure APT
71-
continue-on-error: true
72-
run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh
61+
compiler: ${{ matrix.compiler }}
62+
ccache_size: 125M
7363

7464
- name: Install CMake
75-
run: bash ./seqan3/.github/workflows/scripts/install_cmake.sh
76-
77-
- name: Install ccache
78-
run: |
79-
conda install --yes --override-channels --channel conda-forge ccache
80-
sudo ln -s $CONDA/bin/ccache /usr/bin/ccache
81-
82-
- name: Install compiler ${{ matrix.cxx }}
83-
run: sudo apt-get install --yes ${{ matrix.cxx }}
65+
uses: seqan/actions/setup-cmake@main
66+
with:
67+
cmake: 3.16.9
8468

8569
- name: Install gcovr
86-
env:
87-
CC: ${{ matrix.cc }}
8870
run: |
8971
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100
90-
pip install gcovr==5.0
91-
92-
- name: Load ccache
93-
uses: actions/cache@v3
94-
with:
95-
path: .ccache
96-
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }}
97-
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
98-
restore-keys: |
99-
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}
100-
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }}
101-
${{ runner.os }}-${{ matrix.name }}-ccache-
102-
103-
- name: Tool versions
104-
run: |
105-
env cmake --version
106-
env ${{ matrix.cxx }} --version
72+
pip install gcovr==6.0
10773
10874
- name: Configure tests
109-
env:
110-
CXX: ${{ matrix.cxx }}
111-
CC: ${{ matrix.cc }}
11275
run: |
11376
mkdir sharg-build
11477
cd sharg-build
@@ -120,13 +83,8 @@ jobs:
12083
12184
- name: Build tests
12285
env:
123-
CCACHE_BASEDIR: ${{ github.workspace }}
124-
CCACHE_DIR: ${{ github.workspace }}/.ccache
125-
CCACHE_COMPRESS: true
126-
CCACHE_COMPRESSLEVEL: 12
127-
CCACHE_MAXSIZE: 125M
12886
CCACHE_IGNOREOPTIONS: "-fprofile-abs-path"
129-
GCOV: ${{ github.workspace }}/seqan3/.github/workflows/scripts/gcov.sh
87+
GCOV: ${{ github.workspace }}/sharg/.github/workflows/scripts/gcov.sh
13088
run: |
13189
ccache -z
13290
cd sharg-build
+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
# Push events to branches matching refs/heads/main
7+
- 'main'
8+
# Push events to branches matching refs/heads/release*
9+
- 'release*'
10+
# Trigger after PR was unlabeled
11+
pull_request:
12+
types:
13+
- unlabeled
14+
# Enables a manual trigger, may run on any branch
15+
workflow_dispatch:
16+
17+
concurrency:
18+
group: documentation-${{ github.event.pull_request.number || github.ref }}
19+
cancel-in-progress: ${{ github.event_name != 'push' }}
20+
21+
env:
22+
TZ: Europe/Berlin
23+
24+
defaults:
25+
run:
26+
shell: bash -Eexuo pipefail {0}
27+
28+
jobs:
29+
build:
30+
name: Documentation
31+
runs-on: ubuntu-22.04
32+
timeout-minutes: 120
33+
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v3
37+
with:
38+
fetch-depth: 1
39+
submodules: true
40+
41+
- name: Install CMake
42+
uses: seqan/actions/setup-cmake@main
43+
with:
44+
cmake: 3.16.9
45+
46+
- name: Install Doxygen
47+
uses: seqan/actions/setup-doxygen@main
48+
with:
49+
doxygen: 1.9.5
50+
51+
- name: Configure tests
52+
run: |
53+
mkdir build
54+
cd build
55+
cmake ../test/documentation
56+
make -j2 download-cppreference-doxygen-web-tag
57+
58+
- name: Run tests
59+
run: |
60+
cd build
61+
ctest . -j2 --output-on-failure

.github/workflows/ci_linux.yml

+21-59
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI on Linux
1+
name: Unit Linux
22

33
on:
44
push:
@@ -16,42 +16,43 @@ on:
1616

1717
concurrency:
1818
group: linux-${{ github.event.pull_request.number || github.ref }}
19-
cancel-in-progress: ${{ github.event_name == 'push' }}
19+
cancel-in-progress: ${{ github.event_name != 'push' }}
2020

2121
env:
22-
CMAKE_VERSION: 3.16.9
2322
SHARG_NO_VERSION_CHECK: 1
2423
TZ: Europe/Berlin
2524

2625
defaults:
2726
run:
28-
shell: bash -ex {0}
27+
shell: bash -Eexuo pipefail {0}
2928

3029
jobs:
3130
build:
3231
name: ${{ matrix.name }}
3332
runs-on: ubuntu-22.04
3433
timeout-minutes: 120
35-
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'clang-format'
34+
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
3635
strategy:
3736
fail-fast: true
3837
matrix:
3938
include:
40-
- name: "Unit gcc12"
41-
cxx: "g++-12"
42-
cc: "gcc-12"
39+
- name: "clang17"
40+
compiler: "clang-17"
4341
build: unit
4442
build_type: Release
4543

46-
- name: "Unit gcc11"
47-
cxx: "g++-11"
48-
cc: "gcc-11"
44+
- name: "gcc13"
45+
compiler: "gcc-13"
4946
build: unit
5047
build_type: Release
5148

52-
- name: "Unit gcc10"
53-
cxx: "g++-10"
54-
cc: "gcc-10"
49+
- name: "gcc12"
50+
compiler: "gcc-12"
51+
build: unit
52+
build_type: Release
53+
54+
- name: "gcc11"
55+
compiler: "gcc-11"
5556
build: unit
5657
build_type: Release
5758

@@ -63,51 +64,18 @@ jobs:
6364
fetch-depth: 1
6465
submodules: true
6566

66-
# To reuse scripts
67-
- name: Checkout SeqAn3
68-
uses: actions/checkout@v3
67+
- name: Setup toolchain
68+
uses: seqan/actions/setup-toolchain@main
6969
with:
70-
repository: seqan/seqan3
71-
ref: aa3df18a6df59679e07e9fe2de4e0998a94af7e7
72-
path: seqan3
73-
fetch-depth: 1
74-
submodules: false
75-
76-
- name: Configure APT
77-
continue-on-error: true
78-
run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh
70+
compiler: ${{ matrix.compiler }}
71+
ccache_size: 75M
7972

8073
- name: Install CMake
81-
run: bash ./seqan3/.github/workflows/scripts/install_cmake.sh
82-
83-
- name: Install ccache
84-
run: |
85-
conda install --yes --override-channels --channel conda-forge ccache
86-
sudo ln -s $CONDA/bin/ccache /usr/bin/ccache
87-
88-
- name: Install compiler ${{ matrix.cxx }}
89-
run: sudo apt-get install --yes ${{ matrix.cxx }}
90-
91-
- name: Load ccache
92-
uses: actions/cache@v3
74+
uses: seqan/actions/setup-cmake@main
9375
with:
94-
path: .ccache
95-
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }}
96-
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
97-
restore-keys: |
98-
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}
99-
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }}
100-
${{ runner.os }}-${{ matrix.name }}-ccache-
101-
102-
- name: Tool versions
103-
run: |
104-
env cmake --version
105-
env ${{ matrix.cxx }} --version
76+
cmake: 3.16.9
10677

10778
- name: Configure tests
108-
env:
109-
CXX: ${{ matrix.cxx }}
110-
CC: ${{ matrix.cc }}
11179
run: |
11280
mkdir sharg-build
11381
cd sharg-build
@@ -117,12 +85,6 @@ jobs:
11785
make -j2 gtest_build yaml-cpp
11886
11987
- name: Build tests
120-
env:
121-
CCACHE_BASEDIR: ${{ github.workspace }}
122-
CCACHE_DIR: ${{ github.workspace }}/.ccache
123-
CCACHE_COMPRESS: true
124-
CCACHE_COMPRESSLEVEL: 12
125-
CCACHE_MAXSIZE: 50M
12688
run: |
12789
ccache -z
12890
cd sharg-build

0 commit comments

Comments
 (0)