Merge pull request #25 from zourenDevote/develop #34
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 on multiple platforms | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build-linux-debug: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up LLVM on Linux | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y llvm-15 clang-15 | |
sudo apt-get install build-essential | |
sudo apt-get install cmake | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Configure CMake (Linux) | |
run: | | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DENABLE_CTEST=On | |
cmake --build ${{github.workspace}}/build | |
- name: Build and Test | |
working-directory: ${{github.workspace}}/build | |
run: | | |
make -j 16 | |
ctest -j 16 --stop-on-failure | |
build-linux-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up LLVM on Linux | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y llvm-15 clang-15 | |
sudo apt-get install build-essential | |
sudo apt-get install cmake | |
- name: Configure and build with CMake (Linux) | |
run: | | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DENABLE_CTEST=On | |
- name: Build and Test | |
working-directory: ${{github.workspace}}/build | |
run: | | |
make -j 16 | |
ctest -j 16 --stop-on-failure | |