From 3b27ab36526c9ce37ee6a2f7b2abd1ef146fadc4 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 27 Dec 2024 12:30:43 +1100 Subject: [PATCH] Revert "CI: disable ccache for MacOS builds" This reverts commit c4327161bce5e4ee8b68b6ff4cdc8d19c0d9afc5. --- .github/workflows/macos_build.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 3215bda483716d..bfa7010904366b 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -161,6 +161,22 @@ jobs: fi Tools/environment_install/install-prereqs-mac.sh -y source ~/.bash_profile + # Put ccache into github cache for faster build + - name: Prepare ccache timestamp + id: ccache_cache_timestamp + shell: bash + run: | + NOW=$(date -u +"%F-%T") + echo "timestamp=${NOW}" >> $GITHUB_OUTPUT + - name: ccache cache files + uses: actions/cache@v4 + with: + path: ~/.ccache + key: ${{github.workflow}}-ccache-${{matrix.config}}-${{steps.ccache_cache_timestamp.outputs.timestamp}} + restore-keys: ${{github.workflow}}-ccache-${{matrix.config}} # restore ccache from either previous build on this branch or on master + - name: setup ccache + run: | + . .github/workflows/ccache.env - name: test build ${{matrix.config}} env: CI_BUILD_TARGET: ${{matrix.config}} @@ -173,3 +189,5 @@ jobs: ./waf ./waf configure --board ${{matrix.config}} --debug ./waf + ccache -s + ccache -z