From 7ce8d256cf8df0059a0534942a261ed6aa2b1930 Mon Sep 17 00:00:00 2001 From: Micah Villmow <4211002+mvillmow@users.noreply.github.com> Date: Sun, 10 May 2026 16:02:09 -0700 Subject: [PATCH] fix(ci): repair Profiling Tests (Weekly) workflow on main CMake configure was failing with "Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)" because the workflow installed apt build tools but never ran `conan install`. GTest is provided via Conan (gtest/1.14.0) per conanfile.py and required by find_package(GTest REQUIRED) in CMakeLists.txt. Switch to the canonical pattern used by _required.yml: - Use the .github/actions/install-build-deps composite action (installs clang-18, cmake, ninja, AND conan with detected profile) - Cache ~/.conan2 keyed on conanfile.py hash - Run `conan install` for Release before cmake configure - Pass -DCMAKE_TOOLCHAIN_FILE=build/conan-deps/conan_toolchain.cmake so find_package() locates GTest Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/profiling-weekly.yml | 32 +++++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/profiling-weekly.yml b/.github/workflows/profiling-weekly.yml index 56711f5..34a927a 100644 --- a/.github/workflows/profiling-weekly.yml +++ b/.github/workflows/profiling-weekly.yml @@ -25,6 +25,17 @@ jobs: - name: Checkout code uses: actions/checkout@v6.0.2 + - name: Install build dependencies + uses: ./.github/actions/install-build-deps + + - name: Cache Conan packages + uses: actions/cache@v5 + with: + path: ~/.conan2 + key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py') }} + restore-keys: | + conan-${{ runner.os }}- + - name: Cache FetchContent downloads uses: actions/cache@v5 with: @@ -39,27 +50,20 @@ jobs: - name: Configure sccache run: echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV - - name: Install dependencies + - name: Install Conan dependencies run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - cmake \ - ninja-build \ - clang-18 \ - clang++-18 \ - libc++-18-dev \ - libc++abi-18-dev - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100 - sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-18 100 - sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-18 100 + conan install . \ + --output-folder=build/conan-deps \ + --build=missing \ + -s build_type=Release \ + -s compiler.cppstd=20 - name: Build with profiling enabled run: | mkdir -p build/profiling cd build/profiling cmake -S ../.. -DCMAKE_BUILD_TYPE=Release -DENABLE_PROFILING=ON -G Ninja \ + -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/build/conan-deps/conan_toolchain.cmake \ -DCMAKE_C_COMPILER_LAUNCHER=sccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ninja profiling_tests