ci build and test #5
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: CMake with GoogleTest on multiple platforms | |
on: | |
pull_request: | |
branches: "*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install compiler | |
id: install_cc | |
uses: rlalik/setup-cpp-compiler@master | |
with: | |
compiler: latest | |
- name: Configure CMake | |
run: > | |
cmake -B build | |
-DCMAKE_CXX_COMPILER=${{ steps.install_cc.outputs.cxx }} | |
-DCMAKE_C_COMPILER=${{ steps.install_cc.outputs.cc }} | |
-DCMAKE_BUILD_TYPE=Debug | |
-S ${{ github.workspace }} | |
- name: Build | |
run: cmake --build build --parallel | |
- name: Test | |
working-directory: build | |
run: ctest --output-on-failure |