From a9070da72efbfed3e561d45c4379ad82cdaecc9b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 19 Feb 2026 23:07:00 +0100 Subject: [PATCH] Cache CPM on CI. --- .github/workflows/build.yml | 6 ++++++ .github/workflows/emscripten.yml | 6 ++++++ .github/workflows/linux.yml | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e3cc0da..aa1fd37b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,12 @@ jobs: continue-on-error: true steps: - uses: actions/checkout@v4 + - name: Cache CPM packages + uses: actions/cache@v4 + with: + path: ${{ env.CPM_SOURCE_CACHE }} + key: ${{ runner.os }}-cpm-${{ hashFiles('**/vendor.cmake', '**/CMakeLists.txt') }} + restore-keys: ${{ runner.os }}-cpm- - if: startsWith(matrix.os, 'windows') uses: microsoft/setup-msbuild@v2 - if: startsWith(matrix.os, 'windows') diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index f046295a..a46eff07 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -24,6 +24,12 @@ jobs: - name: Trust git repo run: git config --global --add safe.directory '*' - uses: actions/checkout@v4 + - name: Cache CPM packages + uses: actions/cache@v4 + with: + path: ${{ env.CPM_SOURCE_CACHE }} + key: ${{ runner.os }}-cpm-${{ hashFiles('**/vendor.cmake', '**/CMakeLists.txt') }} + restore-keys: ${{ runner.os }}-cpm- - name: Profiler GUI run: | cmake -G Ninja -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=MinSizeRel -DGIT_REV=${{ github.sha }} -DCMAKE_TOOLCHAIN_FILE=${{env.EMSDK}}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 71374fbc..32e6c75c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -20,6 +20,12 @@ jobs: - name: Trust git repo run: git config --global --add safe.directory '*' - uses: actions/checkout@v4 + - name: Cache CPM packages + uses: actions/cache@v4 + with: + path: ${{ env.CPM_SOURCE_CACHE }} + key: ${{ runner.os }}-cpm-${{ hashFiles('**/vendor.cmake', '**/CMakeLists.txt') }} + restore-keys: ${{ runner.os }}-cpm- - name: Profiler GUI run: | cmake -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }}