From 4fabfb92371aeddf5f87f8a486f2af41caf87c03 Mon Sep 17 00:00:00 2001 From: Hanif Koh Date: Wed, 9 Sep 2026 20:37:58 +0800 Subject: [PATCH] ci: build without precompiled headers when the compiler cache is on Clang rebuilds the precompiled header with a fresh timestamp on every run, so every file that includes it misses the cache: the warm run hit 178 of 927 compiles on Linux. Forward ORCA_EXTRA_BUILD_ARGS from the macOS and Windows build scripts the way build_linux.sh already does, and pass SLIC3R_PCH=OFF through it whenever ccache is enabled. --- .github/workflows/build_orca.yml | 4 ++++ build_release_macos.sh | 4 +++- build_release_vs.bat | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index d9cdf7ff19..99ec5f5938 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -102,6 +102,10 @@ jobs: # Needed for precompiled headers and for headers a fresh checkout # has just written. echo "CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime" >> "$GITHUB_ENV" + # Clang rebuilds the precompiled header with a fresh timestamp on + # every run, so every file that includes it misses the cache. All + # three build scripts forward this to the slicer configure. + echo "ORCA_EXTRA_BUILD_ARGS=-DSLIC3R_PCH=OFF" >> "$GITHUB_ENV" - name: Get the version and date on Ubuntu and macOS if: runner.os != 'Windows' diff --git a/build_release_macos.sh b/build_release_macos.sh index b1de5df2e4..f8702385fa 100755 --- a/build_release_macos.sh +++ b/build_release_macos.sh @@ -255,6 +255,7 @@ function build_slicer() { mkdir -p "$PROJECT_BUILD_DIR" cd "$PROJECT_BUILD_DIR" if [ "1." != "$BUILD_ONLY". ]; then + read -r -a EXTRA_BUILD_ARGS <<< "${ORCA_EXTRA_BUILD_ARGS:-}" cmake "${PROJECT_DIR}" \ -G "${SLICER_CMAKE_GENERATOR}" \ -DORCA_TOOLS=ON \ @@ -264,7 +265,8 @@ function build_slicer() { -DCMAKE_OSX_ARCHITECTURES="${_ARCH}" \ -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" \ -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" \ - ${CMAKE_POLICY_COMPAT} + ${CMAKE_POLICY_COMPAT} \ + "${EXTRA_BUILD_ARGS[@]}" fi cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET" ) diff --git a/build_release_vs.bat b/build_release_vs.bat index 3842f1d198..aad942f7ad 100644 --- a/build_release_vs.bat +++ b/build_release_vs.bat @@ -164,10 +164,10 @@ cd %build_dir% echo on set CMAKE_POLICY_VERSION_MINIMUM=3.5 if "%USE_NINJA%"=="1" ( - cmake .. -G %CMAKE_GENERATOR% %CLANG_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% + cmake .. -G %CMAKE_GENERATOR% %CLANG_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% %ORCA_EXTRA_BUILD_ARGS% cmake --build . --config %build_type% --target all ) else ( - cmake .. -G %CMAKE_GENERATOR% -A %arch% %TOOLSET_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% + cmake .. -G %CMAKE_GENERATOR% -A %arch% %TOOLSET_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% %ORCA_EXTRA_BUILD_ARGS% cmake --build . --config %build_type% --target ALL_BUILD -- -m ) @echo off