From bfce4d916abc75afd0546e5bd13882aa17d71a54 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sat, 18 Jul 2026 13:57:15 +0800 Subject: [PATCH 1/6] ci: add ccache compile caching via WarpBuilds/cache, shrink runners to 8x - Restore ccache with WarpBuilds/cache@v1 on all three OS and the dynamic-backend job (per-OS keys with branch fallback), and wire it up through CMAKE_C/CXX_COMPILER_LAUNCHER; builds print ccache -s so hit rates are visible in CI logs - Cache the macOS OpenTimelineIO build (keyed on v0.16.0) and skip the rebuild on cache hit - Install ccache via apt/brew/MSYS2 as needed; CCACHE_MAXSIZE=1G - Runner sizes 16x/32x -> 8x (macOS 12x kept); openfx-misc make -j8 to match --- .github/workflows/ci.yml | 73 ++++++++++++++++++++++++++++++++++------ 1 file changed, 63 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91b0ec564..ceb1d512a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,11 @@ jobs: strategy: fail-fast: false matrix: - os: [warp-ubuntu-latest-x64-16x, warp-macos-15-arm64-12x, warp-windows-latest-x64-32x] + os: [warp-ubuntu-latest-x64-8x, warp-macos-15-arm64-12x, warp-windows-latest-x64-8x] env: CMAKE_BUILD_TYPE: Release + CCACHE_DIR: ${{ runner.temp }}/ccache + CCACHE_MAXSIZE: 1G # Enable OFX integration tests that require external plugin bundles RUN_OFX_ITEST: "1" # Enable plugin subsystem smoke tests @@ -35,7 +37,7 @@ jobs: qt6-base-dev qt6-base-dev-tools qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools \ libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \ libopencolorio-dev libopenimageio-dev libopenexr-dev libexpat1-dev \ - portaudio19-dev libgl1-mesa-dev libxkbcommon-dev + portaudio19-dev libgl1-mesa-dev libxkbcommon-dev ccache # ------------------------------------------------------------------ # macOS dependencies @@ -44,12 +46,24 @@ jobs: if: runner.os == 'macOS' run: | brew update - brew install ninja pkg-config qt@6 ffmpeg openimageio opencolorio openexr portaudio expat molten-vk vulkan-headers + brew install ninja pkg-config ccache qt@6 ffmpeg openimageio opencolorio openexr portaudio expat molten-vk vulkan-headers echo "$(brew --prefix qt@6)/bin" >> "$GITHUB_PATH" echo "CMAKE_PREFIX_PATH=$(brew --prefix qt@6)" >> "$GITHUB_ENV" - - name: Build OpenTimelineIO (macOS) + - name: Cache OpenTimelineIO (macOS) if: runner.os == 'macOS' + id: otio-cache + uses: WarpBuilds/cache@v1 + with: + path: otio-install + key: otio-0.16.0-${{ runner.os }}-v1 + + - name: Set OTIO location (macOS) + if: runner.os == 'macOS' + run: echo "OTIO_LOCATION=${PWD}/otio-install" >> "$GITHUB_ENV" + + - name: Build OpenTimelineIO (macOS) + if: runner.os == 'macOS' && steps.otio-cache.outputs.cache-hit != 'true' run: | git clone --depth 1 --branch v0.16.0 https://github.com/PixarAnimationStudios/OpenTimelineIO.git cmake -S OpenTimelineIO -B OpenTimelineIO/build -G Ninja \ @@ -87,6 +101,20 @@ jobs: mingw-w64-ucrt-x86_64-vulkan-headers mingw-w64-ucrt-x86_64-vulkan-loader mingw-w64-ucrt-x86_64-make + mingw-w64-ucrt-x86_64-ccache + + # ------------------------------------------------------------------ + # Compile cache (ccache) — restored before configure so the launcher + # flags below pick it up on all three platforms + # ------------------------------------------------------------------ + - name: Restore ccache + uses: WarpBuilds/cache@v1 + with: + path: ${{ runner.temp }}/ccache + key: ccache-${{ runner.os }}-${{ github.ref_name }}-${{ github.sha }} + restore-keys: | + ccache-${{ runner.os }}-${{ github.ref_name }}- + ccache-${{ runner.os }}- # ------------------------------------------------------------------ # Configure @@ -99,6 +127,8 @@ jobs: -DBUILD_QT6=ON \ -DCMAKE_DISABLE_FIND_PACKAGE_Vulkan=ON \ -DOCIO_LOCATION=/usr \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - name: Configure (macOS) @@ -109,6 +139,8 @@ jobs: -DBUILD_QT6=ON \ -DOCIO_LOCATION=$(brew --prefix opencolorio) \ -DOTIO_LOCATION=${OTIO_LOCATION} \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - name: Configure (Windows) @@ -118,6 +150,8 @@ jobs: cmake -S . -B build -G Ninja \ -DBUILD_TESTS=ON \ -DBUILD_QT6=ON \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} # ------------------------------------------------------------------ @@ -125,12 +159,16 @@ jobs: # ------------------------------------------------------------------ - name: Build if: runner.os != 'Windows' - run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} + run: | + cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} + ccache -s - name: Build (Windows) if: runner.os == 'Windows' shell: msys2 {0} - run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} + run: | + cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} + ccache -s # ------------------------------------------------------------------ # Clone and build OpenFX-Misc plugins (used by OFX integration tests) @@ -142,7 +180,7 @@ jobs: if: runner.os != 'Windows' run: | cd openfx-misc - make -j16 + make -j8 sudo make install PLUGIN_FILE=$(find /usr/OFX/Plugins /usr/local/OFX/Plugins . -name "*.ofx.bundle" -print -quit 2>/dev/null | head -1) if [ -n "$PLUGIN_FILE" ]; then @@ -234,10 +272,12 @@ jobs: # Experimental dynamic render backend (Linux only) # ------------------------------------------------------------------ build-test-dynamic-backend: - runs-on: warp-ubuntu-latest-x64-16x + runs-on: warp-ubuntu-latest-x64-8x env: CMAKE_BUILD_TYPE: Release QT_QPA_PLATFORM: offscreen + CCACHE_DIR: ${{ runner.temp }}/ccache + CCACHE_MAXSIZE: 1G steps: - uses: actions/checkout@v4 @@ -252,7 +292,16 @@ jobs: qt6-base-dev qt6-base-dev-tools qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools \ libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \ libopencolorio-dev libopenimageio-dev libopenexr-dev libexpat1-dev \ - portaudio19-dev libgl1-mesa-dev libxkbcommon-dev + portaudio19-dev libgl1-mesa-dev libxkbcommon-dev ccache + + - name: Restore ccache + uses: WarpBuilds/cache@v1 + with: + path: ${{ runner.temp }}/ccache + key: ccache-${{ runner.os }}-dynamic-${{ github.ref_name }}-${{ github.sha }} + restore-keys: | + ccache-${{ runner.os }}-dynamic-${{ github.ref_name }}- + ccache-${{ runner.os }}-dynamic- - name: Configure run: | @@ -262,10 +311,14 @@ jobs: -DOAK_ENABLE_DYNAMIC_RENDER_BACKEND=ON \ -DCMAKE_DISABLE_FIND_PACKAGE_Vulkan=ON \ -DOCIO_LOCATION=/usr \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - name: Build - run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} + run: | + cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} + ccache -s - name: Test run: ctest --test-dir build --output-on-failure -C ${{ env.CMAKE_BUILD_TYPE }} From 988e0e5b446f17358f61f6f4fd0be53d8ae7ae12 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sat, 18 Jul 2026 14:02:42 +0800 Subject: [PATCH 2/6] =?UTF-8?q?ci:=20fix=20ccache=20dir=20path=20=E2=80=94?= =?UTF-8?q?=20runner.temp=20is=20not=20a=20valid=20expression=20context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Point CCACHE_DIR and the cache action at a fixed workspace directory instead; checkout cleans untracked files before the restore, so the ordering is safe. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ceb1d512a..24256291d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: os: [warp-ubuntu-latest-x64-8x, warp-macos-15-arm64-12x, warp-windows-latest-x64-8x] env: CMAKE_BUILD_TYPE: Release - CCACHE_DIR: ${{ runner.temp }}/ccache + CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_MAXSIZE: 1G # Enable OFX integration tests that require external plugin bundles RUN_OFX_ITEST: "1" @@ -110,7 +110,7 @@ jobs: - name: Restore ccache uses: WarpBuilds/cache@v1 with: - path: ${{ runner.temp }}/ccache + path: ${{ github.workspace }}/.ccache key: ccache-${{ runner.os }}-${{ github.ref_name }}-${{ github.sha }} restore-keys: | ccache-${{ runner.os }}-${{ github.ref_name }}- @@ -276,7 +276,7 @@ jobs: env: CMAKE_BUILD_TYPE: Release QT_QPA_PLATFORM: offscreen - CCACHE_DIR: ${{ runner.temp }}/ccache + CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_MAXSIZE: 1G steps: @@ -297,7 +297,7 @@ jobs: - name: Restore ccache uses: WarpBuilds/cache@v1 with: - path: ${{ runner.temp }}/ccache + path: ${{ github.workspace }}/.ccache key: ccache-${{ runner.os }}-dynamic-${{ github.ref_name }}-${{ github.sha }} restore-keys: | ccache-${{ runner.os }}-dynamic-${{ github.ref_name }}- From f6fc12bb9dd36802e2a148f5e24e5ce10bf0be59 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sat, 18 Jul 2026 14:03:58 +0800 Subject: [PATCH 3/6] ci: use actions/cache for ccache on Windows runners WarpBuilds/cache does not support Windows; keep it for Linux/macOS and restore the same keys from GitHub's cache service on Windows instead. --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24256291d..a038ea6fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,6 +108,7 @@ jobs: # flags below pick it up on all three platforms # ------------------------------------------------------------------ - name: Restore ccache + if: runner.os != 'Windows' uses: WarpBuilds/cache@v1 with: path: ${{ github.workspace }}/.ccache @@ -116,6 +117,18 @@ jobs: ccache-${{ runner.os }}-${{ github.ref_name }}- ccache-${{ runner.os }}- + # WarpBuilds/cache does not support Windows runners; use GitHub's + # cache service there (separate backend, same keys) + - name: Restore ccache (Windows) + if: runner.os == 'Windows' + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.ccache + key: ccache-${{ runner.os }}-${{ github.ref_name }}-${{ github.sha }} + restore-keys: | + ccache-${{ runner.os }}-${{ github.ref_name }}- + ccache-${{ runner.os }}- + # ------------------------------------------------------------------ # Configure # ------------------------------------------------------------------ From 7206ae8c9f52a37eef15adaed0be52877cb7d5aa Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sat, 18 Jul 2026 14:05:33 +0800 Subject: [PATCH 4/6] ci: switch all caches to actions/cache (drop WarpBuilds/cache) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WarpBuild's cache service is billed; GitHub's cache is free (10 GB repo limit with LRU eviction, ample for ccache entries). All three cache sites — ccache for the matrix and dynamic-backend jobs, plus the macOS OpenTimelineIO build — now use actions/cache@v4, which also removes the Windows-specific fallback step. --- .github/workflows/ci.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a038ea6fe..7d57ae692 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: - name: Cache OpenTimelineIO (macOS) if: runner.os == 'macOS' id: otio-cache - uses: WarpBuilds/cache@v1 + uses: actions/cache@v4 with: path: otio-install key: otio-0.16.0-${{ runner.os }}-v1 @@ -108,19 +108,6 @@ jobs: # flags below pick it up on all three platforms # ------------------------------------------------------------------ - name: Restore ccache - if: runner.os != 'Windows' - uses: WarpBuilds/cache@v1 - with: - path: ${{ github.workspace }}/.ccache - key: ccache-${{ runner.os }}-${{ github.ref_name }}-${{ github.sha }} - restore-keys: | - ccache-${{ runner.os }}-${{ github.ref_name }}- - ccache-${{ runner.os }}- - - # WarpBuilds/cache does not support Windows runners; use GitHub's - # cache service there (separate backend, same keys) - - name: Restore ccache (Windows) - if: runner.os == 'Windows' uses: actions/cache@v4 with: path: ${{ github.workspace }}/.ccache @@ -308,7 +295,7 @@ jobs: portaudio19-dev libgl1-mesa-dev libxkbcommon-dev ccache - name: Restore ccache - uses: WarpBuilds/cache@v1 + uses: actions/cache@v4 with: path: ${{ github.workspace }}/.ccache key: ccache-${{ runner.os }}-dynamic-${{ github.ref_name }}-${{ github.sha }} From 4eb0ef6fc63f7202efe4cf792a27fee5d7e4684c Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sat, 18 Jul 2026 14:20:35 +0800 Subject: [PATCH 5/6] change: remove dymatic backend. --- .github/workflows/ci.yml | 60 +--------------------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d57ae692..32bafa670 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -266,62 +266,4 @@ jobs: - name: Viewer Smoke Tests (Windows) if: runner.os == 'Windows' shell: msys2 {0} - run: ./build/tests/gtest/olive-gtest --gtest_filter="ViewerSmoke*" - - # ------------------------------------------------------------------ - # Experimental dynamic render backend (Linux only) - # ------------------------------------------------------------------ - build-test-dynamic-backend: - runs-on: warp-ubuntu-latest-x64-8x - env: - CMAKE_BUILD_TYPE: Release - QT_QPA_PLATFORM: offscreen - CCACHE_DIR: ${{ github.workspace }}/.ccache - CCACHE_MAXSIZE: 1G - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - ninja-build pkg-config nasm \ - qt6-base-dev qt6-base-dev-tools qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools \ - libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \ - libopencolorio-dev libopenimageio-dev libopenexr-dev libexpat1-dev \ - portaudio19-dev libgl1-mesa-dev libxkbcommon-dev ccache - - - name: Restore ccache - uses: actions/cache@v4 - with: - path: ${{ github.workspace }}/.ccache - key: ccache-${{ runner.os }}-dynamic-${{ github.ref_name }}-${{ github.sha }} - restore-keys: | - ccache-${{ runner.os }}-dynamic-${{ github.ref_name }}- - ccache-${{ runner.os }}-dynamic- - - - name: Configure - run: | - cmake -S . -B build -G Ninja \ - -DBUILD_TESTS=ON \ - -DBUILD_QT6=ON \ - -DOAK_ENABLE_DYNAMIC_RENDER_BACKEND=ON \ - -DCMAKE_DISABLE_FIND_PACKAGE_Vulkan=ON \ - -DOCIO_LOCATION=/usr \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - - - name: Build - run: | - cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} - ccache -s - - - name: Test - run: ctest --test-dir build --output-on-failure -C ${{ env.CMAKE_BUILD_TYPE }} - - - name: Dynamic Render Backend Smoke Tests - run: ./build/tests/gtest/olive-gtest --gtest_filter="DynamicRenderBackend*" + run: ./build/tests/gtest/olive-gtest --gtest_filter="ViewerSmoke*" \ No newline at end of file From ca68005fc282f4e09a6ad47d5a57aeb1042b2d2d Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sat, 18 Jul 2026 14:29:14 +0800 Subject: [PATCH 6/6] ci: switch to GitHub-hosted runners and add daily cache-warming build - Runners: ubuntu-24.04, macos-15, windows-latest (free tier) instead of WarpBuild 8x/12x instances - openfx-misc parallelism adapts to nproc (GitHub runners have fewer vCPUs than the WarpBuild instances) - Schedule a daily 03:17 UTC run so ccache entries never hit GitHub's 7-day cache expiry and system dependencies stay current --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32bafa670..8df17c10e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,9 @@ name: CI on: push: pull_request: + schedule: + # Daily at 03:17 UTC to keep ccache/dependency caches warm + - cron: '17 3 * * *' jobs: build-test: @@ -10,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: [warp-ubuntu-latest-x64-8x, warp-macos-15-arm64-12x, warp-windows-latest-x64-8x] + os: [ubuntu-24.04, macos-15, windows-latest] env: CMAKE_BUILD_TYPE: Release CCACHE_DIR: ${{ github.workspace }}/.ccache @@ -180,7 +183,7 @@ jobs: if: runner.os != 'Windows' run: | cd openfx-misc - make -j8 + make -j"$(nproc)" sudo make install PLUGIN_FILE=$(find /usr/OFX/Plugins /usr/local/OFX/Plugins . -name "*.ofx.bundle" -print -quit 2>/dev/null | head -1) if [ -n "$PLUGIN_FILE" ]; then