diff --git a/.github/workflows/bsd.yaml b/.github/workflows/bsd.yaml index 17662383fd7..74f1142f295 100644 --- a/.github/workflows/bsd.yaml +++ b/.github/workflows/bsd.yaml @@ -13,10 +13,10 @@ jobs: - uses: actions/checkout@v6 with: submodules: recursive - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +71,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 7 to 34 minutes OpenBSD: runs-on: ubuntu-latest @@ -78,10 +84,10 @@ jobs: - uses: actions/checkout@v6 with: submodules: recursive - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +139,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 6 to 29 minutes NetBSD: runs-on: ubuntu-latest @@ -140,10 +152,10 @@ jobs: - uses: actions/checkout@v6 with: submodules: recursive - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +209,10 @@ 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: ${{ 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 31fc894d5f4..fcb06d7c0b3 100644 --- a/.github/workflows/build-and-test-Linux.yaml +++ b/.github/workflows/build-and-test-Linux.yaml @@ -24,10 +24,10 @@ 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 + id: 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 +53,9 @@ jobs: with: name: CPROVER-faultyInput path: CPROVER/faultyInput/* + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + 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 6f1af4731e8..9128210400c 100644 --- a/.github/workflows/build-and-test-Xen.yaml +++ b/.github/workflows/build-and-test-Xen.yaml @@ -23,10 +23,10 @@ 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 + id: 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 +68,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index e4a71b5b452..dd5c40a9785 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -38,10 +38,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +70,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/csmith.yaml b/.github/workflows/csmith.yaml index 536bfa97366..d81ca1dddeb 100644 --- a/.github/workflows/csmith.yaml +++ b/.github/workflows/csmith.yaml @@ -22,10 +22,10 @@ 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 + id: 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 +46,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: ${{ 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 2edf2856d3a..a8ff40a5a39 100644 --- a/.github/workflows/pull-request-check-rust-api.yaml +++ b/.github/workflows/pull-request-check-rust-api.yaml @@ -32,10 +32,10 @@ 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 + id: 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 +69,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} check-macos-15-intel-cmake-clang-rust: runs-on: macos-15-intel steps: @@ -79,10 +85,10 @@ 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 + id: 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 +115,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} diff --git a/.github/workflows/pull-request-checks.yaml b/.github/workflows/pull-request-checks.yaml index 9acda5bb1ed..02dd7a4211e 100644 --- a/.github/workflows/pull-request-checks.yaml +++ b/.github/workflows/pull-request-checks.yaml @@ -32,10 +32,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +91,12 @@ jobs: exit 1 fi + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + 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 @@ -117,10 +123,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +163,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: ${{ 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 @@ -183,10 +195,10 @@ 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 + id: 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 +217,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: ${{ 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 @@ -226,10 +244,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +295,12 @@ jobs: exit 1 fi + - name: Save ccache + if: always() + uses: actions/cache/save@v5 + with: + path: .ccache + 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 @@ -303,10 +327,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +371,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: ${{ 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 @@ -368,10 +398,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +429,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: ${{ 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 @@ -426,10 +462,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +486,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: ${{ 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 @@ -471,10 +513,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +544,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: ${{ 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 @@ -523,10 +571,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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,9 +595,20 @@ 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: ${{ 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 + # 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: @@ -562,10 +621,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: | @@ -576,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 @@ -594,9 +652,16 @@ jobs: git checkout -- memory_allocation1 printf1 printf3 union12 va_list3 ../test.pl -c "cbmc --cprover-smt2" -I broken-smt-backend -K + # 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: @@ -609,10 +674,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 +697,8 @@ jobs: - name: Run tests run: cd build; ctest . -V -L THOROUGH -j${{env.linux-vcpus}} + # 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 @@ -651,10 +717,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +754,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 36 to 85 minutes check-macos-14-cmake-clang: runs-on: macos-14 @@ -703,10 +775,10 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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 +802,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: ${{ 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 @@ -783,10 +861,10 @@ 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 + id: 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 +890,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: ${{ 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 @@ -870,10 +954,10 @@ 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 + id: 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 +995,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} # This job takes approximately 7 to 32 minutes windows-msi-package: runs-on: windows-2025 @@ -952,10 +1042,10 @@ 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 + id: 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 +1073,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: ${{ 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 b5309cf5f61..946407b02cb 100644 --- a/.github/workflows/release-packages.yaml +++ b/.github/workflows/release-packages.yaml @@ -24,13 +24,13 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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: + restore-keys: | ${{ runner.os }}-24.04-Release-${{ github.ref }} ${{ runner.os }}-24.04-Release - name: ccache environment @@ -71,6 +71,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} ubuntu-24_04-arm-package: runs-on: ubuntu-24.04-arm env: @@ -89,13 +95,13 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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: + restore-keys: | ${{ runner.os }}-24.04-Arm-Release-${{ github.ref }} ${{ runner.os }}-24.04-Arm-Release - name: ccache environment @@ -136,6 +142,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} ubuntu-22_04-package: runs-on: ubuntu-22.04 env: @@ -154,13 +166,13 @@ jobs: uses: ./.github/actions/install-cvc5 with: version: ${{ env.cvc5-version }} - - name: Prepare ccache - uses: actions/cache@v5 + - name: Restore ccache + id: 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: + restore-keys: | ${{ runner.os }}-22.04-Release-${{ github.ref }} ${{ runner.os }}-22.04-Release - name: ccache environment @@ -201,6 +213,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} homebrew-pr: runs-on: macos-15-intel steps: @@ -277,10 +295,10 @@ 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 + id: 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 +365,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: ${{ steps.restore-ccache.outputs.cache-primary-key }} push-docker-image-dockerhub: runs-on: ubuntu-24.04 steps: