cache macOS binaries #85
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Passenger generic binaries CI | |
env: | |
ENTERPRISE: 0 | |
on: | |
push: {} | |
pull_request: {} | |
jobs: | |
# build_linux: | |
# name: "Binary automation Linux-${{ matrix.arch }}" | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# include: | |
# - arch: x86_64 | |
# runner: ubuntu-24.04 | |
# - arch: aarch64 | |
# runner: passenger-ubuntu-24.04-arm64-4cpu | |
# runs-on: ${{ matrix.runner }} | |
# env: | |
# WORKSPACE: ${{ github.workspace }} | |
# OUTPUT_DIR: ${{ github.workspace }}/output-linux-${{ matrix.arch }} | |
# ARCHITECTURE: ${{ matrix.arch }} | |
# CACHE_DIR: ${{ github.workspace }}/cache/linux-${{ matrix.arch }}/executor-${{ github.run_id }} | |
# RUNTIME_DIR: ${{ github.workspace }}/cache/linux-${{ matrix.arch }}/executor-${{ github.run_id }}/runtime | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# submodules: true | |
# - uses: docker/setup-buildx-action@v3 | |
# - run: ./dev/ci/tests/binaries/build-linux | |
# - uses: actions/upload-artifact@v4 | |
# with: | |
# name: binaries-linux-${{ matrix.arch }} | |
# path: 'output-linux-${{ matrix.arch }}/**/*' | |
# - run: ./dev/ci/tests/binaries/test-linux | |
build_macos: | |
name: Binaries macOS ${{ matrix.arch }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- runner: macos-13 | |
arch: x86_64 | |
- runner: macos-14 | |
arch: arm64 | |
runs-on: ${{ matrix.runner }} | |
permissions: | |
id-token: write | |
env: | |
CONTAINER_NAME: ${{ vars.SCCACHE_AZURE_BLOB_CONTAINER }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: mkdir cache runtime | |
working-directory: packaging/binaries | |
- name: Determine runtime version | |
id: determine_runtime_version | |
run: | | |
RUNTIME_VERSION=$(cat shared/definitions/macos_runtime_version) | |
echo "version=$RUNTIME_VERSION" >> "$GITHUB_OUTPUT" | |
working-directory: packaging/binaries | |
- name: Fetch RVM cache | |
run: CACHE_PATH="$HOME/.rvm" ./dev/ci/fetch-cache-az-blob-storage | |
id: fetch_rvm_cache | |
env: | |
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_CI_STORAGE_CONNECTION_STRING }} | |
BLOB_NAME: "rvm-${{ hashFiles('packaging/binaries/shared/definitions/ruby_versions') }}-${{ matrix.runner }}-${{ matrix.arch }}.tar.zstd" | |
- name: Install RVM | |
run: set -o pipefail && curl -fsSL https://get.rvm.io | bash | |
- name: Install Rubies | |
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 | |
run: CACHE_PATH="$HOME/.rvm" ./dev/ci/update-cache-az-blob-storage | |
if: steps.fetch_rvm_cache.outputs.cache-hit != 'true' | |
env: | |
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_CI_STORAGE_CONNECTION_STRING }} | |
BLOB_NAME: "rvm-${{ hashFiles('packaging/binaries/shared/definitions/ruby_versions') }}-${{ matrix.runner }}-${{ matrix.arch }}.tar.zstd" | |
- name: Fetch runtime cache | |
run: ./dev/ci/fetch-cache-az-blob-storage | |
id: fetch_runtime_cache | |
env: | |
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_CI_STORAGE_CONNECTION_STRING }} | |
BLOB_NAME: macos-runtime-${{ steps.determine_runtime_version.outputs.version }}-${{ matrix.runner }}-${{ matrix.arch }}.tar.zstd | |
CACHE_PATH: packaging/binaries/runtime | |
- name: Compile runtime | |
run: ./macos/setup-runtime -c cache -o runtime -j 4 | |
if: steps.fetch_runtime_cache.outputs.cache-hit != 'true' | |
working-directory: packaging/binaries | |
- name: Update runtime cache | |
run: ./dev/ci/update-cache-az-blob-storage | |
if: steps.fetch_runtime_cache.outputs.cache-hit != 'true' | |
env: | |
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_CI_STORAGE_CONNECTION_STRING }} | |
BLOB_NAME: macos-runtime-${{ steps.determine_runtime_version.outputs.version }}-${{ matrix.runner }}-${{ matrix.arch }}.tar.zstd | |
CACHE_PATH: packaging/binaries/runtime | |
- run: ./dev/ci/tests/binaries/build-macos | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: binaries-macos-${{ matrix.arch }} | |
path: 'output-macos-${{ matrix.arch }}/**/*' | |
- run: ./dev/ci/tests/binaries/test-macos |