80 lines
1.7 KiB
YAML
80 lines
1.7 KiB
YAML
name: build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
linux:
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
matrix:
|
|
compiler: [g++, clang++]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Compile tests
|
|
working-directory: build
|
|
env:
|
|
CXX: ${{ matrix.compiler }}
|
|
run: |
|
|
cmake -DBUILD_LIB=ON -DBUILD_EXAMPLE=ON ..
|
|
make -j4
|
|
- name: Run tests
|
|
working-directory: build
|
|
env:
|
|
CTEST_OUTPUT_ON_FAILURE: 1
|
|
run: ctest --timeout 5 -C Debug -j4
|
|
|
|
windows:
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, windows-2016]
|
|
toolset: [clang-cl, default, v141]
|
|
include:
|
|
- toolset: clang-cl
|
|
toolset_option: -T"ClangCl"
|
|
- toolset: v141
|
|
toolset_option: -T"v141"
|
|
exclude:
|
|
- os: windows-2016
|
|
toolset: clang-cl
|
|
- os: windows-2016
|
|
toolset: v141
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Compile tests
|
|
working-directory: build
|
|
run: |
|
|
cmake -DBUILD_LIB=ON -DBUILD_EXAMPLE=ON ${{ matrix.toolset_option }} ..
|
|
cmake --build . -j 4
|
|
- name: Run tests
|
|
working-directory: build
|
|
env:
|
|
CTEST_OUTPUT_ON_FAILURE: 1
|
|
run: ctest --timeout 5 -C Debug -j4
|
|
|
|
macos:
|
|
timeout-minutes: 10
|
|
runs-on: macOS-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Compile tests
|
|
working-directory: build
|
|
run: |
|
|
cmake -DBUILD_LIB=ON -DBUILD_EXAMPLE=ON ..
|
|
make -j4
|
|
- name: Run tests
|
|
working-directory: build
|
|
env:
|
|
CTEST_OUTPUT_ON_FAILURE: 1
|
|
run: ctest --timeout 5 -C Debug -j4
|