Skip to content

[test] try to extend the CI to windows #5

[test] try to extend the CI to windows

[test] try to extend the CI to windows #5

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]
exclude:
- os: ubuntu-latest
cpp_compiler: clang++
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Google Test (Linux)
if: matrix.os == 'ubuntu-latest'
run: >
sudo apt-get install libgtest-dev
- name: Install Google Test (Windows)
if: matrix.os == 'windows-latest'
run: >
git clone https://github.com/google/googletest.git &&
mkdir googletest/build &&
cd googletest/build &&
cmake .. -G 'Unix Makefiles' &&
make install
- name: Build
working-directory: ${{ github.workspace }}
env:
CMAKE_CXX_COMPILER: ${{ matrix.cpp_compiler }}
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
run: |
cmake -S . -B ./build -DCMAKE_CXX_STANDARD=${{ matrix.cpp_standard }}
- name: Test
working-directory: ${{ github.workspace }}/build
run: |
make && ./bin/utest