Skip to content

[test] again

[test] again #23

name: Build and run tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Debug]
cpp_compiler: [g++, clang++, cl]
cpp_standard: [14, 20, 23]
exclude:
- os: ubuntu-latest
cpp_compiler: cl
- os: ubuntu-latest
cpp_compiler: clang++
cpp_standard: 20
- os: ubuntu-latest
cpp_compiler: clang++
cpp_standard: 23
- os: windows-latest
cpp_compiler: clang++
- os: windows-latest
cpp_compiler: g++
runs-on: ${{ matrix.os }}
env:
PREFIX: ${{ github.workspace }}/_local
steps:
- uses: actions/checkout@v3
- name: Install Google Test
uses: actions/checkout@v3
with:
repository: google/googletest
ref: f8d7d77c06936315286eb55f8de22cd23c188571
path: googletest
- name: Install Google Test (2)
run: |
cmake -S googletest -B build/deps/googletest -DCMAKE_BUILD_TYPE=RelWithDebInfo '-DCMAKE_INSTALL_PREFIX=${{ env.PREFIX }}' -DBUILD_SHARED_LIBS=YES
cmake --build build/deps/googletest --config RelWithDebInfo --target install
- name: Build (Linux)
if: matrix.os == 'ubuntu-latest'
working-directory: ${{ github.workspace }}
run: |
cmake . -B ./build -G 'Unix Makefiles' \
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_standard }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} '-DCMAKE_PREFIX_PATH=${{ env.PREFIX }}'
- name: Build (Windows)
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}
run: |
cmake . -B ./build -G 'Unix Makefiles' -DCMAKE_CXX_STANDARD=${{ matrix.cpp_standard }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} '-DCMAKE_PREFIX_PATH=${{ env.PREFIX }}'
- name: Test
working-directory: ${{ github.workspace }}/build
run: |
make VERBOSE=1 && ./bin/utest