Skip to content

Enable MacOS support #119

Enable MacOS support

Enable MacOS support #119

Workflow file for this run

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: Install Docker
if: matrix.os == 'macos-14'
run: |
brew install --cask docker
open /Applications/Docker.app
while ! docker system info > /dev/null 2>&1; do
echo "Waiting for Docker to start..."
sleep 5
done
- name: Check Docker Status
if: matrix.os == 'macos-14'
run: |
docker --version
docker info
ps aux | grep -i docker
- 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 }}
# 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 }}