Skip to content

Commit

Permalink
feat: Add caching for Rust and Homebrew in macOS GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
silviot committed Dec 7, 2024
1 parent 67e41be commit b75785e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,29 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1

# Cache Rust build artifacts
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-cargo-
# Cache Homebrew packages
- uses: actions/cache@v3
with:
path: |
~/Library/Caches/Homebrew
/usr/local/Homebrew
/opt/homebrew
key: ${{ runner.os }}-${{ matrix.arch }}-brew-${{ hashFiles('.github/workflows/build.yml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-brew-
- name: Install dependencies
run: |
if [ "${{ matrix.arch }}" = "x86_64" ]; then
Expand Down

0 comments on commit b75785e

Please sign in to comment.