Skip to content

Commit

Permalink
[INFRA] Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Jul 10, 2023
1 parent 098d32f commit ab593b1
Show file tree
Hide file tree
Showing 11 changed files with 254 additions and 498 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
compiler: [10, 11, 12]
compiler: [11, 12, 13]

steps:
- name: Checkout Sharg
Expand All @@ -40,30 +40,18 @@ jobs:
fetch-depth: 1
submodules: true

# To reuse scripts
- name: Checkout SeqAn3
uses: actions/checkout@v3
- name: Setup toolchain
uses: seqan/actions/setup-toolchain@main
with:
repository: seqan/seqan3
ref: aa3df18a6df59679e07e9fe2de4e0998a94af7e7
path: seqan3
fetch-depth: 1
submodules: false

- name: Configure APT
continue-on-error: true
run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh
compiler: gcc-${{ matrix.compiler }}
ccache_size: 75M

- name: Install CMake
run: bash ./seqan3/.github/workflows/scripts/install_cmake.sh

- name: Install compiler g++-${{ matrix.compiler }}
run: sudo apt-get install --yes g++-${{ matrix.compiler }}
uses: seqan/actions/setup-cmake@main
with:
cmake: 3.16.9

- name: Configure tests
env:
CXX: g++-${{ matrix.compiler }}
CC: gcc-${{ matrix.compiler }}
run: |
mkdir sharg-build
cd sharg-build
Expand Down
72 changes: 15 additions & 57 deletions .github/workflows/ci_coverage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI on Linux
name: Coverage

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

env:
CMAKE_VERSION: 3.16.9
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin

defaults:
run:
shell: bash -ex {0}
shell: bash -Eexuo pipefail {0}

jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-22.04
timeout-minutes: 120
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'clang-format'
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
strategy:
fail-fast: true
matrix:
include:
- name: "Coverage gcc12"
cxx: "g++-12"
cc: "gcc-12"
- name: "gcc13"
compiler: "gcc-13"
build: coverage
build_type: Debug
build_type: Coverage

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

# To reuse scripts
- name: Checkout SeqAn3
uses: actions/checkout@v3
- name: Setup toolchain
uses: seqan/actions/setup-toolchain@main
with:
repository: seqan/seqan3
ref: aa3df18a6df59679e07e9fe2de4e0998a94af7e7
path: seqan3
fetch-depth: 1
submodules: false

- name: Configure APT
continue-on-error: true
run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh
compiler: ${{ matrix.compiler }}
ccache_size: 125M

- name: Install CMake
run: bash ./seqan3/.github/workflows/scripts/install_cmake.sh

- name: Install ccache
run: |
conda install --yes --override-channels --channel conda-forge ccache
sudo ln -s $CONDA/bin/ccache /usr/bin/ccache
- name: Install compiler ${{ matrix.cxx }}
run: sudo apt-get install --yes ${{ matrix.cxx }}
uses: seqan/actions/setup-cmake@main
with:
cmake: 3.16.9

- name: Install gcovr
env:
CC: ${{ matrix.cc }}
run: |
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100
pip install gcovr==5.0
- name: Load ccache
uses: actions/cache@v3
with:
path: .ccache
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-
- name: Tool versions
run: |
env cmake --version
env ${{ matrix.cxx }} --version
pip install gcovr==6.0
- name: Configure tests
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
run: |
mkdir sharg-build
cd sharg-build
Expand All @@ -120,13 +83,8 @@ jobs:
- name: Build tests
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 12
CCACHE_MAXSIZE: 125M
CCACHE_IGNOREOPTIONS: "-fprofile-abs-path"
GCOV: ${{ github.workspace }}/seqan3/.github/workflows/scripts/gcov.sh
GCOV: ${{ github.workspace }}/sharg/.github/workflows/scripts/gcov.sh
run: |
ccache -z
cd sharg-build
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/ci_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Documentation

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:
group: documentation-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'push' }}

env:
TZ: Europe/Berlin

defaults:
run:
shell: bash -Eexuo pipefail {0}

jobs:
build:
name: Documentation
runs-on: ubuntu-22.04
timeout-minutes: 120
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true

- name: Install CMake
uses: seqan/actions/setup-cmake@main
with:
cmake: 3.16.9

- name: Install Doxygen
uses: seqan/actions/setup-doxygen@main
with:
doxygen: 1.9.5

- name: Configure tests
run: |
mkdir build
cd build
cmake ../test/documentation
make -j2 download-cppreference-doxygen-web-tag
- name: Run tests
run: |
cd build
ctest . -j2 --output-on-failure
80 changes: 21 additions & 59 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI on Linux
name: Unit Linux

on:
push:
Expand All @@ -16,42 +16,43 @@ on:

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

env:
CMAKE_VERSION: 3.16.9
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin

defaults:
run:
shell: bash -ex {0}
shell: bash -Eexuo pipefail {0}

jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-22.04
timeout-minutes: 120
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'clang-format'
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
strategy:
fail-fast: true
matrix:
include:
- name: "Unit gcc12"
cxx: "g++-12"
cc: "gcc-12"
- name: "clang17"
compiler: "clang-17"
build: unit
build_type: Release

- name: "Unit gcc11"
cxx: "g++-11"
cc: "gcc-11"
- name: "gcc13"
compiler: "gcc-13"
build: unit
build_type: Release

- name: "Unit gcc10"
cxx: "g++-10"
cc: "gcc-10"
- name: "gcc12"
compiler: "gcc-12"
build: unit
build_type: Release

- name: "gcc11"
compiler: "gcc-11"
build: unit
build_type: Release

Expand All @@ -63,51 +64,18 @@ jobs:
fetch-depth: 1
submodules: true

# To reuse scripts
- name: Checkout SeqAn3
uses: actions/checkout@v3
- name: Setup toolchain
uses: seqan/actions/setup-toolchain@main
with:
repository: seqan/seqan3
ref: aa3df18a6df59679e07e9fe2de4e0998a94af7e7
path: seqan3
fetch-depth: 1
submodules: false

- name: Configure APT
continue-on-error: true
run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh
compiler: ${{ matrix.compiler }}
ccache_size: 75M

- name: Install CMake
run: bash ./seqan3/.github/workflows/scripts/install_cmake.sh

- name: Install ccache
run: |
conda install --yes --override-channels --channel conda-forge ccache
sudo ln -s $CONDA/bin/ccache /usr/bin/ccache
- name: Install compiler ${{ matrix.cxx }}
run: sudo apt-get install --yes ${{ matrix.cxx }}

- name: Load ccache
uses: actions/cache@v3
uses: seqan/actions/setup-cmake@main
with:
path: .ccache
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }}
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }}
${{ runner.os }}-${{ matrix.name }}-ccache-
- name: Tool versions
run: |
env cmake --version
env ${{ matrix.cxx }} --version
cmake: 3.16.9

- name: Configure tests
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
run: |
mkdir sharg-build
cd sharg-build
Expand All @@ -117,12 +85,6 @@ jobs:
make -j2 gtest_build yaml-cpp
- name: Build tests
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 12
CCACHE_MAXSIZE: 50M
run: |
ccache -z
cd sharg-build
Expand Down
Loading

0 comments on commit ab593b1

Please sign in to comment.