Skip to content

Commit

Permalink
Try building arm64 image on macos-arm-oss
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Feb 16, 2024
1 parent 4a1b9dd commit 6cca0d1
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ jobs:
- { os: 'focal', baseruby: '2.7', tag: 'gcc-8', extras: 'g++-8' }
- { os: 'focal', baseruby: '2.7', tag: 'gcc-7', extras: 'g++-7' }

# The clang-14, 13 arm64 are not available.
- { os: 'jammy', baseruby: '3.0', tag: 'clang-18', extras: 'llvm-18', platforms: 'linux/amd64' }
- { os: 'jammy', baseruby: '3.0', tag: 'clang-17', extras: 'llvm-17', platforms: 'linux/amd64' }
- { os: 'jammy', baseruby: '3.0', tag: 'clang-16', extras: 'llvm-16', platforms: 'linux/amd64' }
- { os: 'focal', baseruby: '2.7', tag: 'clang-15', extras: 'llvm-15', platforms: 'linux/amd64' }
- { os: 'focal', baseruby: '2.7', tag: 'clang-14', extras: 'llvm-14', platforms: 'linux/amd64' }
- { os: 'focal', baseruby: '2.7', tag: 'clang-13', extras: 'llvm-13', platforms: 'linux/amd64' }
- { 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' }
Expand All @@ -47,12 +46,19 @@ jobs:
- { 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 }}
runs-on: ubuntu-latest
name: Publish ${{ matrix.entry.tag }} ${{ matrix.arch.platforms }}
runs-on: ${{ matrix.arch.image }}
steps:
- uses: docker/setup-qemu-action@v2
- run: |
brew install docker colima
colima start
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 }}
Expand All @@ -66,7 +72,7 @@ jobs:
packages=${{ matrix.entry.tag }} ${{ matrix.entry.extras }}
cache-from: type=gha
cache-to: type=gha
platforms: ${{ matrix.entry.platforms || 'linux/amd64,linux/arm64' }}
platforms: ${{ matrix.arch.platforms }}
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository }}:${{ matrix.entry.tag }}
Expand Down

0 comments on commit 6cca0d1

Please sign in to comment.