chore(release/0.17): release 0.17.2 (#433) #118
This file contains hidden or 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 and push images | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - 'release/**' | |
| env: | |
| CUDA_ARCHS: '80,86,89,90,100,120' | |
| jobs: | |
| image_meta: | |
| name: Get image metadata | |
| runs-on: ubuntu-latest | |
| outputs: | |
| sha_tag: ${{ steps.meta.outputs.sha_tag }} | |
| registry: ${{ steps.meta.outputs.registry }} | |
| steps: | |
| - name: Get image metadata | |
| id: meta | |
| run: | | |
| GIT_SHA="${{ github.sha }}" | |
| echo "sha_tag=${GIT_SHA:0:7}" >> $GITHUB_OUTPUT | |
| echo "registry=ghcr.io/${{ github.repository }}" >> $GITHUB_OUTPUT | |
| build_and_push: | |
| name: Build and push docker image (${{ matrix.zkvm }}) | |
| needs: image_meta | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| zkvm: | |
| - openvm | |
| - sp1 | |
| - zisk | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Free up disk space | |
| run: bash .github/scripts/free-up-disk-space.sh | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build ere-base and ere-base-${{ matrix.zkvm }} images | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| bash .github/scripts/build-image.sh \ | |
| --zkvm ${{ matrix.zkvm }} \ | |
| --registry ${{ needs.image_meta.outputs.registry }} \ | |
| --tag ${{ needs.image_meta.outputs.sha_tag }} \ | |
| --base | |
| - name: Build ere-compiler-${{ matrix.zkvm }} and ere-server-${{ matrix.zkvm }} images | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| bash .github/scripts/build-image.sh \ | |
| --zkvm ${{ matrix.zkvm }} \ | |
| --registry ${{ needs.image_meta.outputs.registry }} \ | |
| --tag ${{ needs.image_meta.outputs.sha_tag }} \ | |
| --compiler \ | |
| --server | |
| - name: Push images and add semver/latest tag if release tag exists | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| VERSION_TAG=$(gh api --paginate "repos/${{ github.repository }}/tags" \ | |
| --jq ".[] | select(.commit.sha == \"${{ github.sha }}\" and (.name | startswith(\"v\"))) | .name" \ | |
| | head -n1) | |
| SHA_TAG="${{ needs.image_meta.outputs.sha_tag }}" | |
| for IMAGE_KIND in base compiler server; do | |
| IMAGE="${{ needs.image_meta.outputs.registry }}/ere-$IMAGE_KIND-${{ matrix.zkvm }}" | |
| echo "Pushing $IMAGE:$SHA_TAG" | |
| docker push "$IMAGE:$SHA_TAG" | |
| if [ -n "$VERSION_TAG" ]; then | |
| SEMVER_TAG="${VERSION_TAG#v}" | |
| echo "Tagging $IMAGE:$SHA_TAG as $IMAGE:$SEMVER_TAG and $IMAGE:latest" | |
| docker buildx imagetools create "$IMAGE:$SHA_TAG" \ | |
| --tag "$IMAGE:$SEMVER_TAG" \ | |
| --tag "$IMAGE:latest" | |
| fi | |
| done | |
| build_and_push_cuda: | |
| name: Build and push CUDA docker image (${{ matrix.zkvm }}) | |
| needs: image_meta | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| zkvm: | |
| - openvm | |
| - sp1 | |
| - zisk | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Free up disk space | |
| run: bash .github/scripts/free-up-disk-space.sh | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build ere-base and ere-base-${{ matrix.zkvm }} images with CUDA enabled | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| bash .github/scripts/build-image.sh \ | |
| --zkvm ${{ matrix.zkvm }} \ | |
| --registry ${{ needs.image_meta.outputs.registry }} \ | |
| --tag ${{ needs.image_meta.outputs.sha_tag }}-cuda \ | |
| --base \ | |
| --cuda-archs '${{ env.CUDA_ARCHS }}' | |
| - name: Build ere-server-${{ matrix.zkvm }} image with CUDA enabled | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| bash .github/scripts/build-image.sh \ | |
| --zkvm ${{ matrix.zkvm }} \ | |
| --registry ${{ needs.image_meta.outputs.registry }} \ | |
| --tag ${{ needs.image_meta.outputs.sha_tag }}-cuda \ | |
| --server \ | |
| --cuda-archs '${{ env.CUDA_ARCHS }}' | |
| - name: Push CUDA images and add semver/latest tag if release tag exists | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| VERSION_TAG=$(gh api --paginate "repos/${{ github.repository }}/tags" \ | |
| --jq ".[] | select(.commit.sha == \"${{ github.sha }}\" and (.name | startswith(\"v\"))) | .name" \ | |
| | head -n1) | |
| SHA_TAG="${{ needs.image_meta.outputs.sha_tag }}-cuda" | |
| for IMAGE_KIND in base server; do | |
| IMAGE="${{ needs.image_meta.outputs.registry }}/ere-$IMAGE_KIND-${{ matrix.zkvm }}" | |
| echo "Pushing $IMAGE:$SHA_TAG" | |
| docker push "$IMAGE:$SHA_TAG" | |
| if [ -n "$VERSION_TAG" ]; then | |
| SEMVER_TAG="${VERSION_TAG#v}-cuda" | |
| echo "Tagging $IMAGE:$SHA_TAG as $IMAGE:$SEMVER_TAG and $IMAGE:latest-cuda" | |
| docker buildx imagetools create "$IMAGE:$SHA_TAG" \ | |
| --tag "$IMAGE:$SEMVER_TAG" \ | |
| --tag "$IMAGE:latest-cuda" | |
| fi | |
| done |