Update CMakeLists.txt #186
Workflow file for this run
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: [push] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
gcc-build: | |
name: GCC ${{ matrix.version }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['9', '10', '11'] | |
env: | |
CC: gcc-${{ matrix.version }} | |
CXX: g++-${{ matrix.version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: sudo apt-get install libcurl4-openssl-dev | |
- name: Install compiler | |
run: | | |
sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ bionic main universe" | |
sudo apt-get update | |
sudo apt-get install -y g++-${{ matrix.version }} libbsd-dev uuid-dev | |
- name: Install Catch2 | |
run: | | |
git clone https://github.com/catchorg/Catch2.git | |
cd Catch2 | |
git checkout v2.x | |
cmake -Bbuild -H. -DBUILD_TESTING=OFF | |
cmake --build build/ | |
cd build && sudo make install | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
# Execute the build. You can specify a specific target with "--target <NAME>" | |
run: cmake --build . --config $BUILD_TYPE | |
- name: Test | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest -C $BUILD_TYPE | |
clang-build: | |
name: Clang ${{ matrix.version }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['10', '11', '12'] | |
env: | |
CC: clang-${{ matrix.version }} | |
CXX: clang++-${{ matrix.version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: sudo apt-get install libcurl4-openssl-dev | |
- name: Install compiler | |
run: | | |
curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.version }} main" | |
sudo apt-get update | |
sudo apt-get install -y clang-${{ matrix.version }} libstdc++-7-dev libbsd-dev uuid-dev | |
- name: Install Catch2 | |
run: | | |
git clone https://github.com/catchorg/Catch2.git | |
cd Catch2 | |
git checkout v2.x | |
cmake -Bbuild -H. -DBUILD_TESTING=OFF | |
cmake --build build/ | |
cd build && sudo make install | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
# Execute the build. You can specify a specific target with "--target <NAME>" | |
run: cmake --build . --config $BUILD_TYPE | |
- name: Test | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest -C $BUILD_TYPE |