From 83919f334817f80dd778697bbcbc9d06e27b2066 Mon Sep 17 00:00:00 2001 From: "Mauricio A. Rovira Galvez" <8482308+marovira@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:30:06 -0700 Subject: [PATCH] [brief] More CI fixes. [detailed] - Removes the duplicate key from the presets file. - Fixes the name of the runs so they're easier to tell apart. - Ensures the builds for the dependencies on Linux only build with GCC instead of being built with both Clang and GCC. --- .github/workflows/build.yml | 11 ++++++----- CMakePresets.json | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e8497f..b4f6475 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: format: uses: ./.github/workflows/clang-format.yml build: - name: ${{ matrix.config.os }}-${{ matrix.config.preset }} + name: ${{ matrix.config.os }}-${{ matrix.config.preset }}-${{ matrix.build }} runs-on: ${{ matrix.config.os }} needs: format strategy: @@ -35,7 +35,7 @@ jobs: config: - {os: "windows-latest", cxx: "msvc", cc: "msvc", preset: "msvc"} - {os: "ubuntu-24.04", cxx: "clang++-18", cc: "clang-18", preset: "clang"} - - {os: "ubuntu-24.04", cxx: "gcc-14", cc: "gcc-14", preset: "gcc"} + - {os: "ubuntu-24.04", cxx: "g++-14", cc: "gcc-14", preset: "gcc"} build: ["Debug", "Release"] steps: - name: Chekout @@ -54,17 +54,18 @@ jobs: path: ~/deps key: deps_${{ matrix.config.os }}_${{ matrix.build }}_${{ hashfiles('dependencies.txt') }} - - name: Install dependencies + - name: Build dependencies if: steps.cache-deps.outputs.cache-hit != 'true' shell: bash env: - CC: ${{ matrix.config.cc }} - CXX: ${{ matrix.config.cxx }} BUILD_TYPE: ${{ matrix.build }} run: | if [[ "$OSTYPE" == "msys" ]]; then python tools/build_dependencies.py ~/deps $BUILD_TYPE else + # Clang and GCC binaries are compatible, so only compile with GCC. + export CC="gcc-14" + export CXX="g++-14" python3 tools/build_dependencies.py ~/deps $BUILD_TYPE fi diff --git a/CMakePresets.json b/CMakePresets.json index 22b0e5d..58f2aa7 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -23,7 +23,6 @@ "name": "unix_base", "hidden": true, "generator": "Unix Makefiles", - "generator": "Unix Makefiles", "binaryDir": "${sourceDir}/build", "cacheVariables": { "CMAKE_CXX_STANDARD": "20",