CI Workflow #223
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: CI Workflow | |
on: | |
push: | |
pull_request: | |
branches: | |
- master | |
- devel | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
build: | |
name: '[${{ matrix.os }}@${{ matrix.build_type }}]' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
build_type: [Release, Debug] | |
os: [ubuntu-20.04, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@master | |
- name: Remove broken apt repos [Ubuntu] | |
if: contains(matrix.os, 'ubuntu') | |
run: for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done | |
- name: Dependencies [Ubuntu] | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install libeigen3-dev | |
- name: Dependencies [macOS] | |
if: matrix.os == 'macOS-latest' | |
run: brew install eigen | |
- name: Dependencies [Windows] | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
${VCPKG_INSTALLATION_ROOT}/vcpkg.exe install eigen3:x64-windows | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure CMake [Ubuntu/macOS] | |
if: contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest' | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{matrix.build_type}} | |
- name: Configure CMake [Windows] | |
if: contains(matrix.os, 'windows-latest') | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -A x64 -DBUILD_TESTING:BOOL=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: cmake --build . --config ${{matrix.build_type}} | |
- name: Test | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: ctest -C ${{matrix.build_type}} -VV |