From 8fd6de0c9dd7b12b895f390413c97312b869b995 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Wed, 25 Mar 2026 13:18:33 +0000 Subject: [PATCH 1/5] Replace deprecated save-always with cache/restore + cache/save The actions/cache save-always input has been deprecated and will be removed in a future release. Replace all occurrences of actions/cache@v5 with save-always: true by a pair of actions/cache/restore@v5 (to restore) and actions/cache/save@v5 (with if: always(), to unconditionally save) steps. This follows the pattern established in the profiling workflow and the recommendation at https://github.com/actions/cache/tree/main/save#always-save-cache. Co-authored-by: Kiro --- .github/workflows/bsd.yaml | 33 +++- .github/workflows/build-and-test-Linux.yaml | 11 +- .github/workflows/build-and-test-Xen.yaml | 11 +- .github/workflows/coverage.yaml | 11 +- .github/workflows/csmith.yaml | 11 +- .../pull-request-check-rust-api.yaml | 22 ++- .github/workflows/pull-request-checks.yaml | 176 +++++++++++++----- .github/workflows/release-packages.yaml | 44 +++-- 8 files changed, 232 insertions(+), 87 deletions(-) diff --git a/.github/workflows/bsd.yaml b/.github/workflows/bsd.yaml index 17662383fd7..31fd3af314f 100644 --- a/.github/workflows/bsd.yaml +++ b/.github/workflows/bsd.yaml @@ -13,10 +13,9 @@ jobs: - uses: actions/checkout@v6 with: submodules: recursive - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: freebsd-15.0-gmake-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -71,6 +70,12 @@ jobs: # env PATH=$PATH:`pwd`/src/solvers gmake -C regression/cbmc test-cprover-smt2 # # gmake -C jbmc/regression test-parallel JOBS=2 + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: freebsd-15.0-gmake-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 7 to 34 minutes OpenBSD: runs-on: ubuntu-latest @@ -78,10 +83,9 @@ jobs: - uses: actions/checkout@v6 with: submodules: recursive - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: openbsd-7.7-gmake-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -133,6 +137,12 @@ jobs: # env PATH=$PATH:`pwd`/src/solvers gmake -C regression/cbmc test-cprover-smt2 # # gmake -C jbmc/regression test-parallel JOBS=2 + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: openbsd-7.7-gmake-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 6 to 29 minutes NetBSD: runs-on: ubuntu-latest @@ -140,10 +150,9 @@ jobs: - uses: actions/checkout@v6 with: submodules: recursive - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: netbsd-10.1-gmake-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -197,3 +206,9 @@ jobs: # gmake -C regression/cbmc test-paths-lifo # env PATH=$PATH:`pwd`/src/solvers gmake -C regression/cbmc test-cprover-smt2 # # gmake -C jbmc/regression test-parallel JOBS=2 + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: netbsd-10.1-gmake-${{ github.ref }}-${{ github.sha }}-PR diff --git a/.github/workflows/build-and-test-Linux.yaml b/.github/workflows/build-and-test-Linux.yaml index 31fc894d5f4..8d16827f0cc 100644 --- a/.github/workflows/build-and-test-Linux.yaml +++ b/.github/workflows/build-and-test-Linux.yaml @@ -24,10 +24,9 @@ jobs: sudo apt-get install --no-install-recommends -y libssl-dev libelf-dev libudev-dev libpci-dev libiberty-dev autoconf sudo apt-get install --no-install-recommends -y gawk jq - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-KERNEL restore-keys: | @@ -53,3 +52,9 @@ jobs: with: name: CPROVER-faultyInput path: CPROVER/faultyInput/* + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-KERNEL diff --git a/.github/workflows/build-and-test-Xen.yaml b/.github/workflows/build-and-test-Xen.yaml index 6f1af4731e8..bf979b564dc 100644 --- a/.github/workflows/build-and-test-Xen.yaml +++ b/.github/workflows/build-and-test-Xen.yaml @@ -23,10 +23,9 @@ jobs: sudo apt-get install --no-install-recommends -y bin86 gdb bcc liblzma-dev python3-dev gettext iasl uuid-dev libncurses5-dev libncursesw5-dev pkg-config sudo apt-get install --no-install-recommends -y libgtk2.0-dev libyajl-dev time ccache clang-19 clang++-19 - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-XEN restore-keys: | @@ -68,3 +67,9 @@ jobs: - name: Show some goto-cc functions run: $(pwd)/src/cbmc/cbmc --list-goto-functions xen_4_13/xen/xen-syms | grep "arch" + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-XEN diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index e4a71b5b452..b0dbc314eb9 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -38,10 +38,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-Coverage-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -70,3 +69,9 @@ jobs: files: build/html/coverage.info fail_ci_if_error: true verbose: true + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-Coverage-${{ github.ref }}-${{ github.sha }}-PR diff --git a/.github/workflows/csmith.yaml b/.github/workflows/csmith.yaml index 536bfa97366..e8890a80226 100644 --- a/.github/workflows/csmith.yaml +++ b/.github/workflows/csmith.yaml @@ -22,10 +22,9 @@ jobs: sudo apt-get install --no-install-recommends -y build-essential flex bison maven ccache clang-19 clang++-19 sudo apt-get install --no-install-recommends -y csmith libcsmith-dev make -C src minisat2-download - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-CSMITH restore-keys: | @@ -46,3 +45,9 @@ jobs: run: | export PATH=$PWD/src/cbmc:$PWD/src/goto-cc:$PWD/src/goto-instrument:$PATH scripts/csmith.sh 10 + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-CSMITH diff --git a/.github/workflows/pull-request-check-rust-api.yaml b/.github/workflows/pull-request-check-rust-api.yaml index 2edf2856d3a..3878167178f 100644 --- a/.github/workflows/pull-request-check-rust-api.yaml +++ b/.github/workflows/pull-request-check-rust-api.yaml @@ -32,10 +32,9 @@ jobs: sudo apt-get install --no-install-recommends -yq clang-13 clang++-13 flex bison libxml2-utils ccache - name: Log cargo/rust version run: cargo --version - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-22.04-cmake-clang-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -69,6 +68,12 @@ jobs: CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1 + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-22.04-cmake-clang-${{ github.ref }}-${{ github.sha }}-PR check-macos-15-intel-cmake-clang-rust: runs-on: macos-15-intel steps: @@ -79,10 +84,9 @@ jobs: run: brew install cmake ninja flex bison ccache - name: Log cargo/rust version run: cargo --version - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-Release-Minisat-${{ github.ref }}-${{ github.sha }}-PR-Rust-API restore-keys: | @@ -109,3 +113,9 @@ jobs: cd src/libcprover-rust;\ cargo clean;\ CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1 + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-Release-Minisat-${{ github.ref }}-${{ github.sha }}-PR-Rust-API diff --git a/.github/workflows/pull-request-checks.yaml b/.github/workflows/pull-request-checks.yaml index 9acda5bb1ed..e5bda6533b9 100644 --- a/.github/workflows/pull-request-checks.yaml +++ b/.github/workflows/pull-request-checks.yaml @@ -32,10 +32,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-make-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -91,6 +90,12 @@ jobs: exit 1 fi + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-make-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 25 to 34 minutes check-ubuntu-24_04-make-clang: runs-on: ubuntu-24.04 @@ -117,10 +122,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -157,6 +161,12 @@ jobs: make -C regression/cbmc test-cprover-smt2 make -C jbmc/regression test-parallel JOBS=${{env.linux-vcpus}} + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR # This job has been copied from the one above it, and modified to only build CBMC # and run the `regression/cbmc/` regression tests against Z3. The rest of the tests # (unit/regression) have been stripped based on the rationale that they are going @@ -183,10 +193,9 @@ jobs: cpanm Thread::Pool::Simple - name: Confirm z3 solver is available and log the version installed run: z3 --version - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -205,6 +214,12 @@ jobs: - name: Run regression/cbmc tests with z3 as the backend run: make -C regression/cbmc test-z3 + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 17 to 42 minutes check-ubuntu-24_04-cmake-gcc: runs-on: ubuntu-24.04 @@ -226,10 +241,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -277,6 +291,12 @@ jobs: exit 1 fi + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 20 to 38 minutes check-ubuntu-22_04-make-clang: runs-on: ubuntu-22.04 @@ -303,10 +323,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-22.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -347,6 +366,12 @@ jobs: make -C regression/cbmc test-cprover-smt2 make -C jbmc/regression test-parallel JOBS=${{env.linux-vcpus}} + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-22.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 17 to 41 minutes check-ubuntu-22_04-cmake-gcc: runs-on: ubuntu-22.04 @@ -368,10 +393,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-22.04-Release-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -399,6 +423,12 @@ jobs: - name: Run tests run: cd build; ctest . -V -L CORE -j${{env.linux-vcpus}} + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-22.04-Release-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 14 to 46 minutes check-ubuntu-24_04-cmake-gcc-14: runs-on: ubuntu-24.04 @@ -426,10 +456,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-Release-gcc-14-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -450,6 +479,12 @@ jobs: - name: Run tests run: cd build; ctest . -V -L CORE -j${{env.linux-vcpus}} + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-Release-gcc-14-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 17 to 41 minutes check-ubuntu-24_04-arm-cmake-gcc: runs-on: ubuntu-24.04-arm @@ -471,10 +506,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -502,6 +536,12 @@ jobs: - name: Run tests run: cd build; ctest . -V -L CORE -j${{env.linux-vcpus}} + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 14 to 60 minutes check-ubuntu-22_04-cmake-gcc-32bit: runs-on: ubuntu-22.04 @@ -523,10 +563,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-22.04-Release-32-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -547,6 +586,12 @@ jobs: - name: Run tests run: cd build; ctest . -V -L CORE -j${{env.linux-vcpus}} + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-22.04-Release-32-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 2 to 24 minutes check-ubuntu-24_04-cmake-gcc-KNOWNBUG: runs-on: ubuntu-24.04 @@ -562,10 +607,9 @@ jobs: run: | sudo apt-get update sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils ccache z3 - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -594,6 +638,12 @@ jobs: git checkout -- memory_allocation1 printf1 printf3 union12 va_list3 ../test.pl -c "cbmc --cprover-smt2" -I broken-smt-backend -K + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 7 to 30 minutes check-ubuntu-24_04-cmake-gcc-THOROUGH: runs-on: ubuntu-24.04 @@ -609,10 +659,9 @@ jobs: run: | sudo apt-get update sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils ccache z3 - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -633,6 +682,12 @@ jobs: - name: Run tests run: cd build; ctest . -V -L THOROUGH -j${{env.linux-vcpus}} + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 39 to 69 minutes check-macos-15-intel-make-clang: runs-on: macos-15-intel @@ -651,10 +706,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-make-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -688,6 +742,12 @@ jobs: - name: Run JBMC regression tests run: make -C jbmc/regression test-parallel JOBS=4 + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-make-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 36 to 85 minutes check-macos-14-cmake-clang: runs-on: macos-14 @@ -703,10 +763,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-Release-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -730,6 +789,12 @@ jobs: - name: Run CTest run: cd build; ctest -V -L CORE . -j3 + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-Release-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 49 to 70 minutes check-vs-2025-cmake-build-and-test: runs-on: windows-2025 @@ -783,10 +848,9 @@ jobs: run: z3 --version - name: Confirm cvc5 solver is available and log the version installed run: cvc5 --version - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-msbuild-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -812,6 +876,12 @@ jobs: Set-Location build ctest -V -L CORE -C Release . -j${{env.windows-vcpus}} + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-msbuild-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 65 to 84 minutes check-vs-2022-make-build-and-test: runs-on: windows-2022 @@ -870,10 +940,9 @@ jobs: run: cvc5 --version - name: Initialise Developer Command Line uses: ilammy/msvc-dev-cmd@v1 - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-msbuild-make-${{ github.ref }}-${{ github.sha }}-PR restore-keys: | @@ -911,6 +980,12 @@ jobs: - name: Run CBMC regression tests run: make CXX=clcache BUILD_ENV=MSVC -j${{env.windows-vcpus}} -C regression test-parallel-jobs + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-msbuild-make-${{ github.ref }}-${{ github.sha }}-PR # This job takes approximately 7 to 32 minutes windows-msi-package: runs-on: windows-2025 @@ -952,10 +1027,9 @@ jobs: Require-Tool win_bison nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0 echo "c:\tools\clcache\clcache-4.1.0" >> $env:GITHUB_PATH - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-msbuild-${{ github.ref }}-${{ github.sha }}-PKG restore-keys: | @@ -983,6 +1057,12 @@ jobs: echo "msi_installer=build/$msi_name" >> $env:GITHUB_OUTPUT echo "msi_name=$msi_name" >> $env:GITHUB_OUTPUT + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-msbuild-${{ github.ref }}-${{ github.sha }}-PKG # This job takes approximately 2 to 3 minutes check-string-table: runs-on: ubuntu-latest diff --git a/.github/workflows/release-packages.yaml b/.github/workflows/release-packages.yaml index b5309cf5f61..048abf8969a 100644 --- a/.github/workflows/release-packages.yaml +++ b/.github/workflows/release-packages.yaml @@ -24,10 +24,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG restore-keys: @@ -71,6 +70,12 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_MESSAGE: "${{ job.status == 'success' && 'Ubuntu 24.04 package built and uploaded successfully' || 'Ubuntu 24.04 package build failed' }}" + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG ubuntu-24_04-arm-package: runs-on: ubuntu-24.04-arm env: @@ -89,10 +94,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG restore-keys: @@ -136,6 +140,12 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_MESSAGE: "${{ job.status == 'success' && 'Ubuntu 24.04 Arm package built and uploaded successfully' || 'Ubuntu 24.04 Arm package build failed' }}" + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG ubuntu-22_04-package: runs-on: ubuntu-22.04 env: @@ -154,10 +164,9 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-22.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG restore-keys: @@ -201,6 +210,12 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_MESSAGE: "${{ job.status == 'success' && 'Ubuntu 22.04 package built and uploaded successfully' || 'Ubuntu 22.04 package build failed' }}" + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-22.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG homebrew-pr: runs-on: macos-15-intel steps: @@ -277,10 +292,9 @@ jobs: run: | dotnet tool install --global AzureSignTool --version 5.0.0 echo "$(Split-Path -Path $(Get-ChildItem -Path "${env:ProgramFiles(x86)}\Windows Kits\10\App Certification Kit\signtool.exe"))" >> $env:GITHUB_PATH - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + uses: actions/cache/restore@v5 with: - save-always: true path: .ccache key: ${{ runner.os }}-msbuild-${{ github.ref }}-${{ github.sha }}-RELEASEPKG restore-keys: | @@ -347,6 +361,12 @@ jobs: SLACK_MESSAGE: "${{ job.status == 'success' && 'Windows package built and uploaded successfully' || 'Windows package build failed' }}" run: go run scripts/slack_notification_action.go + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + key: ${{ runner.os }}-msbuild-${{ github.ref }}-${{ github.sha }}-RELEASEPKG push-docker-image-dockerhub: runs-on: ubuntu-24.04 steps: From b6adff39d6d11384af0ce1463338490556ad1eff Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Wed, 25 Mar 2026 14:01:10 +0000 Subject: [PATCH 2/5] Fix restore-keys to be a multi-line string The missing `|` would render the intended set of keys a single, folded scalar, likely resulting in never managing to match those keys. --- .github/workflows/release-packages.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-packages.yaml b/.github/workflows/release-packages.yaml index 048abf8969a..5e2512fb8a0 100644 --- a/.github/workflows/release-packages.yaml +++ b/.github/workflows/release-packages.yaml @@ -29,7 +29,7 @@ jobs: with: path: .ccache key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG - restore-keys: + restore-keys: | ${{ runner.os }}-24.04-Release-${{ github.ref }} ${{ runner.os }}-24.04-Release - name: ccache environment @@ -99,7 +99,7 @@ jobs: with: path: .ccache key: ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG - restore-keys: + restore-keys: | ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }} ${{ runner.os }}-24.04-Arm-Release - name: ccache environment @@ -169,7 +169,7 @@ jobs: with: path: .ccache key: ${{ runner.os }}-22.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG - restore-keys: + restore-keys: | ${{ runner.os }}-22.04-Release-${{ github.ref }} ${{ runner.os }}-22.04-Release - name: ccache environment From da849fcaa8b515948dd839a7c5c99d255b3e2caa Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Mon, 25 May 2026 19:13:59 +0000 Subject: [PATCH 3/5] bsd.yaml: align NetBSD Save ccache step with FreeBSD/OpenBSD The FreeBSD and OpenBSD jobs in this file have a blank line between the last commented-out line of the Build and Test 'run:' block and the new 'Save ccache' step. The NetBSD job did not, because the diff hunk that introduced the save step landed flush against the closing line of its 'run:' block. Add the matching blank line so all three jobs are formatted identically. Co-authored-by: Kiro --- .github/workflows/bsd.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/bsd.yaml b/.github/workflows/bsd.yaml index 31fd3af314f..8534f813de4 100644 --- a/.github/workflows/bsd.yaml +++ b/.github/workflows/bsd.yaml @@ -206,6 +206,7 @@ jobs: # gmake -C regression/cbmc test-paths-lifo # env PATH=$PATH:`pwd`/src/solvers gmake -C regression/cbmc test-cprover-smt2 # # gmake -C jbmc/regression test-parallel JOBS=2 + - name: Save ccache if: always() uses: actions/cache/save@v5 From f49329a9d65c79ab10e5069113ca14ca1180a287 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Mon, 25 May 2026 19:17:51 +0000 Subject: [PATCH 4/5] Derive ccache save key from restore step's cache-primary-key output When the deprecated 'actions/cache@v5' with 'save-always: true' was split into a 'cache/restore' step and a matching 'cache/save' step, the save step's 'key:' became a literal duplicate of the restore step's 'key:'. With 31 such pairs across nine workflow files (the eight files modified by the previous commit, plus profiling.yaml which already used the split pattern), any future edit to a cache key requires touching two lines per job and is easy to get wrong. Give every restore step the id 'restore-ccache' and reference its 'cache-primary-key' output from the matching save step, so the key only needs to be written once per job. This is the pattern recommended by the actions/cache documentation. Step IDs are job-scoped, so re-using the same id across jobs is safe. Co-authored-by: Kiro --- .github/workflows/bsd.yaml | 9 ++-- .github/workflows/build-and-test-Linux.yaml | 3 +- .github/workflows/build-and-test-Xen.yaml | 3 +- .github/workflows/coverage.yaml | 3 +- .github/workflows/csmith.yaml | 3 +- .github/workflows/profiling.yaml | 6 ++- .../pull-request-check-rust-api.yaml | 6 ++- .github/workflows/pull-request-checks.yaml | 48 ++++++++++++------- .github/workflows/release-packages.yaml | 12 +++-- 9 files changed, 62 insertions(+), 31 deletions(-) diff --git a/.github/workflows/bsd.yaml b/.github/workflows/bsd.yaml index 8534f813de4..74f1142f295 100644 --- a/.github/workflows/bsd.yaml +++ b/.github/workflows/bsd.yaml @@ -14,6 +14,7 @@ jobs: with: submodules: recursive - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -75,7 +76,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: freebsd-15.0-gmake-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 7 to 34 minutes OpenBSD: runs-on: ubuntu-latest @@ -84,6 +85,7 @@ jobs: with: submodules: recursive - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -142,7 +144,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: openbsd-7.7-gmake-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 6 to 29 minutes NetBSD: runs-on: ubuntu-latest @@ -151,6 +153,7 @@ jobs: with: submodules: recursive - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -212,4 +215,4 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: netbsd-10.1-gmake-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/build-and-test-Linux.yaml b/.github/workflows/build-and-test-Linux.yaml index 8d16827f0cc..fcb06d7c0b3 100644 --- a/.github/workflows/build-and-test-Linux.yaml +++ b/.github/workflows/build-and-test-Linux.yaml @@ -25,6 +25,7 @@ jobs: sudo apt-get install --no-install-recommends -y gawk jq - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -57,4 +58,4 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-KERNEL + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/build-and-test-Xen.yaml b/.github/workflows/build-and-test-Xen.yaml index bf979b564dc..9128210400c 100644 --- a/.github/workflows/build-and-test-Xen.yaml +++ b/.github/workflows/build-and-test-Xen.yaml @@ -24,6 +24,7 @@ jobs: sudo apt-get install --no-install-recommends -y libgtk2.0-dev libyajl-dev time ccache clang-19 clang++-19 - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -72,4 +73,4 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-XEN + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index b0dbc314eb9..dd5c40a9785 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -39,6 +39,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -74,4 +75,4 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Coverage-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/csmith.yaml b/.github/workflows/csmith.yaml index e8890a80226..d81ca1dddeb 100644 --- a/.github/workflows/csmith.yaml +++ b/.github/workflows/csmith.yaml @@ -23,6 +23,7 @@ jobs: sudo apt-get install --no-install-recommends -y csmith libcsmith-dev make -C src minisat2-download - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -50,4 +51,4 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-CSMITH + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/profiling.yaml b/.github/workflows/profiling.yaml index 92fd4e42f3e..12fecb27e2b 100644 --- a/.github/workflows/profiling.yaml +++ b/.github/workflows/profiling.yaml @@ -58,6 +58,7 @@ jobs: sudo sysctl kernel.perf_event_paranoid=-1 - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -156,7 +157,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Release-profile-${{ github.sha }} + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # ── Develop job: profile and publish flamegraphs to GitHub Pages ───── profile-develop: @@ -186,6 +187,7 @@ jobs: sudo sysctl kernel.perf_event_paranoid=-1 - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -280,4 +282,4 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Release-profile-${{ github.sha }} + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/pull-request-check-rust-api.yaml b/.github/workflows/pull-request-check-rust-api.yaml index 3878167178f..a8ff40a5a39 100644 --- a/.github/workflows/pull-request-check-rust-api.yaml +++ b/.github/workflows/pull-request-check-rust-api.yaml @@ -33,6 +33,7 @@ jobs: - name: Log cargo/rust version run: cargo --version - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -73,7 +74,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-22.04-cmake-clang-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} check-macos-15-intel-cmake-clang-rust: runs-on: macos-15-intel steps: @@ -85,6 +86,7 @@ jobs: - name: Log cargo/rust version run: cargo --version - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -118,4 +120,4 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-Release-Minisat-${{ github.ref }}-${{ github.sha }}-PR-Rust-API + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/pull-request-checks.yaml b/.github/workflows/pull-request-checks.yaml index e5bda6533b9..224eb7f1df4 100644 --- a/.github/workflows/pull-request-checks.yaml +++ b/.github/workflows/pull-request-checks.yaml @@ -33,6 +33,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -95,7 +96,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-make-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 25 to 34 minutes check-ubuntu-24_04-make-clang: runs-on: ubuntu-24.04 @@ -123,6 +124,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -166,7 +168,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job has been copied from the one above it, and modified to only build CBMC # and run the `regression/cbmc/` regression tests against Z3. The rest of the tests # (unit/regression) have been stripped based on the rationale that they are going @@ -194,6 +196,7 @@ jobs: - name: Confirm z3 solver is available and log the version installed run: z3 --version - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -219,7 +222,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 17 to 42 minutes check-ubuntu-24_04-cmake-gcc: runs-on: ubuntu-24.04 @@ -242,6 +245,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -296,7 +300,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 20 to 38 minutes check-ubuntu-22_04-make-clang: runs-on: ubuntu-22.04 @@ -324,6 +328,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -371,7 +376,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-22.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 17 to 41 minutes check-ubuntu-22_04-cmake-gcc: runs-on: ubuntu-22.04 @@ -394,6 +399,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -428,7 +434,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-22.04-Release-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 14 to 46 minutes check-ubuntu-24_04-cmake-gcc-14: runs-on: ubuntu-24.04 @@ -457,6 +463,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -484,7 +491,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Release-gcc-14-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 17 to 41 minutes check-ubuntu-24_04-arm-cmake-gcc: runs-on: ubuntu-24.04-arm @@ -507,6 +514,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -541,7 +549,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 14 to 60 minutes check-ubuntu-22_04-cmake-gcc-32bit: runs-on: ubuntu-22.04 @@ -564,6 +572,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -591,7 +600,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-22.04-Release-32-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 2 to 24 minutes check-ubuntu-24_04-cmake-gcc-KNOWNBUG: runs-on: ubuntu-24.04 @@ -608,6 +617,7 @@ jobs: sudo apt-get update sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils ccache z3 - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -643,7 +653,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 7 to 30 minutes check-ubuntu-24_04-cmake-gcc-THOROUGH: runs-on: ubuntu-24.04 @@ -660,6 +670,7 @@ jobs: sudo apt-get update sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils ccache z3 - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -687,7 +698,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 39 to 69 minutes check-macos-15-intel-make-clang: runs-on: macos-15-intel @@ -707,6 +718,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -747,7 +759,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-make-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 36 to 85 minutes check-macos-14-cmake-clang: runs-on: macos-14 @@ -764,6 +776,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -794,7 +807,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-Release-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 49 to 70 minutes check-vs-2025-cmake-build-and-test: runs-on: windows-2025 @@ -849,6 +862,7 @@ jobs: - name: Confirm cvc5 solver is available and log the version installed run: cvc5 --version - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -881,7 +895,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-msbuild-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 65 to 84 minutes check-vs-2022-make-build-and-test: runs-on: windows-2022 @@ -941,6 +955,7 @@ jobs: - name: Initialise Developer Command Line uses: ilammy/msvc-dev-cmd@v1 - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -985,7 +1000,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-msbuild-make-${{ github.ref }}-${{ github.sha }}-PR + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 7 to 32 minutes windows-msi-package: runs-on: windows-2025 @@ -1028,6 +1043,7 @@ jobs: nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0 echo "c:\tools\clcache\clcache-4.1.0" >> $env:GITHUB_PATH - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -1062,7 +1078,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-msbuild-${{ github.ref }}-${{ github.sha }}-PKG + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 2 to 3 minutes check-string-table: runs-on: ubuntu-latest diff --git a/.github/workflows/release-packages.yaml b/.github/workflows/release-packages.yaml index 5e2512fb8a0..946407b02cb 100644 --- a/.github/workflows/release-packages.yaml +++ b/.github/workflows/release-packages.yaml @@ -25,6 +25,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -75,7 +76,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} ubuntu-24_04-arm-package: runs-on: ubuntu-24.04-arm env: @@ -95,6 +96,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -145,7 +147,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} ubuntu-22_04-package: runs-on: ubuntu-22.04 env: @@ -165,6 +167,7 @@ jobs: with: version: ${{ env.cvc5-version }} - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -215,7 +218,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-22.04-Release-${{ github.ref }}-${{ github.sha }}-RELEASEPKG + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} homebrew-pr: runs-on: macos-15-intel steps: @@ -293,6 +296,7 @@ jobs: dotnet tool install --global AzureSignTool --version 5.0.0 echo "$(Split-Path -Path $(Get-ChildItem -Path "${env:ProgramFiles(x86)}\Windows Kits\10\App Certification Kit\signtool.exe"))" >> $env:GITHUB_PATH - name: Restore ccache + id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -366,7 +370,7 @@ jobs: uses: actions/cache/save@v5 with: path: .ccache - key: ${{ runner.os }}-msbuild-${{ github.ref }}-${{ github.sha }}-RELEASEPKG + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} push-docker-image-dockerhub: runs-on: ubuntu-24.04 steps: From 61684925b1b694472e8f5775e90ee7831d7620f8 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Mon, 25 May 2026 19:29:51 +0000 Subject: [PATCH 5/5] Sequence KNOWNBUG/THOROUGH after cmake-gcc, share its ccache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three jobs in pull-request-checks.yaml previously saved their ccache under the identical key '${{ runner.os }}-24.04-Release-${{ github.ref }}-${{ github.sha }}-PR': - check-ubuntu-24_04-cmake-gcc - check-ubuntu-24_04-cmake-gcc-KNOWNBUG - check-ubuntu-24_04-cmake-gcc-THOROUGH Under the implicit save semantics of 'actions/cache@v5' the collision was silently resolved (whichever of the three jobs finished first won the cache write); after switching to 'actions/cache/save@v5' the losers log a 'Failed to save: Unable to reserve cache with key …' warning. Beyond the noise, the three jobs were also racing to compile the same translation units with no shared cache hits within a single workflow run. Make 'check-ubuntu-24_04-cmake-gcc' the sole producer of this cache lineage: - 'check-ubuntu-24_04-cmake-gcc-KNOWNBUG' and 'check-ubuntu-24_04-cmake-gcc-THOROUGH' now declare 'needs: check-ubuntu-24_04-cmake-gcc' so they start only after the producer's 'Save ccache' has run. - Their own 'Save ccache' steps (and the now-unused 'id:' on the matching restore steps) are removed. - The KNOWNBUG cmake invocation gains '-Dsat_impl="minisat2;cadical"' so its compile commands hash identically to the producer's. Without this, every translation unit that depends on which SAT backends are enabled (most of src/solvers/) would miss the hot cache. Net effect: a single deterministic ccache producer per workflow run, no collision warnings, and KNOWNBUG/THOROUGH benefit from a same-run hot cache rather than only a previous run's warm cache. Co-authored-by: Kiro --- .github/workflows/pull-request-checks.yaml | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pull-request-checks.yaml b/.github/workflows/pull-request-checks.yaml index 224eb7f1df4..02dd7a4211e 100644 --- a/.github/workflows/pull-request-checks.yaml +++ b/.github/workflows/pull-request-checks.yaml @@ -604,6 +604,11 @@ jobs: # This job takes approximately 2 to 24 minutes check-ubuntu-24_04-cmake-gcc-KNOWNBUG: runs-on: ubuntu-24.04 + # Sequenced after check-ubuntu-24_04-cmake-gcc so that this job benefits + # from the matching ccache produced in the same workflow run. The cmake + # configure flags below must stay in sync with that job's so the compile + # commands hash identically and ccache hits in full. + needs: check-ubuntu-24_04-cmake-gcc steps: - uses: actions/checkout@v6 with: @@ -617,7 +622,6 @@ jobs: sudo apt-get update sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils ccache z3 - name: Restore ccache - id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -630,7 +634,7 @@ jobs: echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV - name: Configure using CMake - run: cmake -H. -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ + run: cmake -H. -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -Dsat_impl="minisat2;cadical" - name: Zero ccache stats and limit in size run: ccache -z --max-size=500M - name: Build with Ninja @@ -648,15 +652,16 @@ jobs: git checkout -- memory_allocation1 printf1 printf3 union12 va_list3 ../test.pl -c "cbmc --cprover-smt2" -I broken-smt-backend -K - - name: Save ccache - if: always() - uses: actions/cache/save@v5 - with: - path: .ccache - key: ${{ steps.restore-ccache.outputs.cache-primary-key }} + # No "Save ccache" step here: the cache is produced by + # check-ubuntu-24_04-cmake-gcc, which this job depends on. # This job takes approximately 7 to 30 minutes check-ubuntu-24_04-cmake-gcc-THOROUGH: runs-on: ubuntu-24.04 + # Sequenced after check-ubuntu-24_04-cmake-gcc so that this job benefits + # from the matching ccache produced in the same workflow run. The cmake + # configure flags below must stay in sync with that job's so the compile + # commands hash identically and ccache hits in full. + needs: check-ubuntu-24_04-cmake-gcc steps: - uses: actions/checkout@v6 with: @@ -670,7 +675,6 @@ jobs: sudo apt-get update sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils ccache z3 - name: Restore ccache - id: restore-ccache uses: actions/cache/restore@v5 with: path: .ccache @@ -693,12 +697,8 @@ jobs: - name: Run tests run: cd build; ctest . -V -L THOROUGH -j${{env.linux-vcpus}} - - name: Save ccache - if: always() - uses: actions/cache/save@v5 - with: - path: .ccache - key: ${{ steps.restore-ccache.outputs.cache-primary-key }} + # No "Save ccache" step here: the cache is produced by + # check-ubuntu-24_04-cmake-gcc, which this job depends on. # This job takes approximately 39 to 69 minutes check-macos-15-intel-make-clang: runs-on: macos-15-intel