Skip to content

Commit

Permalink
Merge pull request #2502 from eseiler/infra/ci
Browse files Browse the repository at this point in the history
[INFRA] Update CI
  • Loading branch information
eseiler committed Oct 25, 2023
2 parents e91c71d + 059bfc8 commit d37bdec
Show file tree
Hide file tree
Showing 63 changed files with 298 additions and 544 deletions.
137 changes: 0 additions & 137 deletions .github/workflows/ci_icc.yml

This file was deleted.

152 changes: 64 additions & 88 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
name: CI on Linux
name: Linux

on:
push:
branches:
- 'main'
pull_request:
# Enables a manual trigger, may run on any branch
workflow_dispatch:

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

env:
CMAKE_VERSION: 3.12.4
TZ: Europe/Berlin

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

jobs:
build:
Expand All @@ -30,78 +28,66 @@ jobs:
fail-fast: false
matrix:
include:
- name: "gcc12 (c++23)"
cxx: "g++-12"
cc: "gcc-12"
- name: "clang17"
compiler: "clang-17"
build_type: Release
cxx_flags: "-std=c++23"

- name: "gcc11 (c++23)"
cxx: "g++-11"
cc: "gcc-11"
- name: "clang16"
compiler: "clang-16"
build_type: Release
cxx_flags: "-std=c++23"
cxx_flags: "-std=c++20"

- name: "gcc10 (c++20)"
cxx: "g++-10"
cc: "gcc-10"
- name: "clang15"
compiler: "clang-15"
build_type: Release
cxx_flags: "-std=c++20"

- name: "clang14 (c++23)"
cxx: "clang++-14"
cc: "clang-14"
- name: "gcc13"
compiler: "gcc-13"
build_type: Release
cxx_flags: "-std=c++2b"
cxx_flags: "-std=c++23"

- name: "clang13 (c++23)"
cxx: "clang++-13"
cc: "clang-13"
- name: "gcc12"
compiler: "gcc-12"
build_type: Release
cxx_flags: "-std=c++2b"
cxx_flags: "-std=c++20"

- name: "clang12 (c++20)"
cxx: "clang++-12"
cc: "clang-12"
- name: "gcc11"
compiler: "gcc-11"
build_type: Release
cxx_flags: "-std=c++20"

steps:
- name: Checkout SeqAn2
uses: actions/checkout@v4
with:
path: seqan
fetch-depth: 2
- name: "IntelLLVM"
compiler: "intel"
build_type: Release
cxx_flags: "-std=c++20 -fp-model=strict"

- name: Checkout SeqAn3
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: seqan/seqan3
ref: 39e696830bbdcde0e520c87811db3eb5e083d7c0
path: seqan3
fetch-depth: 1
submodules: false

- name: Configure APT
continue-on-error: true
run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh

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

- name: Install ccache
run: sudo apt-get install --yes ccache
- name: Setup toolchain
uses: seqan/actions/setup-toolchain@main
with:
compiler: ${{ matrix.compiler }}
ccache_size: 125M

- name: Install compiler ${{ matrix.cxx }}
run: sudo apt-get install --yes ${{ matrix.cxx }}
- name: Install dependencies
run: install libboost-dev libxml2-utils

- name: Tool versions
run: |
env cmake --version
env ${{ matrix.cxx }} --version
- name: Install OpenMP
if: contains(matrix.name, 'clang')
env:
SEQAN_CLANG: ${{ matrix.compiler }}
run: install libomp-${SEQAN_CLANG:6}-dev

- name: Install dependencies
run: sudo apt-get install --yes libboost-dev libbz2-dev libxml2-utils zlib1g-dev
- name: Install CMake
uses: seqan/actions/setup-cmake@main
with:
cmake: 3.27.7

- name: Setup Python
uses: actions/setup-python@v4
Expand All @@ -111,47 +97,37 @@ jobs:
- name: Install Python dependencies
run: |
pip install setuptools wheel
pip install -r seqan/manual/requirements.txt
- 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-
pip install -r manual/requirements.txt
- name: Configure tests
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
run: |
mkdir seqan-build
cd seqan-build
cmake ../seqan -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }} -Wextra -Werror" \
-DSEQAN_DISABLE_VERSION_CHECK=ON \
-DSEQAN_GH_ACTIONS_BUILD:BOOL=ON \
-DPython3_ROOT_DIR=${pythonLocation} \
-DPython3_EXECUTABLE=${pythonLocation}/bin/python3 \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }} -Wextra -Wall -pedantic -Werror" \
-DSEQAN_DISABLE_VERSION_CHECK=ON \
-DSEQAN_GH_ACTIONS_BUILD:BOOL=ON \
-DPython3_ROOT_DIR=${pythonLocation} \
-DPython3_EXECUTABLE=${pythonLocation}/bin/python3 \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build tests
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
CCACHE_MAXSIZE: 200M
run: |
cd seqan-build
ccache -z
cd build
make -k -j2
ccache -sv
- name: Run tests
continue-on-error: true
id: test
run: |
cd build
ctest . -j2 --output-on-failure --timeout 240
- name: Rerun failed tests
if: steps.test.outcome == 'failure'
run: |
cd seqan-build
ctest . -j2 --output-on-failure --timeout 240 || ctest . -j2 --output-on-failure --timeout 240 --rerun-failed
cd build
ctest . -j2 --output-on-failure --timeout 240 --rerun-failed

0 comments on commit d37bdec

Please sign in to comment.