feature/cmake_ci #17
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: Build and Test' | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install System Deps | |
run: | | |
sudo apt install libeigen3-dev libgoogle-glog-dev libgtest-dev | |
- name: Configure CMake | |
shell: bash | |
run: | | |
cd ${{github.workspace}} | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
shell: bash | |
run: cmake --build ${{github.workspace}}/build | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ctest -C ${{env.BUILD_TYPE}} |