diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 38bb7435e..7ae393bb5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -115,14 +115,13 @@ jobs: - run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV - name: Homebrew cache uses: ./.github/workflows/auto-cache - if: false # disabling the cache for now because it is breaking macos builds... with: save: false # No need save here if we manually save it later conditionally path: ~/Library/Caches/Homebrew - key: brew-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }} + key: brew-macos-${{ hashFiles('tools/Brewfile') }}-${{ github.sha }} restore-keys: | - brew-macos-${{ env.CACHE_COMMIT_DATE }} - brew-macos + brew-macos-${{ hashFiles('tools/Brewfile') }} + brew-macos- - name: Install dependencies run: ./tools/mac_setup.sh env: @@ -133,7 +132,7 @@ jobs: if: github.ref == 'refs/heads/master' with: path: ~/Library/Caches/Homebrew - key: brew-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }} + key: brew-macos-${{ hashFiles('tools/Brewfile') }}-${{ github.sha }} - run: git lfs pull - name: Getting scons cache uses: ./.github/workflows/auto-cache diff --git a/tools/Brewfile b/tools/Brewfile new file mode 100644 index 000000000..af610be75 --- /dev/null +++ b/tools/Brewfile @@ -0,0 +1,15 @@ +brew "git-lfs" +brew "capnp" +brew "coreutils" +brew "eigen" +brew "ffmpeg" +brew "glfw" +brew "libusb" +brew "libtool" +brew "llvm" +brew "openssl@3.0" +brew "qt@5" +brew "zeromq" +cask "gcc-arm-embedded" +brew "portaudio" +brew "gcc@13" diff --git a/tools/mac_setup.sh b/tools/mac_setup.sh index 0ae0b3535..ae8a1974a 100755 --- a/tools/mac_setup.sh +++ b/tools/mac_setup.sh @@ -32,23 +32,7 @@ else brew up fi -brew bundle --file=- <<-EOS -brew "git-lfs" -brew "capnp" -brew "coreutils" -brew "eigen" -brew "ffmpeg" -brew "glfw" -brew "libusb" -brew "libtool" -brew "llvm" -brew "openssl@3.0" -brew "qt@5" -brew "zeromq" -cask "gcc-arm-embedded" -brew "portaudio" -brew "gcc@13" -EOS +brew bundle --file=$DIR/Brewfile echo "[ ] finished brew install t=$SECONDS"