mirror of
https://github.com/logos-blockchain/logos-blockchain-circuits.git
synced 2026-01-08 16:13:09 +00:00
Fix bundling version and paths.
This commit is contained in:
parent
50bdad858b
commit
5a6ec55393
63
.github/workflows/build-circuits.yml
vendored
63
.github/workflows/build-circuits.yml
vendored
@ -3,11 +3,12 @@ name: Build Circuits
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "circom_circuits-v*.*.*"
|
- "v*.*.*"
|
||||||
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
tag:
|
||||||
description: "Tag to release. Must follow the format of 'circom_circuits-vX.Y.Z'."
|
description: "Tag to release. Must follow the format of 'vX.Y.Z'."
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -23,13 +24,13 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
# Use the tag name if it is available, otherwise use the input version.
|
# Use the tag name if it is available, otherwise use the input version.
|
||||||
# If neither is available, default to the commit hash.
|
# If neither is available, default to the commit hash.
|
||||||
TAG: ${{ (github.ref_type == 'tag' && github.ref_name) || inputs.tag || '' }}
|
TAG: ${{ (github.ref_type == 'tag' && github.ref_name) || inputs.tag || 'v0.0.0' }}
|
||||||
run: |
|
run: |
|
||||||
if [ -z "$TAG" ]; then
|
if [ -z "$TAG" ]; then
|
||||||
echo "Could not determine tag."
|
echo "Could not determine tag."
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ ! "$TAG" =~ ^circom_circuits-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
elif [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
echo "TAG must follow the format of 'circom_circuits-vX.Y.Z'. Value: '$VERSION'."
|
echo "TAG must follow the format of 'vX.Y.Z'. Value: '$VERSION'."
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -71,7 +72,7 @@ jobs:
|
|||||||
run: git submodule update --init --recursive
|
run: git submodule update --init --recursive
|
||||||
|
|
||||||
- name: Setup Dependencies
|
- name: Setup Dependencies
|
||||||
working-directory: circom_circuits/rapidsnark
|
working-directory: rapidsnark
|
||||||
run: sudo apt update -y
|
run: sudo apt update -y
|
||||||
|
|
||||||
- name: Install Dependencies [Prover]
|
- name: Install Dependencies [Prover]
|
||||||
@ -81,10 +82,10 @@ jobs:
|
|||||||
run: sudo apt install nlohmann-json3-dev
|
run: sudo apt install nlohmann-json3-dev
|
||||||
|
|
||||||
- name: Replace Prover Makefile # TODO: Make a fork generate the appropriate Linux Makefile
|
- name: Replace Prover Makefile # TODO: Make a fork generate the appropriate Linux Makefile
|
||||||
run: cp .github/resources/prover/Makefile circom_circuits/rapidsnark/Makefile
|
run: cp .github/resources/prover/Makefile rapidsnark/Makefile
|
||||||
|
|
||||||
- name: Compile Prover and Verifier
|
- name: Compile Prover and Verifier
|
||||||
working-directory: circom_circuits/rapidsnark
|
working-directory: rapidsnark
|
||||||
run: |
|
run: |
|
||||||
./build_gmp.sh host
|
./build_gmp.sh host
|
||||||
make host_linux_x86_64_static
|
make host_linux_x86_64_static
|
||||||
@ -93,7 +94,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BINARY_NAME: prover
|
BINARY_NAME: prover
|
||||||
BUNDLE_NAME: prover-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
BUNDLE_NAME: prover-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||||
RAPIDSNARK_DIR: circom_circuits/rapidsnark/package
|
RAPIDSNARK_DIR: rapidsnark/package
|
||||||
run: |
|
run: |
|
||||||
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
||||||
mkdir -p "$BUNDLE_DIR"
|
mkdir -p "$BUNDLE_DIR"
|
||||||
@ -106,7 +107,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BINARY_NAME: verifier
|
BINARY_NAME: verifier
|
||||||
BUNDLE_NAME: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
BUNDLE_NAME: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||||
RAPIDSNARK_DIR: circom_circuits/rapidsnark/package
|
RAPIDSNARK_DIR: rapidsnark/package
|
||||||
run: |
|
run: |
|
||||||
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
||||||
mkdir -p "$BUNDLE_DIR"
|
mkdir -p "$BUNDLE_DIR"
|
||||||
@ -132,7 +133,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "PoL"
|
circuit-name-display: "PoL"
|
||||||
circuit-name-binary: "pol"
|
circuit-name-binary: "pol"
|
||||||
circuit-path: "circom_circuits/Mantle/pol.circom"
|
circuit-path: "mantle/pol.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -142,7 +143,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "PoQ"
|
circuit-name-display: "PoQ"
|
||||||
circuit-name-binary: "poq"
|
circuit-name-binary: "poq"
|
||||||
circuit-path: "circom_circuits/Blend/poq.circom"
|
circuit-path: "blend/poq.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -152,7 +153,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "ZKSign"
|
circuit-name-display: "ZKSign"
|
||||||
circuit-name-binary: "zksign"
|
circuit-name-binary: "zksign"
|
||||||
circuit-path: "circom_circuits/Mantle/signature.circom"
|
circuit-path: "mantle/signature.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -162,7 +163,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "PoC"
|
circuit-name-display: "PoC"
|
||||||
circuit-name-binary: "poc"
|
circuit-name-binary: "poc"
|
||||||
circuit-path: "circom_circuits/Mantle/poc.circom"
|
circuit-path: "mantle/poc.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -228,11 +229,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Replace Prover Makefile # TODO: Make a fork generate the appropriate Windows Makefile
|
- name: Replace Prover Makefile # TODO: Make a fork generate the appropriate Windows Makefile
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: cp .github/resources/prover/Makefile circom_circuits/rapidsnark/Makefile
|
run: cp .github/resources/prover/Makefile rapidsnark/Makefile
|
||||||
|
|
||||||
- name: Replace Prover CMakeLists
|
- name: Replace Prover CMakeLists
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: cp .github/resources/prover/${{ env.OS }}.src-CMakeLists.txt circom_circuits/rapidsnark/src/CMakeLists.txt
|
run: cp .github/resources/prover/${{ env.OS }}.src-CMakeLists.txt rapidsnark/src/CMakeLists.txt
|
||||||
|
|
||||||
- name: Patch Windows mman
|
- name: Patch Windows mman
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
@ -244,11 +245,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Replace build_gmp
|
- name: Replace build_gmp
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: cp .github/resources/prover/${{ env.OS }}.build_gmp.sh circom_circuits/rapidsnark/build_gmp.sh
|
run: cp .github/resources/prover/${{ env.OS }}.build_gmp.sh rapidsnark/build_gmp.sh
|
||||||
|
|
||||||
- name: Compile Prover and Verifier
|
- name: Compile Prover and Verifier
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
working-directory: circom_circuits/rapidsnark
|
working-directory: rapidsnark
|
||||||
run: |
|
run: |
|
||||||
./build_gmp.sh host
|
./build_gmp.sh host
|
||||||
make host_windows_x86_64_static
|
make host_windows_x86_64_static
|
||||||
@ -258,7 +259,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BINARY_NAME: prover
|
BINARY_NAME: prover
|
||||||
BUNDLE_NAME: prover-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
BUNDLE_NAME: prover-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||||
RAPIDSNARK_DIR: circom_circuits/rapidsnark/package
|
RAPIDSNARK_DIR: rapidsnark/package
|
||||||
run: |
|
run: |
|
||||||
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
||||||
mkdir -p "$BUNDLE_DIR"
|
mkdir -p "$BUNDLE_DIR"
|
||||||
@ -272,7 +273,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BINARY_NAME: verifier
|
BINARY_NAME: verifier
|
||||||
BUNDLE_NAME: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
BUNDLE_NAME: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||||
RAPIDSNARK_DIR: circom_circuits/rapidsnark/package
|
RAPIDSNARK_DIR: rapidsnark/package
|
||||||
run: |
|
run: |
|
||||||
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
||||||
mkdir -p "$BUNDLE_DIR"
|
mkdir -p "$BUNDLE_DIR"
|
||||||
@ -298,7 +299,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "PoL"
|
circuit-name-display: "PoL"
|
||||||
circuit-name-binary: "pol"
|
circuit-name-binary: "pol"
|
||||||
circuit-path: "circom_circuits/Mantle/pol.circom"
|
circuit-path: "mantle/pol.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -308,7 +309,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "PoQ"
|
circuit-name-display: "PoQ"
|
||||||
circuit-name-binary: "poq"
|
circuit-name-binary: "poq"
|
||||||
circuit-path: "circom_circuits/Blend/poq.circom"
|
circuit-path: "blend/poq.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -318,7 +319,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "ZKSign"
|
circuit-name-display: "ZKSign"
|
||||||
circuit-name-binary: "zksign"
|
circuit-name-binary: "zksign"
|
||||||
circuit-path: "circom_circuits/Mantle/signature.circom"
|
circuit-path: "mantle/signature.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -328,7 +329,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "PoC"
|
circuit-name-display: "PoC"
|
||||||
circuit-name-binary: "poc"
|
circuit-name-binary: "poc"
|
||||||
circuit-path: "circom_circuits/Mantle/poc.circom"
|
circuit-path: "mantle/poc.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -373,7 +374,7 @@ jobs:
|
|||||||
run: brew install nasm m4
|
run: brew install nasm m4
|
||||||
|
|
||||||
- name: Compile Prover and Verifier
|
- name: Compile Prover and Verifier
|
||||||
working-directory: circom_circuits/rapidsnark
|
working-directory: rapidsnark
|
||||||
run: |
|
run: |
|
||||||
./build_gmp.sh macos_arm64
|
./build_gmp.sh macos_arm64
|
||||||
make macos_arm64
|
make macos_arm64
|
||||||
@ -382,7 +383,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BINARY_NAME: prover
|
BINARY_NAME: prover
|
||||||
BUNDLE_NAME: prover-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
BUNDLE_NAME: prover-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||||
RAPIDSNARK_DIR: circom_circuits/rapidsnark/package_macos_arm64
|
RAPIDSNARK_DIR: rapidsnark/package_macos_arm64
|
||||||
run: |
|
run: |
|
||||||
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
||||||
mkdir -p "$BUNDLE_DIR"
|
mkdir -p "$BUNDLE_DIR"
|
||||||
@ -395,7 +396,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BINARY_NAME: verifier
|
BINARY_NAME: verifier
|
||||||
BUNDLE_NAME: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
BUNDLE_NAME: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||||
RAPIDSNARK_DIR: circom_circuits/rapidsnark/package_macos_arm64
|
RAPIDSNARK_DIR: rapidsnark/package_macos_arm64
|
||||||
run: |
|
run: |
|
||||||
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}"
|
||||||
mkdir -p "$BUNDLE_DIR"
|
mkdir -p "$BUNDLE_DIR"
|
||||||
@ -421,7 +422,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "PoL"
|
circuit-name-display: "PoL"
|
||||||
circuit-name-binary: "pol"
|
circuit-name-binary: "pol"
|
||||||
circuit-path: "circom_circuits/Mantle/pol.circom"
|
circuit-path: "mantle/pol.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -431,7 +432,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "PoQ"
|
circuit-name-display: "PoQ"
|
||||||
circuit-name-binary: "poq"
|
circuit-name-binary: "poq"
|
||||||
circuit-path: "circom_circuits/Blend/poq.circom"
|
circuit-path: "blend/poq.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -441,7 +442,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "ZKSign"
|
circuit-name-display: "ZKSign"
|
||||||
circuit-name-binary: "zksign"
|
circuit-name-binary: "zksign"
|
||||||
circuit-path: "circom_circuits/Mantle/signature.circom"
|
circuit-path: "mantle/signature.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
@ -451,7 +452,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
circuit-name-display: "PoC"
|
circuit-name-display: "PoC"
|
||||||
circuit-name-binary: "poc"
|
circuit-name-binary: "poc"
|
||||||
circuit-path: "circom_circuits/Mantle/poc.circom"
|
circuit-path: "mantle/poc.circom"
|
||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
os: ${{ env.OS }}
|
os: ${{ env.OS }}
|
||||||
arch: ${{ env.ARCH }}
|
arch: ${{ env.ARCH }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user