Skip to content

Upgrade to 22.04 for builds #203

Upgrade to 22.04 for builds

Upgrade to 22.04 for builds #203

Workflow file for this run

name: CMake
on: [push]
env:
BUILD_TYPE: Release
jobs:
gcc-build:
name: GCC ${{ matrix.version }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
version: ['9', '10', '11', '12', '13', '14']
env:
CC: gcc-${{ matrix.version }}
CXX: g++-${{ matrix.version }}
steps:
- uses: actions/checkout@v4
- 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/ jammy 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-22.04
strategy:
fail-fast: false
matrix:
version: ['10', '11', '12', '13', '14', '15', '16', '17', '18']
env:
CC: clang-${{ matrix.version }}
CXX: clang++-${{ matrix.version }}
steps:
- uses: actions/checkout@v4
- 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/jammy/ llvm-toolchain-jammy-${{ 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