Skip to content

[MISC] Update example #94

[MISC] Update example

[MISC] Update example #94

Workflow file for this run

# SPDX-FileCopyrightText: 2006-2024, Knut Reinert & Freie Universität Berlin
# SPDX-FileCopyrightText: 2016-2024, Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: CC0-1.0
name: CMake
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:
concurrency:
group: cmake-${{ 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: ${{ matrix.name }}
runs-on: ubuntu-22.04
if: github.repository_owner == 'deNBI-cibi' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
include:
- name: "Install"
yaml_cpp: true
- name: "Install (no yaml-cpp)"
yaml_cpp: false
container:
image: ghcr.io/seqan/gcc-14
volumes:
- /home/runner:/home/runner
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install yaml-cpp
run: |
git clone --single-branch --branch 0.8.0 https://github.com/jbeder/yaml-cpp.git && cd yaml-cpp
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DYAML_CPP_BUILD_TESTS=OFF \
-DYAML_CPP_BUILD_TOOLS=OFF \
-DYAML_CPP_BUILD_CONTRIB=OFF \
-DYAML_BUILD_SHARED_LIBS=OFF \
-DYAML_CPP_INSTALL=ON \
-DCMAKE_CXX_FLAGS="-w"
make -k
make install
- name: Build and install TDL
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCPM_USE_LOCAL_PACKAGES=${{ matrix.yaml_cpp == true && 'ON' || 'OFF' }}
TDL_INSTALL_DIR=$(pwd)/test_install
echo "TDL_INSTALL_DIR=${TDL_INSTALL_DIR}" >> $GITHUB_ENV
make DESTDIR="${TDL_INSTALL_DIR}" -k install
- name: Test installation
run: |
mkdir build_example && cd build_example
cmake ../src/test_tdl/example -DCMAKE_BUILD_TYPE=Release \
-DTDL_INSTALL_DIR="${TDL_INSTALL_DIR}/usr/local"
make -k
ctest . -j --output-on-failure