Skip to content

Commit

Permalink
[INFRA] Simplify CI a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Mar 13, 2024
1 parent 2bca06a commit 5c6880e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 48 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/ci_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ on:

concurrency:
group: coverage-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
cancel-in-progress: ${{ github.event_name != 'push' }}

env:
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin

defaults:
Expand All @@ -34,16 +33,10 @@ jobs:
compiler: "gcc-13"

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
fetch-depth: 0

- name: Setup toolchain
uses: seqan/actions/setup-toolchain@main
Expand All @@ -61,7 +54,7 @@ jobs:
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100
pip install gcovr==6.0
- name: Configure tests
- name: Configure
run: |
mkdir build
cd build
Expand All @@ -70,24 +63,19 @@ jobs:
-DCMAKE_C_FLAGS="--coverage -fprofile-arcs -ftest-coverage -Werror" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-lgcov" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-lgcov"
make -j2 -k gtest_main yaml-cpp
- name: Build tests
- name: Build and run tests
run: |
ccache -z
cd build
make -j2 -k check
ccache -sv
- name: Generate coverage report
run: |
gcovr --gcov-executable ${{ github.workspace }}/.github/workflows/scripts/gcov.sh \
--root ${{ github.workspace }}/test \
--root ${{ github.workspace }} \
${{ github.workspace }}/build \
--filter ${{ github.workspace }}/include \
--filter ${{ github.workspace }}/src \
--exclude-lines-by-pattern '^\s*$' \
--exclude-lines-by-pattern '^\s*};$' \
--exclude-unreachable-branches \
--exclude-throw-branches \
--exclude-noncode-lines \
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ concurrency:
cancel-in-progress: ${{ github.event_name != 'push' }}

env:
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin

defaults:
Expand All @@ -32,31 +31,24 @@ jobs:
include:
- name: "clang17"
compiler: "clang-17"
build: unit
build_type: Release
cxx_flags: "-stdlib=libc++"

- 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

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false

- name: Setup toolchain
uses: seqan/actions/setup-toolchain@main
Expand All @@ -75,12 +67,6 @@ jobs:
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }} -Werror"
make -j2 -k gtest_main yaml-cpp
- name: Build application
run: |
cd build
make -j2 -k
- name: Build and run tests
run: |
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ concurrency:
cancel-in-progress: ${{ github.event_name != 'push' }}

env:
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin

defaults:
Expand All @@ -32,31 +31,24 @@ jobs:
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

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false

- name: Setup toolchain
uses: seqan/actions/setup-toolchain@main
Expand All @@ -75,12 +67,6 @@ jobs:
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }} -Werror"
make -j3 -k gtest_main yaml-cpp
- name: Build application
run: |
cd build
make -j3 -k
- name: Build and run tests
run: |
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false

- name: Run clang-format
uses: DoozyX/[email protected]
Expand Down

0 comments on commit 5c6880e

Please sign in to comment.