Skip to content

Setup github actions based CI #16

Setup github actions based CI

Setup github actions based CI #16

Workflow file for this run

name: Build
on: push
jobs:
build:
strategy:
matrix:
build_type:
- Release
- Debug
include:
- os: ubuntu-22.04
compiler: g++
compiler_package: g++
boost_version: '1.74'
- os: ubuntu-22.04
compiler: g++
compiler_package: g++
boost_version: '1.74'
- os: ubuntu-22.04
compiler: clang++
compiler_package: clang
boost_version: '1.74'
- os: ubuntu-22.04
compiler: clang++
compiler_package: clang
boost_version: '1.74'
name: Build ${{ matrix.build_type }} with ${{ matrix.compiler }} and boost ${{ matrix.boost_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update apt-get
run: sudo apt-get update
- name: Install apt packages for dependencies
run: >
sudo apt-get install -y --no-install-recommends
ccache
cmake
libboost-atomic${{ matrix.boost_version }}-dev
libboost-context${{ matrix.boost_version }}-dev
libboost-coroutine${{ matrix.boost_version }}-dev
libboost-date-time${{ matrix.boost_version }}-dev
libboost-thread${{ matrix.boost_version }}-dev
ninja-build
${{ matrix.compiler_package }}
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}
max-size: 1G
- name: Configure
run: >
cmake
-B build
-S .
-G Ninja
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }}
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
-D CMAKE_CXX_COMPILER=${{ matrix.compiler }}
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache
-D RESOURCE_POOL_BUILD_TESTS=ON
-D RESOURCE_POOL_BUILD_EXAMPLES=ON
-D RESOURCE_POOL_BUILD_BENCHMARKS=ON
- name: Build
run: cmake --build build
- name: Install
run: cmake --install build