Enable MacOS support #115
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: Build | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
branches: | |
- 'master' | |
jobs: | |
build: | |
name: Docker images for ghcr.io | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-14] | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
DOCKER_REGISTRY: ghcr.io | |
DOCKER_IMAGE_BASE: ${{ github.repository }} | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to the registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.DOCKER_REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install and start Colima | |
if: matrix.os == 'macos-14' | |
run: | | |
brew install docker | |
brew install colima | |
colima version | |
colima start | |
# Prover and Verifier | |
- name: Prover&Verifier image tags & labels | |
id: meta-all | |
uses: docker/metadata-action@v3 | |
with: | |
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/stone-prover | |
- name: Prover&Verifier image build & push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: ${{ steps.meta-all.outputs.tags }} | |
labels: ${{ steps.meta-all.outputs.labels }} | |
# Prover | |
- name: Prover image tags & labels | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/cpu_air_prover | |
- name: Prover image build & push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: air_prover/Dockerfile | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
# Verifier | |
- name: Verifier image tags & labels | |
id: meta-ver | |
uses: docker/metadata-action@v3 | |
with: | |
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/cpu_air_verifier | |
- name: Verifier image build & push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: air_verifier/Dockerfile | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: ${{ steps.meta-ver.outputs.tags }} | |
labels: ${{ steps.meta-ver.outputs.labels }} |