From 976655b599620e3d72f06de7d139c4d44ab80306 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sat, 5 Apr 2025 00:11:05 -0400 Subject: [PATCH] CI: Cache macOS Homebrew and Scons (#788) * CI: Cache macOS builds * try caching now * close * revert * save homebrew cache * final --- .github/workflows/selfdrive_tests.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 92f1766835..aefc4ec01f 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -105,6 +105,12 @@ jobs: env: # package install has DeprecationWarnings PYTHONWARNINGS: default + - name: Save Homebrew cache + uses: actions/cache/save@v4 + if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') + with: + path: ~/Library/Caches/Homebrew + key: brew-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }} - run: git lfs pull - name: Getting scons cache uses: ./.github/workflows/auto-cache @@ -116,6 +122,12 @@ jobs: scons-${{ runner.arch }}-macos - name: Building openpilot run: . .venv/bin/activate && scons -j$(nproc) + - name: Save scons cache + uses: actions/cache/save@v4 + if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') + with: + path: /tmp/scons_cache + key: scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }} static_analysis: name: static analysis