Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: phase 1 opts + recursion circuit #1638

Merged
merged 522 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
522 commits
Select commit Hold shift + click to select a range
4d7a6a1
feat: BabyBear Optimization in GNARK (#1587)
rkm0959 Oct 2, 2024
c41fb8b
merge dev
tamirhemo Oct 2, 2024
3fbdffa
chore: cleanup (#1593)
tamirhemo Oct 2, 2024
142c005
chore: clippy without `debug_assertions` (#1598)
tamirhemo Oct 3, 2024
a8db6b1
fix: `multi_scalar_multiplication` (#1542)
ratankaliani Oct 3, 2024
778f93d
feat: precompile shapes (#1600)
tamirhemo Oct 3, 2024
4f15504
feat: runtime opts (#1579)
ctian1 Oct 3, 2024
17a604f
merge conflicts
tamirhemo Oct 3, 2024
93fc1b1
update patch
tamirhemo Oct 3, 2024
b0aed08
update
tamirhemo Oct 3, 2024
65bc32d
fix tests
tamirhemo Oct 4, 2024
5d0a056
clippy
tamirhemo Oct 4, 2024
92eec40
unwind
tamirhemo Oct 4, 2024
d20b519
Merge remote-tracking branch 'origin/tamir/v1.3.0-rc2' into tamir/cho…
tamirhemo Oct 4, 2024
30ed1dc
trust in cursor
tamirhemo Oct 4, 2024
4f766da
feat: trusted setup support (#1538)
jtguibas Oct 4, 2024
77e14cb
tweak build_vk_map
ctian1 Oct 4, 2024
f3245c9
chore: merge dev (#1603)
tamirhemo Oct 4, 2024
d57d16d
avoid poison error
ctian1 Oct 4, 2024
0b3acaf
fix
ctian1 Oct 4, 2024
e3d722f
better serialization
tamirhemo Oct 4, 2024
9f3f939
shrink
tamirhemo Oct 4, 2024
675680a
better messages
tamirhemo Oct 4, 2024
bddb167
reflect vks
tamirhemo Oct 4, 2024
d67af88
root assertion
tamirhemo Oct 4, 2024
2c75223
new elfs
tamirhemo Oct 4, 2024
413c0a0
no dupes
tamirhemo Oct 4, 2024
705ec97
fix
tamirhemo Oct 4, 2024
4d7b94f
build
tamirhemo Oct 4, 2024
75fa677
fix: `weierstrass_add` test (#1605)
ratankaliani Oct 4, 2024
0070a84
tweak
ctian1 Oct 4, 2024
17a1371
add more
tamirhemo Oct 4, 2024
3714713
light map
tamirhemo Oct 6, 2024
4a375c5
cleanup
tamirhemo Oct 6, 2024
ebcddaa
shard size
tamirhemo Oct 6, 2024
c7afd50
deferred
tamirhemo Oct 6, 2024
f98f148
deferred new
tamirhemo Oct 6, 2024
b840b42
cleanup
tamirhemo Oct 6, 2024
8cda03c
comment
tamirhemo Oct 7, 2024
ae2205e
Merge remote-tracking branch 'origin/dev' into tamir/v1.3.0-rc2
tamirhemo Oct 7, 2024
516b2f3
capital letters
tamirhemo Oct 7, 2024
29f2cec
cancel 1 env
tamirhemo Oct 7, 2024
171be81
feat: sp1 testing suite (#1563)
jtguibas Oct 7, 2024
39f3051
network job pause
tamirhemo Oct 7, 2024
8c1ee67
run-suite
tamirhemo Oct 7, 2024
f2b963d
try (run-suite)
tamirhemo Oct 7, 2024
ef3b637
just run
tamirhemo Oct 7, 2024
ea89540
run again
tamirhemo Oct 7, 2024
d7ac412
shape in tests
tamirhemo Oct 7, 2024
624ed78
only blobstream
tamirhemo Oct 7, 2024
a179bbb
error handeling
tamirhemo Oct 7, 2024
de0f9b6
fix split threshold
tamirhemo Oct 7, 2024
e5443d4
better error
tamirhemo Oct 7, 2024
f44aad0
fix tests
tamirhemo Oct 7, 2024
3dbf0b6
rm network
tamirhemo Oct 7, 2024
1693762
update image
tamirhemo Oct 7, 2024
6642fba
rerun
tamirhemo Oct 7, 2024
dcd99a3
no cuda
tamirhemo Oct 7, 2024
15e5db7
feat: artifacts (#1614)
tamirhemo Oct 8, 2024
c989dd0
feat: g16/plonk for network (#1617)
jtguibas Oct 8, 2024
93568dc
small tweaks (#1618)
jtguibas Oct 8, 2024
c82798d
chore: tweaks (#1619)
jtguibas Oct 8, 2024
faf18c4
check shrink shaope
tamirhemo Oct 8, 2024
94a3a0d
fix shrink
tamirhemo Oct 8, 2024
6dde7df
update cuda img
jtguibas Oct 8, 2024
26aa833
workflow
jtguibas Oct 8, 2024
12e7cac
update circuit version
jtguibas Oct 8, 2024
7fe8cca
fix
umadayal Oct 8, 2024
805bbd6
uncomment bn254
umadayal Oct 8, 2024
24dd5e1
fail fast: false
umadayal Oct 8, 2024
e64fe1c
makefile
umadayal Oct 8, 2024
b2b47e6
updated cuda image
jtguibas Oct 8, 2024
e02bbd9
Merge branch 'tamir/v1.3.0-rc2' of github.com:succinctlabs/sp1 into t…
jtguibas Oct 8, 2024
3a9babf
more op succinct blocks
jtguibas Oct 8, 2024
168140d
chore: cargo machete (#1606)
ratankaliani Oct 8, 2024
9006808
new shrink shape
tamirhemo Oct 8, 2024
ed9a18f
new vk map
tamirhemo Oct 8, 2024
a16b004
shrink
tamirhemo Oct 8, 2024
a4abe54
try
tamirhemo Oct 8, 2024
dd6b43e
back to original scripts
tamirhemo Oct 8, 2024
181bb7c
switch to new p3
jtguibas Oct 8, 2024
9c8b6ad
cuda image
jtguibas Oct 8, 2024
d92f680
rc3
umadayal Oct 8, 2024
e7cfe16
new shape config
tamirhemo Oct 9, 2024
d5fb320
feat: shape artifacts in s3 (#1621)
jtguibas Oct 9, 2024
dd8cd6d
shape config
tamirhemo Oct 9, 2024
cae2019
verify vk false for cuda
jtguibas Oct 9, 2024
146079e
finish unstaged changes
jtguibas Oct 9, 2024
9ac4162
new shapes
jtguibas Oct 9, 2024
7dd6c85
hm
jtguibas Oct 9, 2024
002e00d
get rid of verify vk
jtguibas Oct 9, 2024
01a7581
update gpu image with new shapes
jtguibas Oct 9, 2024
069cc25
no vk + no fixed shapes
umadayal Oct 9, 2024
25ee7f2
hm
jtguibas Oct 9, 2024
535764d
Merge branch 'tamir/v1.3.0-rc2' of github.com:succinctlabs/sp1 into t…
jtguibas Oct 9, 2024
3a04509
hm
jtguibas Oct 9, 2024
7952bac
update cuda image
umadayal Oct 9, 2024
0dbbb8d
hm
umadayal Oct 9, 2024
e80b093
hmmm
jtguibas Oct 9, 2024
f0a44f5
Merge branch 'tamir/v1.3.0-rc2' of github.com:succinctlabs/sp1 into t…
jtguibas Oct 9, 2024
12d7eb2
rc3
jtguibas Oct 9, 2024
c9c800b
use faster builder
jtguibas Oct 9, 2024
d2610cf
fix sp1 versions
jtguibas Oct 9, 2024
e2cc4bc
x86
jtguibas Oct 9, 2024
254c535
simulate arm in x86
jtguibas Oct 9, 2024
456c1ee
remove arm
jtguibas Oct 9, 2024
c69208d
run main ci on branch
jtguibas Oct 9, 2024
34bf38e
merge dev
jtguibas Oct 9, 2024
cc25584
update docker build system
jtguibas Oct 9, 2024
ae65e88
new workflow
jtguibas Oct 9, 2024
c587ac5
specific platform
jtguibas Oct 9, 2024
ffdcb60
create manifest
jtguibas Oct 9, 2024
1fc5916
fix ci
jtguibas Oct 9, 2024
8b92d54
add print statement
jtguibas Oct 9, 2024
4834f5c
cargo lock
umadayal Oct 9, 2024
59c4234
v3.0.0-rc3 release
umadayal Oct 9, 2024
ea0f48a
feat: dummy proof generation and inclusion by shape (#1622)
tamirhemo Oct 9, 2024
3fa60b2
Merge remote-tracking branch 'origin/tamir/v1.3.0-rc2' into tamir/v3.…
tamirhemo Oct 9, 2024
1f6be4b
fix inclusion logic
tamirhemo Oct 10, 2024
da76d25
fix debug assertion
tamirhemo Oct 10, 2024
510b7d1
with maximal shapes
tamirhemo Oct 10, 2024
d900b66
small shard size
umadayal Oct 10, 2024
0314fee
shape config
tamirhemo Oct 11, 2024
735bb0e
test cuda
tamirhemo Oct 11, 2024
2a33cb4
fix shaoes
tamirhemo Oct 11, 2024
bc3117f
update image
tamirhemo Oct 11, 2024
0f8e68e
better message
tamirhemo Oct 11, 2024
b5761fb
Merge branch 'tamir/shape-config-v2' of https://github.com/succinctla…
tamirhemo Oct 11, 2024
b3c8460
update docker
tamirhemo Oct 11, 2024
49ebd3b
Merge remote-tracking branch 'origin/tamir/v1.3.0-rc2' into tamir/v3.…
tamirhemo Oct 11, 2024
11da320
Merge remote-tracking branch 'origin/tamir/v3.0.0-rc4' into tamir/sha…
tamirhemo Oct 11, 2024
42ea5f6
undo executor
tamirhemo Oct 11, 2024
fbe94c3
bitwise shape
tamirhemo Oct 11, 2024
40db2a6
try
tamirhemo Oct 11, 2024
1d9bfc6
try another
tamirhemo Oct 11, 2024
0539513
update
tamirhemo Oct 11, 2024
07fe9d1
update image
tamirhemo Oct 11, 2024
cc861a1
better error
tamirhemo Oct 11, 2024
328d081
update image and workflow
tamirhemo Oct 11, 2024
ac324e6
workflow
tamirhemo Oct 11, 2024
0e095c0
better shape error handeling
tamirhemo Oct 11, 2024
deb6df6
update image
tamirhemo Oct 11, 2024
fbc34ec
found message
tamirhemo Oct 11, 2024
32e6ef6
try
tamirhemo Oct 11, 2024
22cd0bd
try
tamirhemo Oct 11, 2024
ef03ff1
try
tamirhemo Oct 11, 2024
8bf7ff9
d
tamirhemo Oct 11, 2024
c5cc776
rewind
tamirhemo Oct 11, 2024
7a820ea
new shapes
tamirhemo Oct 11, 2024
218b5b6
run s3 script
umadayal Oct 11, 2024
20f7db5
update image
tamirhemo Oct 11, 2024
40cc371
fix run_s3
tamirhemo Oct 11, 2024
cbecf91
opts
tamirhemo Oct 11, 2024
694d52f
warn
tamirhemo Oct 11, 2024
a2f4b90
more
tamirhemo Oct 11, 2024
d52ba88
shape
tamirhemo Oct 11, 2024
588a300
more shapes
tamirhemo Oct 11, 2024
6b8e241
moongate image
tamirhemo Oct 11, 2024
e923b30
feat: l-infinity based dropping
umadayal Oct 12, 2024
7f87d25
fix pr
umadayal Oct 12, 2024
8d3b112
fix verify
umadayal Oct 12, 2024
4e9fcd4
bash changes
umadayal Oct 12, 2024
2669edb
drop
umadayal Oct 12, 2024
d1bff4a
hm
umadayal Oct 12, 2024
c6e933d
executor cleanup
umadayal Oct 12, 2024
9c8037f
more cleanup
umadayal Oct 12, 2024
5af0dc9
more changes
umadayal Oct 12, 2024
ca6ba08
update cuda image
umadayal Oct 12, 2024
9fe13fc
cargo clean
umadayal Oct 13, 2024
be6b058
suite
umadayal Oct 13, 2024
5381c8b
update some stuff
umadayal Oct 13, 2024
ac64933
suite
umadayal Oct 13, 2024
09d2905
not enough disk?
umadayal Oct 13, 2024
7ea25ce
update suite to bigger instances
umadayal Oct 14, 2024
3ea86d3
more changes
umadayal Oct 14, 2024
acb125e
formatting stuff
umadayal Oct 14, 2024
e89b788
fix examples
umadayal Oct 14, 2024
4ef2779
update trace checkpoint
umadayal Oct 14, 2024
5ccb931
update cuda image
umadayal Oct 14, 2024
e69721b
no spot
umadayal Oct 14, 2024
024d018
update logging middleware
umadayal Oct 14, 2024
85385c9
logging middleware
umadayal Oct 14, 2024
d7c7119
min instead of max
umadayal Oct 14, 2024
2c49429
executor
umadayal Oct 14, 2024
27f0f8e
maximal shapes
umadayal Oct 14, 2024
ecf64a7
if any of them satisfy, keep going
umadayal Oct 14, 2024
46a6b39
executor
umadayal Oct 14, 2024
99f0497
test shape dropping logic
umadayal Oct 14, 2024
a384e1a
l-infinity
umadayal Oct 14, 2024
80126c0
report
umadayal Oct 14, 2024
4298189
hm
umadayal Oct 14, 2024
89f0810
changes
umadayal Oct 14, 2024
5d5a10e
hm
umadayal Oct 14, 2024
c80d197
more info
umadayal Oct 14, 2024
4635560
more buffer
umadayal Oct 14, 2024
164d3e1
more shape executor stuff
umadayal Oct 14, 2024
851f96e
hm
umadayal Oct 14, 2024
584428f
hm
umadayal Oct 14, 2024
9f2a78c
make sure something is wrong
umadayal Oct 14, 2024
cb23caa
executor
umadayal Oct 14, 2024
4e2f1f3
mul count was wrong
umadayal Oct 14, 2024
92c0f5e
executor
umadayal Oct 14, 2024
27ed27a
hm
umadayal Oct 14, 2024
c0a499c
basic arithmetic
umadayal Oct 14, 2024
6fa4f5e
small shards
umadayal Oct 14, 2024
a170a0e
nearest po2
umadayal Oct 14, 2024
7d294bf
more stuff
umadayal Oct 14, 2024
3d098ff
l-infinity
umadayal Oct 14, 2024
1c8de87
hm
umadayal Oct 14, 2024
825d807
hm
umadayal Oct 14, 2024
b96cd68
update moongate commit
umadayal Oct 14, 2024
c2551fa
changes
umadayal Oct 14, 2024
dec396c
shape lift
umadayal Oct 14, 2024
1ac6b0c
hm
umadayal Oct 14, 2024
0f031c1
more stuff
umadayal Oct 15, 2024
f05140a
more changes
umadayal Oct 15, 2024
2f3836b
utilization
umadayal Oct 15, 2024
ff7d859
more changes
umadayal Oct 15, 2024
ad2ffa9
boom
umadayal Oct 15, 2024
08e1695
add logic for dumping
umadayal Oct 15, 2024
bf32e0a
check oom
umadayal Oct 15, 2024
d3a28bd
maximal shape debugging
umadayal Oct 15, 2024
36b4706
not worth
umadayal Oct 15, 2024
7fc2906
executor
umadayal Oct 15, 2024
2adf1dd
norm danger
umadayal Oct 15, 2024
cbbbc89
executor
umadayal Oct 15, 2024
b1ae5f7
cuda image
jtguibas Oct 15, 2024
1e0d9bb
more shapes
jtguibas Oct 15, 2024
74750c7
sp1-gpu
jtguibas Oct 15, 2024
1344108
shape covering mismatch
jtguibas Oct 15, 2024
cfeaf5b
shape covering
jtguibas Oct 15, 2024
2301fac
fix small bugs
jtguibas Oct 15, 2024
c592c4c
fix shape logic
jtguibas Oct 15, 2024
1ff2809
update gpu img
jtguibas Oct 15, 2024
84fb65c
vk map testing
jtguibas Oct 15, 2024
1e8aa06
hm
jtguibas Oct 15, 2024
752cf46
prover lib
jtguibas Oct 15, 2024
87d5de2
fix: read scope from chip (#1642)
tamirhemo Oct 15, 2024
f4282ad
more cuda lib
jtguibas Oct 15, 2024
46f3523
Merge branch 'john/l-infinity-drop' of https://github.com/succinctlab…
jtguibas Oct 15, 2024
5d5cd5d
fix tests
jtguibas Oct 15, 2024
c310cba
fix some precompile ehight stuff
jtguibas Oct 15, 2024
336e88e
rc4
jtguibas Oct 15, 2024
01c1262
fix deadlock in tests
jtguibas Oct 15, 2024
ddbc9e0
update docker image
jtguibas Oct 15, 2024
6ae1c22
resolve merge conflicts
jtguibas Oct 16, 2024
f775103
update main gha
jtguibas Oct 16, 2024
0825809
8 core cpu
jtguibas Oct 16, 2024
b73ef42
16 cpu runner
jtguibas Oct 16, 2024
e270c5a
change concurrency group
jtguibas Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 55 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ inputs:
pull_token:
description: "Token to use for private repo access"
required: true
setup_gcc:
description: "Whether to setup GCC or not"
required: false
default: 'true'
setup_aws_cli:
description: "Whether to install AWS CLI or not"
required: false
default: 'true'
runs:
using: "composite"
steps:
Expand All @@ -22,11 +30,41 @@ runs:
shell: bash
run: go version

- name: Check GCC version
id: check-gcc
shell: bash
run: |
if command -v gcc &> /dev/null; then
echo "gcc_exists=true" >> $GITHUB_OUTPUT
echo "gcc_version=$(gcc --version | head -n1 | awk '{print $NF}')" >> $GITHUB_OUTPUT
else
echo "gcc_exists=false" >> $GITHUB_OUTPUT
fi

- name: Setup GCC
uses: Dup4/actions-setup-gcc@v1
if: inputs.setup_gcc == 'true' && steps.check-gcc.outputs.gcc_exists != 'true'
with:
version: latest

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install AWS CLI v2
if: inputs.setup_aws_cli == 'true'
shell: bash
run: |
if ! command -v aws &> /dev/null; then
echo "AWS CLI not found. Installing..."
python3 -m pip install --user awscli
echo "$HOME/.local/bin" >> $GITHUB_PATH
else
echo "AWS CLI is already installed."
fi
export PATH="$HOME/.local/bin:$PATH"
aws --version

- name: rust-cache
uses: actions/cache@v3
with:
Expand All @@ -45,3 +83,20 @@ runs:
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.81.0 -y
. "$HOME/.cargo/env"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

# install pkg-config and openssl
- name: Install pkg-config and openssl
shell: bash
run: |
if ! dpkg -s pkg-config libssl-dev &> /dev/null; then
echo "pkg-config and/or libssl-dev not found. Installing..."
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev
else
echo "pkg-config and libssl-dev are already installed."
fi

- name: Set up Docker
uses: docker/setup-buildx-action@v3
17 changes: 17 additions & 0 deletions .github/runs-on.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
images:
nvidia-linux:
platform: "linux"
arch: "x64"
ami: "ami-0a63dc9cb9e934ba3"
owner: "421253708207"

dlami-x64:
platform: "linux"
arch: "x64"
owner: "898082745236" # AWS
name: "Deep Learning Base OSS Nvidia Driver GPU AMI (Ubuntu 22.04)*"

runners:
gpu-nvidia:
family: ["g6.4xlarge"]
image: dlami-x64
118 changes: 59 additions & 59 deletions .github/workflows/docker-publish-gnark.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Source: https://raw.githubusercontent.com/foundry-rs/foundry/master/.github/workflows/docker-publish.yml
name: docker-gnark

on:
Expand All @@ -9,7 +8,6 @@ on:
- "v*.*.*"
schedule:
- cron: "0 0 * * *"
# Trigger without any parameters a proactive rebuild
workflow_dispatch:
inputs:
tags:
Expand All @@ -22,83 +20,85 @@ env:
IMAGE_NAME: succinctlabs/sp1-gnark

jobs:
container:
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow
build-amd64:
runs-on: [runs-on, runner=64cpu-linux-x64, spot=false, "run-id=${{ github.run_id }}"]
permissions:
id-token: write
packages: write
contents: read
timeout-minutes: 120
steps:
- name: Checkout repository
id: checkout
uses: actions/checkout@v4

- name: Install Docker BuildX
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
id: buildx
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
install: true
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push AMD64 image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.gnark-ffi
platforms: linux/amd64
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64
cache-from: type=gha
cache-to: type=gha,mode=max

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
build-arm64:
runs-on: [runs-on, runner=64cpu-linux-arm64, spot=false, "run-id=${{ github.run_id }}"]
permissions:
id-token: write
packages: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
# Ensure this doesn't trigger on PR's
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
- name: Build and push ARM64 image
uses: docker/build-push-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
context: .
file: ./Dockerfile.gnark-ffi
platforms: linux/arm64
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64
cache-from: type=gha
cache-to: type=gha,mode=max

# Creates an additional 'latest' or 'nightly' tag
# If the job is triggered via cron schedule, tag nightly and nightly-{SHA}
# If the job is triggered via workflow dispatch and on a master branch, tag branch and latest
# Otherwise, just tag as the branch name
- name: Finalize Docker Metadata
id: docker_tagging
create-manifest:
needs: [build-amd64, build-arm64]
runs-on: ubuntu-latest
steps:
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifest
run: |
TAGS=""
if [[ "${{ github.event_name }}" == 'workflow_dispatch' ]]; then
echo "manual trigger from workflow_dispatch, assigning tag ${{ github.event.inputs.tags }}"
echo "docker_tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.tags }}" >> $GITHUB_OUTPUT
TAGS="${{ github.event.inputs.tags }}"
elif [[ "${{ github.event_name }}" == 'schedule' ]]; then
echo "cron trigger, assigning nightly tag"
echo "docker_tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly-${GITHUB_SHA}" >> $GITHUB_OUTPUT
TAGS="nightly nightly-${{ github.sha }}"
else
echo "Neither scheduled nor manual release from main branch. Just tagging as branch name"
echo "docker_tags=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
TAGS="${GITHUB_REF##*/}"
fi

# Log docker metadata to explicitly know what is being pushed
- name: Inspect Docker Metadata
run: |
echo "TAGS -> ${{ steps.docker_tagging.outputs.docker_tags }}"
echo "LABELS -> ${{ steps.meta.outputs.labels }}"

# Build and push Docker image
# https://github.com/docker/build-push-action
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile.gnark-ffi
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_tagging.outputs.docker_tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}

for TAG in $TAGS; do
docker buildx imagetools create -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$TAG \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64 \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64
done
Loading
Loading