2021-04-30 14:02:30 +02:00
|
|
|
name: Linux builds (basic)
|
2020-11-27 21:10:34 +01:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-04-30 14:02:30 +02:00
|
|
|
name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
|
2020-11-27 21:10:34 +01:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-11-28 14:34:34 +01:00
|
|
|
cxx:
|
2022-09-14 21:12:42 +02:00
|
|
|
- g++-5
|
|
|
|
- g++-6
|
2020-11-27 21:10:34 +01:00
|
|
|
- g++-7
|
|
|
|
- g++-8
|
|
|
|
- g++-9
|
|
|
|
- g++-10
|
2020-11-28 23:20:05 +01:00
|
|
|
- clang++-6.0
|
|
|
|
- clang++-7
|
2020-11-27 21:10:34 +01:00
|
|
|
- clang++-8
|
|
|
|
- clang++-9
|
2020-11-28 23:20:05 +01:00
|
|
|
- clang++-10
|
2020-11-27 21:10:34 +01:00
|
|
|
build_type: [Debug, Release]
|
|
|
|
std: [14]
|
2020-11-28 23:20:05 +01:00
|
|
|
include:
|
2022-09-14 21:12:42 +02:00
|
|
|
- cxx: g++-5
|
|
|
|
other_pkgs: g++-5
|
|
|
|
- cxx: g++-6
|
|
|
|
other_pkgs: g++-6
|
2021-04-30 14:02:30 +02:00
|
|
|
- cxx: g++-7
|
|
|
|
other_pkgs: g++-7
|
|
|
|
- cxx: g++-8
|
|
|
|
other_pkgs: g++-8
|
2021-05-28 00:00:01 +02:00
|
|
|
- cxx: g++-9
|
|
|
|
other_pkgs: g++-9
|
|
|
|
- cxx: g++-10
|
|
|
|
other_pkgs: g++-10
|
2020-11-28 23:20:05 +01:00
|
|
|
- cxx: clang++-6.0
|
|
|
|
other_pkgs: clang-6.0
|
|
|
|
- cxx: clang++-7
|
|
|
|
other_pkgs: clang-7
|
2021-04-30 14:02:30 +02:00
|
|
|
- cxx: clang++-8
|
|
|
|
other_pkgs: clang-8
|
2021-05-28 00:00:01 +02:00
|
|
|
- cxx: clang++-9
|
|
|
|
other_pkgs: clang-9
|
2020-11-28 23:20:05 +01:00
|
|
|
- cxx: clang++-10
|
|
|
|
other_pkgs: clang-10
|
2021-04-30 14:02:30 +02:00
|
|
|
# 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
|
2021-02-20 21:20:19 +01:00
|
|
|
- cxx: clang++-10
|
|
|
|
build_type: Debug
|
|
|
|
std: 17
|
|
|
|
other_pkgs: clang-10
|
|
|
|
- cxx: clang++-10
|
|
|
|
build_type: Release
|
|
|
|
std: 17
|
|
|
|
other_pkgs: clang-10
|
2020-11-27 21:10:34 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2022-09-14 21:12:42 +02:00
|
|
|
- name: Add repositories for older GCC
|
|
|
|
run: |
|
|
|
|
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic main'
|
|
|
|
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic universe'
|
|
|
|
if: ${{ matrix.cxx == 'g++-5' || matrix.cxx == 'g++-6' }}
|
|
|
|
|
2020-11-27 21:10:34 +01:00
|
|
|
- name: Prepare environment
|
2020-11-28 23:20:05 +01:00
|
|
|
run: sudo apt-get install -y ninja-build ${{matrix.other_pkgs}}
|
2020-11-27 21:10:34 +01:00
|
|
|
|
|
|
|
- name: Configure build
|
|
|
|
working-directory: ${{runner.workspace}}
|
|
|
|
env:
|
|
|
|
CXX: ${{matrix.cxx}}
|
|
|
|
CXXFLAGS: ${{matrix.cxxflags}}
|
|
|
|
# Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}.
|
|
|
|
# This is important
|
|
|
|
run: |
|
2021-02-20 20:37:31 +01:00
|
|
|
cmake -Bbuild -H$GITHUB_WORKSPACE \
|
|
|
|
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
|
|
|
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
|
|
|
|
-DCMAKE_CXX_EXTENSIONS=OFF \
|
|
|
|
-DCATCH_DEVELOPMENT_BUILD=ON \
|
|
|
|
-G Ninja
|
2020-11-27 21:10:34 +01:00
|
|
|
|
|
|
|
- name: Build tests + lib
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
run: ninja
|
|
|
|
|
|
|
|
- name: Run tests
|
2020-12-15 09:58:19 +01:00
|
|
|
env:
|
|
|
|
CTEST_OUTPUT_ON_FAILURE: 1
|
2020-11-27 21:10:34 +01:00
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
# Hardcode 2 cores we know are there
|
|
|
|
run: ctest -C ${{matrix.build_type}} -j 2
|