From fd6e74416c90442784872aeaee3160cca5801681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Wed, 26 Mar 2025 08:36:04 +0100 Subject: [PATCH] Split the CI builds on ubuntu into separate runners (#2116) --- .github/workflows/ci-ubuntu-20.yml | 49 ++++++++++++ .github/workflows/ci-ubuntu-22.yml | 51 +++++++++++++ .github/workflows/ci-ubuntu-24.yml | 51 +++++++++++++ .github/workflows/ci-ubuntu.yml | 116 ----------------------------- 4 files changed, 151 insertions(+), 116 deletions(-) create mode 100644 .github/workflows/ci-ubuntu-20.yml create mode 100644 .github/workflows/ci-ubuntu-22.yml create mode 100644 .github/workflows/ci-ubuntu-24.yml delete mode 100644 .github/workflows/ci-ubuntu.yml diff --git a/.github/workflows/ci-ubuntu-20.yml b/.github/workflows/ci-ubuntu-20.yml new file mode 100644 index 0000000..4cd4a6c --- /dev/null +++ b/.github/workflows/ci-ubuntu-20.yml @@ -0,0 +1,49 @@ + +name: CI Ubuntu 20 + +on: + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-20.04 + + defaults: + run: + shell: bash + + strategy: + matrix: + compiler: [clang++-10, clang++-11, clang++-12, g++-10] + cpp_standard: [11, 14, 17, 20] + build_type: [Debug, Release] + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install libraries + run: sudo apt update && sudo apt install libgl-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev + + - name: Install Ninja + uses: ashutoshvarma/setup-ninja@master + with: + version: 1.11.0 + + - name: Build + run: | + cmake -B build/${{matrix.cpp_standard}}/${{matrix.build_type}} -GNinja \ + -DVULKAN_HPP_SAMPLES_BUILD=ON \ + -DVULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC=ON \ + -DVULKAN_HPP_TESTS_BUILD=ON \ + -DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON \ + -DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \ + -DVULKAN_HPP_PRECOMPILE=OFF \ + -DVULKAN_HPP_RUN_GENERATOR=ON \ + -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \ + -DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} \ + -DCMAKE_BUILD_TYPE=${{matrix.build_type}} + cmake --build build/${{matrix.cpp_standard}}/${{matrix.build_type}} --parallel + diff --git a/.github/workflows/ci-ubuntu-22.yml b/.github/workflows/ci-ubuntu-22.yml new file mode 100644 index 0000000..577cea3 --- /dev/null +++ b/.github/workflows/ci-ubuntu-22.yml @@ -0,0 +1,51 @@ + +name: CI Ubuntu 22 + +on: + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-22.04 + + defaults: + run: + shell: bash + + strategy: + matrix: + compiler: [clang++-13, clang++-14, clang++-15, g++-10, g++-11, g++-12] + cpp_standard: [11, 14, 17, 20, 23] + build_type: [Debug, Release] + exclude: + - cpp_standard: 23 + compiler: g++-10 + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install libraries + run: sudo apt update && sudo apt install libgl-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev + + - name: Install Ninja + uses: ashutoshvarma/setup-ninja@master + with: + version: 1.11.0 + + - name: Build + run: | + cmake -B build/${{matrix.cpp_standard}}/${{matrix.build_type}} -GNinja \ + -DVULKAN_HPP_SAMPLES_BUILD=ON \ + -DVULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC=ON \ + -DVULKAN_HPP_TESTS_BUILD=ON \ + -DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON \ + -DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \ + -DVULKAN_HPP_PRECOMPILE=OFF \ + -DVULKAN_HPP_RUN_GENERATOR=ON \ + -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \ + -DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} \ + -DCMAKE_BUILD_TYPE=${{matrix.build_type}} + cmake --build build/${{matrix.cpp_standard}}/${{matrix.build_type}} --parallel diff --git a/.github/workflows/ci-ubuntu-24.yml b/.github/workflows/ci-ubuntu-24.yml new file mode 100644 index 0000000..b93cd65 --- /dev/null +++ b/.github/workflows/ci-ubuntu-24.yml @@ -0,0 +1,51 @@ + +name: CI Ubuntu 24 + +on: + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-24.04 + + defaults: + run: + shell: bash + + strategy: + matrix: + compiler: [clang++-16, clang++-17, clang++-18, g++-12, g++-13, g++-14] + cpp_standard: [11, 14, 17, 20, 23] + build_type: [Debug, Release] + exclude: + - cpp_standard: 23 + compiler: clang++-17 # clang++-17 gives some strange errors in std::tuple ! + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install libraries + run: sudo apt update && sudo apt install libgl-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev + + - name: Install Ninja + uses: ashutoshvarma/setup-ninja@master + with: + version: 1.11.0 + + - name: Build + run: | + cmake -B build/${{matrix.cpp_standard}}/${{matrix.build_type}} -GNinja \ + -DVULKAN_HPP_SAMPLES_BUILD=ON \ + -DVULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC=ON \ + -DVULKAN_HPP_TESTS_BUILD=ON \ + -DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON \ + -DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \ + -DVULKAN_HPP_PRECOMPILE=OFF \ + -DVULKAN_HPP_RUN_GENERATOR=ON \ + -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \ + -DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} \ + -DCMAKE_BUILD_TYPE=${{matrix.build_type}} + cmake --build build/${{matrix.cpp_standard}}/${{matrix.build_type}} --parallel diff --git a/.github/workflows/ci-ubuntu.yml b/.github/workflows/ci-ubuntu.yml deleted file mode 100644 index b628ee1..0000000 --- a/.github/workflows/ci-ubuntu.yml +++ /dev/null @@ -1,116 +0,0 @@ - -name: CI Ubuntu - -on: - pull_request: - branches: [ main ] - -jobs: - build: - defaults: - run: - shell: bash - - strategy: - matrix: - include: - - os: ubuntu-20.04 - compiler: clang++-10 - - os: ubuntu-20.04 - compiler: clang++-11 - - os: ubuntu-20.04 - compiler: clang++-12 - - os: ubuntu-20.04 - compiler: g++-10 - - - os: ubuntu-22.04 - compiler: clang++-13 - - os: ubuntu-22.04 - compiler: clang++-14 - - os: ubuntu-22.04 - compiler: clang++-15 - - os: ubuntu-22.04 - compiler: g++-10 - - os: ubuntu-22.04 - compiler: g++-11 - - os: ubuntu-22.04 - compiler: g++-12 - - - os: ubuntu-24.04 - compiler: clang++-16 - - os: ubuntu-24.04 - compiler: clang++-17 - - os: ubuntu-24.04 - compiler: clang++-18 - - os: ubuntu-24.04 - compiler: g++-12 - - os: ubuntu-24.04 - compiler: g++-13 - - os: ubuntu-24.04 - compiler: g++-14 - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install libraries - run: sudo apt update && sudo apt install libgl-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev - - - name: Install Ninja - uses: ashutoshvarma/setup-ninja@master - with: - version: 1.11.0 - - - name: Loop over cpp_standards (11, 14, ...) and build_types (Debug, Release) - run: | - for cpp_standard in 11 14 17 20 - do - for build_type in Debug Release - do - echo "=================================================================================" - echo "Building C++"$cpp_standard" in "$build_type" mode on "${{matrix.os}}" with "${{matrix.compiler}} - echo "=================================================================================" - cmake -B build/$cpp_standard/$build_type -GNinja \ - -DVULKAN_HPP_SAMPLES_BUILD=ON \ - -DVULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC=ON \ - -DVULKAN_HPP_TESTS_BUILD=ON \ - -DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON \ - -DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \ - -DVULKAN_HPP_PRECOMPILE=OFF \ - -DVULKAN_HPP_RUN_GENERATOR=ON \ - -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \ - -DCMAKE_CXX_STANDARD=$cpp_standard \ - -DCMAKE_BUILD_TYPE=$build_type - cmake --build build/$cpp_standard/$build_type --parallel - done - done - - - name: Loop over build_types (Debug, Release) with cpp_standard 23 for compilers supporting that - run: | - # clang++17 gives in some strange errors in std::tuple! - if [[ ${{matrix.compiler}} != clang++-10 && ${{matrix.compiler}} != clang++-11 && ${{matrix.compiler}} != clang++-17 && ${{matrix.compiler}} != g++-10 ]] - then - cpp_standard=23 - for build_type in Debug Release - do - echo "=================================================================================" - echo "Building C++"$cpp_standard" in "$build_type" mode on "${{matrix.os}}" with "${{matrix.compiler}} - echo "=================================================================================" - cmake -B build/$cpp_standard/$build_type -GNinja \ - -DVULKAN_HPP_SAMPLES_BUILD=ON \ - -DVULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC=ON \ - -DVULKAN_HPP_TESTS_BUILD=ON \ - -DVULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC=ON \ - -DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \ - -DVULKAN_HPP_PRECOMPILE=OFF \ - -DVULKAN_HPP_RUN_GENERATOR=ON \ - -DCMAKE_CXX_COMPILER=${{matrix.compiler}} \ - -DCMAKE_CXX_STANDARD=$cpp_standard \ - -DCMAKE_BUILD_TYPE=$build_type - cmake --build build/$cpp_standard/$build_type --parallel - done - fi -