Skip to content

format source code

format source code #24

Workflow file for this run

name: Linux builds
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
strategy:
matrix:
cxx:
# - g++-6
# - g++-7
# - g++-8
- g++-9
- g++-10
- g++-11
- g++-12
# - clang++-6.0
# - clang++-7
# - clang++-8
# - clang++-9
# - clang++-10
- clang++-12
- clang++-13
- clang++-14
build_type: [Debug, Release]
std: [14]
include:
# cannot be installed on ubuntu-20.04 be default?
# - cxx: g++-6
# other_pkgs: g++-6
# - cxx: g++-7
# other_pkgs: g++-7
# - cxx: g++-8
# other_pkgs: g++-8
- cxx: g++-9
other_pkgs: g++-9
- cxx: g++-10
other_pkgs: g++-10
- cxx: g++-11
other_pkgs: g++-11
- cxx: g++-12
other_pkgs: g++-12
# - cxx: clang++-6.0
# other_pkgs: clang-6.0
# - cxx: clang++-7
# other_pkgs: clang-7
# - cxx: clang++-8
# other_pkgs: clang-8
# - cxx: clang++-9
# other_pkgs: clang-9
# - cxx: clang++-10
# other_pkgs: clang-10
- cxx: clang++-12
other_pkgs: clang-12
- cxx: clang++-13
other_pkgs: clang-13
- cxx: clang++-14
other_pkgs: clang-14
# Clang 6 + C++17
# does not work with the default libstdc++ version thanks
# to a disagreement on variant implementation.
# - cxx: clang++-6.0
# build_type: Debug
# std: 17
# other_pkgs: clang-6.0
# - cxx: clang++-6.0
# build_type: Release
# std: 17
# other_pkgs: clang-6.0
# Clang 10 + C++17
# - cxx: clang++-10
# build_type: Debug
# std: 17
# other_pkgs: clang-10
# - cxx: clang++-10
# build_type: Release
# std: 17
# other_pkgs: clang-10
# Clang 14 + C++17
- cxx: clang++-14
build_type: Debug
std: 17
other_pkgs: clang-14
- cxx: clang++-14
build_type: Release
std: 17
other_pkgs: clang-14
steps:
- uses: actions/checkout@v2
# Install dependencies
- name: Install boost
run: |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev
- name: Prepare environment
run: sudo apt-get install -y ninja-build ${{matrix.other_pkgs}}
- name: Configure cmake
working-directory: ${{runner.workspace}}
env:
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
# Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}.
# This is important
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
cmake -B${{github.workspace}}/build -H$GITHUB_WORKSPACE \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
-DCMAKE_CXX_EXTENSIONS=OFF \
-G Ninja
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{matrix.build_type}}