Merge pull request #73 from h-2/gcc13 #244
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux CI | |
on: | |
push: | |
branches: | |
# Push events to branches matching refs/heads/master | |
- 'main' | |
# Push events to branches matching refs/heads/release* | |
- 'release*' | |
# Trigger after PR was unlabeled | |
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 | |
env: | |
TZ: Europe/Berlin | |
defaults: | |
run: | |
shell: bash -ex {0} | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os == '' && 'ubuntu-22.04' || matrix.os }} | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "Unit clang16 + clang-tidy" | |
cxx: "clang++-16" | |
cc: "clang-16" | |
pkg: "clang-16 clang-tidy-16 g++-12" | |
build: clang_tidy | |
build_type: Debug | |
- name: "Unit gcc10 Debug" | |
cxx: "g++-10" | |
cc: "gcc-10" | |
pkg: "gcc-10 g++-10" | |
build: unit | |
build_type: Debug | |
- name: "Unit gcc11 Release" | |
cxx: "g++-11" | |
cc: "gcc-11" | |
pkg: "gcc-11 g++-11" | |
build: unit | |
build_type: Release | |
- name: "Unit gcc12 ASAN+UBSAN" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
pkg: "gcc-12 g++-12" | |
build: unit | |
build_type: Debug | |
cxx_flags: "-fsanitize=address,undefined" | |
- name: "Unit gcc13 Debug" | |
cxx: "g++-13" | |
cc: "gcc-13" | |
pkg: "gcc-13 g++-13" | |
build: unit | |
build_type: Debug | |
- name: "Integration gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
pkg: "gcc-12 g++-12" | |
build: integration | |
build_type: Debug | |
- name: "Documentation" | |
pkg: "doxygen" | |
build: documentation | |
build_type: Debug | |
version: 1.9.6 | |
- name: "Clang Format" | |
pkg: "clang-format-16" | |
build: clang_format | |
build_type: Debug | |
- name: "Coverage gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
pkg: "gcc-12 g++-12" | |
build: coverage | |
build_type: Debug | |
- name: "Snippet gcc10" | |
cxx: "g++-10" | |
cc: "gcc-10" | |
pkg: "gcc-10 g++-10" | |
build: snippet | |
build_type: Debug | |
- name: "Snippet gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
pkg: "gcc-12 g++-12" | |
build: snippet | |
build_type: Release | |
- name: "Snippet Clang-16" | |
cxx: "clang++-16" | |
cc: "clang-16" | |
pkg: "clang-16 g++-12" | |
build: snippet | |
build_type: Release | |
- name: "Performance gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
pkg: "gcc-12 g++-12" | |
build: performance | |
build_type: Release | |
- name: "Header gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
pkg: "gcc-12 g++-12" | |
build: header | |
build_type: Release | |
steps: | |
- name: Checkout BioC++ | |
uses: actions/checkout@v2 | |
with: | |
path: biocpp-core | |
fetch-depth: 2 | |
submodules: true | |
#- name: Checkout SeqAn2 | |
#uses: actions/checkout@v2 | |
#with: | |
#repository: seqan/seqan | |
#ref: develop | |
#path: biocpp-core/submodules/seqan | |
#fetch-depth: 2 | |
- name: Configure APT (llvm) | |
continue-on-error: true | |
if: contains(matrix.pkg, 'clang') | |
run: | | |
sudo apt-add-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - | |
- name: Configure APT | |
continue-on-error: true | |
run: | | |
echo 'APT::Acquire::Retries "5";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null | |
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/ppa | |
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
- name: Install CMake | |
run: sudo apt-get install --yes cmake | |
- name: Install ccache | |
run: sudo apt-get install --yes ccache | |
- name: Install compiler/tool ${{ matrix.pkg }} | |
run: sudo apt-get install --yes ${{ matrix.pkg }} | |
- name: Install doxygen | |
if: matrix.build == 'documentation' | |
run: | | |
sudo apt-get install --yes texlive-font-utils ghostscript texlive-latex-extra graphviz | |
mkdir -p /tmp/doxygen-download | |
wget --retry-connrefused --waitretry=30 --read-timeout=30 --timeout=30 --tries=20 --no-clobber --quiet --directory-prefix=/tmp/doxygen-download/ https://github.com/doxygen/doxygen/releases/download/Release_$(echo ${{ matrix.version }} | sed -e 's/\./_/g')/doxygen-${{ matrix.version }}.linux.bin.tar.gz | |
tar -C /tmp/ -zxf /tmp/doxygen-download/doxygen-${{ matrix.version }}.linux.bin.tar.gz | |
echo "/tmp/doxygen-${{ matrix.version }}/bin" >> $GITHUB_PATH # Only available in subsequent steps! | |
- name: Install gcovr | |
if: matrix.build == 'coverage' | |
env: | |
CC: ${{ matrix.cc }} | |
run: | | |
sudo apt-get install --yes gcovr | |
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/${CC/gcc/gcov} 100 | |
- name: Load ccache | |
if: matrix.build != 'documentation' | |
uses: actions/cache@v2 | |
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 | |
- name: Configure tests | |
env: | |
CXX: ${{ matrix.cxx }} | |
CC: ${{ matrix.cc }} | |
run: | | |
mkdir biocpp-core-build | |
cd biocpp-core-build | |
cmake ../biocpp-core/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" | |
- name: Build tests | |
env: | |
CCACHE_BASEDIR: ${{ github.workspace }} | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_COMPRESS: true | |
CCACHE_COMPRESSLEVEL: 12 | |
CCACHE_MAXSIZE: ${{ matrix.build == 'coverage' && '525M' || '75M' }} | |
CCACHE_IGNOREOPTIONS: "-fprofile-abs-path" | |
run: | | |
ccache -z | |
cd biocpp-core-build | |
make -k -j2 | |
ccache -sv | |
- name: Run tests | |
if: ${{ matrix.build != 'coverage' && matrix.build != 'clang_format' }} | |
run: | | |
cd biocpp-core-build | |
ctest . -j2 --output-on-failure | |
- name: Submit coverage build | |
if: matrix.build == 'coverage' | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ${{ github.workspace }}/biocpp-core-build/biocpp_coverage.xml | |
root_dir: ${{ github.workspace }}/biocpp-core |