Skip to content

Commit

Permalink
cache macOS CI
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Oct 6, 2024
1 parent d1ed88a commit 6946645
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
with:
submodules: true

- run: mkdir cache runtime
- run: mkdir cache runtime output
working-directory: packaging/binaries

- name: Determine runtime version
Expand All @@ -82,7 +82,7 @@ jobs:
run: xargs -I{} "$HOME/.rvm/bin/rvm" install ruby-{} < packaging/binaries/shared/definitions/ruby_versions
if: steps.fetch_rvm_cache.outputs.cache-hit != 'true'

- name: Update runtime cache
- name: Update RVM cache
run: CACHE_PATH="$HOME/.rvm" ./dev/ci/update-cache-az-blob-storage
if: steps.fetch_rvm_cache.outputs.cache-hit != 'true'
env:
Expand Down Expand Up @@ -112,9 +112,19 @@ jobs:
CACHE_PATH: packaging/binaries/runtime


- run: ./dev/ci/tests/binaries/build-macos
- run: ./macos/build -p "$WORKSPACE" -r runtime -c cache -o output -j 4 passenger nginx
env:
WORKSPACE: ${{ github.workspace }}
working-directory: packaging/binaries

- uses: actions/upload-artifact@v4
with:
name: binaries-macos-${{ matrix.arch }}
path: 'output-macos-${{ matrix.arch }}/**/*'
- run: ./dev/ci/tests/binaries/test-macos
path: 'output/**/*'


- run: ./macos/package -i output -o output
working-directory: packaging/binaries

- run: ./macos/test -p ../.. -r runtime -i output -I output
working-directory: packaging/binaries
1 change: 1 addition & 0 deletions dev/ci/fetch-cache-az-blob-storage
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if [[ "$EXISTS" = True ]]; then
mkdir -p "$CACHE_PATH"
tar -C "$CACHE_PATH" -x --zstd -f "$CACHE_PATH.tar.zstd"
rm "$CACHE_PATH.tar.zstd"
echo "Extracted"

echo "cache-hit=true" >> "$GITHUB_OUTPUT"
else
Expand Down

0 comments on commit 6946645

Please sign in to comment.