CMake and testability improvements #196
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: ${{ matrix.toolchain }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- macos-latest-clang | |
- macos-12-clang | |
- ubuntu-latest-clang | |
- ubuntu-latest-gcc | |
- windows-2019-msvc | |
- windows-latest-msvc | |
- windows-latest-clang | |
include: | |
- toolchain: macos-latest-clang | |
os: macos-latest | |
c_compiler: clang | |
cxx_compiler: clang++ | |
- toolchain: macos-12-clang | |
os: macos-latest | |
c_compiler: clang | |
cxx_compiler: clang++ | |
- toolchain: ubuntu-latest-clang | |
os: ubuntu-latest | |
c_compiler: clang | |
cxx_compiler: clang++ | |
- toolchain: ubuntu-latest-gcc | |
os: ubuntu-latest | |
c_compiler: cc | |
cxx_compiler: g++ | |
- toolchain: windows-2019-msvc | |
os: windows-2019 | |
c_compiler: msvc | |
cxx_compiler: msvc | |
- toolchain: windows-latest-msvc | |
os: windows-latest | |
c_compiler: msvc | |
cxx_compiler: msvc | |
- toolchain: windows-latest-clang | |
os: windows-latest | |
c_compiler: clang-cl | |
cxx_compiler: clang-cl | |
cmake_opts: -T ClangCL | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: cmake -DARGPARSE_BUILD_SAMPLES=ON -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_opts }} $GITHUB_WORKSPACE | |
env: | |
CC: ${{ matrix.c_compiler }} | |
CXX: ${{ matrix.cxx_compiler }} | |
- name: Build for ${{ matrix.os }} with ${{ matrix.compiler }} | |
working-directory: ${{runner.workspace}}/build | |
run: cmake --build . --config Debug --verbose | |
- name: Test | |
working-directory: ${{runner.workspace}}/build | |
run: ctest -C Debug -V | |
env: | |
CTEST_OUTPUT_ON_FAILURE: True |