argparse/.github/workflows/ci.yml
Sean Robinson 566d1df20e Add MacOS 12 CI runner
This expands test environment coverage to two MacOS versions.

Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2022-08-04 11:37:02 -07:00

81 lines
1.8 KiB
YAML

name: CI
on: pull_request
jobs:
test:
name: ${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
toolchain:
- macos-latest-clang
- macos-12-clang
- ubuntu-latest-clang
- ubuntu-latest-gcc
- windows-2019-msvc
- windows-latest-msvc
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
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Configure
working-directory: test
run: cmake -S . -B build
env:
CC: ${{ matrix.c_compiler }}
CXX: ${{ matrix.cxx_compiler }}
- name: Build for ${{ matrix.os }} with ${{ matrix.compiler }}
working-directory: test
run: cmake --build build
- name: Test
if: ${{ ! startsWith(matrix.os, 'windows') }}
working-directory: test/build
run: ./tests
- name: Test (Windows)
if: ${{ startsWith(matrix.os, 'windows') }}
working-directory: test/build
run: ./Debug/tests.exe