Try building arm64 image on macos-arm-oss #226
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: Publish | |
on: | |
release: | |
types: [published] | |
pull_request: | |
push: | |
branches: | |
- master | |
schedule: | |
# Everyday Wednesday on 01:32 UTC. This timing is handy because while | |
# European countries are in midnight, American countries are still in | |
# their evening and Asian countries are in the next morning. | |
- cron: '32 1 * * 3' | |
jobs: | |
push: | |
strategy: | |
fail-fast: false | |
matrix: | |
entry: | |
- { os: 'lunar', baseruby: '3.1', tag: 'gcc-13', extras: 'g++-13' } | |
- { os: 'jammy', baseruby: '3.0', tag: 'gcc-12', extras: 'g++-12' } | |
- { os: 'focal', baseruby: '2.7', tag: 'gcc-11', extras: 'g++-11' } | |
- { os: 'focal', baseruby: '2.7', tag: 'gcc-10', extras: 'g++-10' } | |
- { os: 'focal', baseruby: '2.7', tag: 'gcc-9', extras: 'g++-9' } | |
- { os: 'focal', baseruby: '2.7', tag: 'gcc-8', extras: 'g++-8' } | |
- { os: 'focal', baseruby: '2.7', tag: 'gcc-7', extras: 'g++-7' } | |
- { os: 'jammy', baseruby: '3.0', tag: 'clang-18', extras: 'llvm-18' } | |
- { os: 'jammy', baseruby: '3.0', tag: 'clang-17', extras: 'llvm-17' } | |
- { os: 'jammy', baseruby: '3.0', tag: 'clang-16', extras: 'llvm-16' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-15', extras: 'llvm-15' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-14', extras: 'llvm-14' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-13', extras: 'llvm-13' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-12', extras: 'llvm-12' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-11', extras: 'llvm-11' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-10', extras: 'llvm-10' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-9', extras: 'llvm-9' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-8', extras: 'llvm-8' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-7', extras: 'llvm-7' } | |
- { os: 'focal', baseruby: '2.7', tag: 'clang-6.0', extras: 'llvm-6.0' } | |
- { os: 'focal', baseruby: '2.7', tag: 'mingw-w64' } | |
- { os: 'focal', baseruby: '2.7', tag: 'crossbuild-essential-arm64' } | |
- { os: 'focal', baseruby: '2.7', tag: 'crossbuild-essential-ppc64el' } | |
- { os: 'focal', baseruby: '2.7', tag: 'crossbuild-essential-s390x' } | |
arch: | |
- { image: 'ubuntu-latest', platforms: 'linux/amd64' } | |
- { image: 'macos-arm-oss', platforms: 'linux/arm64' } | |
name: Publish ${{ matrix.entry.tag }} ${{ matrix.arch.platforms }} | |
runs-on: ${{ matrix.arch.image }} | |
steps: | |
- name: Setup docker | |
run: | | |
brew install --cask docker | |
if ! pgrep -f Docker.app; then | |
open -a /Applications/Docker.app | |
# Wait for Docker to be ready | |
while ! docker info >/dev/null 2>&1; do sleep 1; done | |
fi | |
timeout-minutes: 5 | |
if: ${{ matrix.arch.image == 'macos-arm-oss' }} | |
- uses: docker/setup-buildx-action@v2 | |
if: ${{ matrix.arch.image == 'ubuntu-latest' }} | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.ACCESS_TOKEN }} | |
registry: ghcr.io | |
- uses: docker/build-push-action@v4 | |
with: | |
build-args: | | |
version=${{ matrix.entry.os }} | |
baseruby=${{ matrix.entry.baseruby }} | |
packages=${{ matrix.entry.tag }} ${{ matrix.entry.extras }} | |
cache-from: type=gha | |
cache-to: type=gha | |
platforms: ${{ matrix.arch.platforms }} | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: | | |
ghcr.io/${{ github.repository }}:${{ matrix.entry.tag }} | |
# clang-18 is gone for some reason, but we hope it'll come back at some point. | |
continue-on-error: ${{ matrix.entry.tag == 'clang-18' }} |