2020-10-02 01:26:04 +00:00
|
|
|
name: CMake
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
env:
|
|
|
|
BUILD_TYPE: Release
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-09-03 19:04:27 +00:00
|
|
|
os: [ubuntu-20.04, macos-latest, windows-latest, windows-2019]
|
2020-10-02 01:26:04 +00:00
|
|
|
|
|
|
|
steps:
|
2024-09-03 19:12:57 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-10-02 01:26:04 +00:00
|
|
|
|
|
|
|
- name: Configure CMake
|
2024-11-16 19:27:16 +00:00
|
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
2020-10-02 01:26:04 +00:00
|
|
|
|
|
|
|
- name: Build
|
2024-11-16 19:27:16 +00:00
|
|
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
2020-10-02 01:26:04 +00:00
|
|
|
|
|
|
|
- name: Test
|
2024-11-16 19:27:16 +00:00
|
|
|
working-directory: ${{github.workspace}}/build
|
|
|
|
run: ctest -C ${{env.BUILD_TYPE}}
|
|
|
|
|
|
|
|
- name: Configure CMake with C++20
|
|
|
|
run: cmake -B ${{github.workspace}}/build_20 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_STANDARD=20
|
|
|
|
|
|
|
|
- name: Build with C++20
|
|
|
|
run: cmake --build ${{github.workspace}}/build_20 --config ${{env.BUILD_TYPE}}
|
|
|
|
|
|
|
|
- name: Test with C++20
|
|
|
|
working-directory: ${{github.workspace}}/build_20
|
|
|
|
run: ctest -C ${{env.BUILD_TYPE}}
|