Skip to content

Commit 8177d90

Browse files
committed
Merge branch 'develop' of https://github.com/o1-labs/mina-rust into merge-main-to-develop-v0.18.1
2 parents df38460 + 6fc3f26 commit 8177d90

File tree

142 files changed

+2934
-8351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+2934
-8351
lines changed

.github/actions/frontend-build/action.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ inputs:
1515
default: 'false'
1616
node-version:
1717
description: 'Node.js version to use'
18-
required: false
19-
default: '23'
18+
required: true
2019

2120
runs:
2221
using: 'composite'
@@ -67,15 +66,6 @@ runs:
6766
working-directory: frontend
6867
shell: bash
6968

70-
- name: Test make build-leaderboard
71-
if: inputs.test-build-commands == 'true'
72-
run: |
73-
rm -rf dist
74-
make build-leaderboard
75-
[ -d "dist/frontend" ] || { echo "Error: make build-leaderboard failed"; exit 1; }
76-
working-directory: frontend
77-
shell: bash
78-
7969
- name: Test make build-local
8070
if: inputs.test-build-commands == 'true'
8171
run: |

.github/actions/load-versions/action.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ outputs:
1111
ocaml-version:
1212
description: "OCaml version"
1313
value: ${{ steps.load.outputs.ocaml-version }}
14+
node-version:
15+
description: "Node.js version"
16+
value: ${{ steps.load.outputs.node-version }}
1417

1518
runs:
1619
using: composite
@@ -25,18 +28,33 @@ runs:
2528
RUST_STABLE=$(yq eval '.rust.stable' "$VERSIONS_FILE")
2629
RUST_NIGHTLY=$(yq eval '.rust.nightly' "$VERSIONS_FILE")
2730
OCAML_VERSION=$(yq eval '.ocaml.version' "$VERSIONS_FILE")
31+
NODE_VERSION_YAML=$(yq eval '.node.version' "$VERSIONS_FILE")
32+
33+
# Read node version from .nvmrc
34+
NODE_VERSION_NVMRC=$(cat .nvmrc)
35+
36+
# Verify that the versions match
37+
if [ "$NODE_VERSION_YAML" != "$NODE_VERSION_NVMRC" ]; then
38+
echo "Error: Node.js version mismatch!"
39+
echo " .github/config/versions.yaml: $NODE_VERSION_YAML"
40+
echo " .nvmrc: $NODE_VERSION_NVMRC"
41+
exit 1
42+
fi
2843
2944
# Set outputs
3045
echo "rust-stable=$RUST_STABLE" >> $GITHUB_OUTPUT
3146
echo "rust-nightly=$RUST_NIGHTLY" >> $GITHUB_OUTPUT
3247
echo "ocaml-version=$OCAML_VERSION" >> $GITHUB_OUTPUT
48+
echo "node-version=$NODE_VERSION_YAML" >> $GITHUB_OUTPUT
3349
3450
# Also set as environment variables for convenience
3551
echo "RUST_STABLE_VERSION=$RUST_STABLE" >> $GITHUB_ENV
3652
echo "RUST_NIGHTLY_VERSION=$RUST_NIGHTLY" >> $GITHUB_ENV
3753
echo "OCAML_VERSION=$OCAML_VERSION" >> $GITHUB_ENV
54+
echo "NODE_VERSION=$NODE_VERSION_YAML" >> $GITHUB_ENV
3855
3956
echo "Loaded versions:"
4057
echo " Rust stable: $RUST_STABLE"
4158
echo " Rust nightly: $RUST_NIGHTLY"
4259
echo " OCaml: $OCAML_VERSION"
60+
echo " Node.js: $NODE_VERSION_YAML"

.github/config/versions.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ rust:
1515

1616
ocaml:
1717
version: "4.14.2"
18+
19+
node:
20+
version: "24.11.0"

.github/scripts/docker/test-frontend-docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set -euo pipefail
1717
if [ $# -lt 2 ]; then
1818
echo "Usage: $0 <image> <environment> [port]"
1919
echo ""
20-
echo "Supported environments: local, webnode, production, fuzzing, leaderboard, staging"
20+
echo "Supported environments: local, webnode, production, fuzzing, staging"
2121
echo ""
2222
echo "Examples:"
2323
echo " $0 o1labs/mina-rust-frontend:latest production"
@@ -31,7 +31,7 @@ PORT="${3:-8080}"
3131
CONTAINER_NAME="test-frontend-${ENVIRONMENT}-$$"
3232

3333
# Supported environments
34-
SUPPORTED_ENVS="local webnode production fuzzing leaderboard staging"
34+
SUPPORTED_ENVS="local webnode production fuzzing staging"
3535
if [[ ! " $SUPPORTED_ENVS " =~ \ $ENVIRONMENT\ ]]; then
3636
echo "❌ Unsupported environment: $ENVIRONMENT"
3737
echo "Supported environments: $SUPPORTED_ENVS"

.github/workflows/doc-commands.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ on:
44
push:
55
branches: [ main, develop ]
66
pull_request:
7-
paths:
8-
- 'Makefile'
9-
- 'docs/**'
10-
- 'CLAUDE.md'
11-
- '.github/workflows/doc-commands.yml'
127
workflow_dispatch:
138

149
env:

.github/workflows/docker.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ jobs:
8585
- name: Git checkout
8686
uses: actions/checkout@v5
8787

88+
- name: Load versions
89+
id: versions
90+
uses: ./.github/actions/load-versions
91+
8892
- name: Login to Docker Hub
8993
uses: docker/login-action@v3
9094
with:
@@ -108,6 +112,8 @@ jobs:
108112
context: ./
109113
file: ./frontend/Dockerfile
110114
platforms: ${{ matrix.arch.platform }}
115+
build-args: |
116+
NODE_VERSION=${{ steps.versions.outputs.node-version }}
111117
cache-from: type=gha
112118
cache-to: type=gha,mode=max
113119
outputs: type=image,name=${{ env.REGISTRY_FRONTEND_IMAGE }},push-by-digest=true,name-canonical=true,push=true
@@ -279,10 +285,10 @@ jobs:
279285
# Verify required fields are present
280286
docker run --rm ${{ env.REGISTRY_NODE_IMAGE }}:${{ env.DOCKER_TAG }} build-info | grep -E "Version:|Build time:|Commit SHA:|Commit branch:|Rustc version:"
281287
282-
# Verify version format
288+
# Verify version format (commit hash or version tag)
283289
VERSION=$(docker run --rm ${{ env.REGISTRY_NODE_IMAGE }}:${{ env.DOCKER_TAG }} build-info | grep "Version:" | awk '{print $2}')
284-
if [[ ! "$VERSION" =~ ^[0-9a-f]{7}$ ]]; then
285-
echo "Error: Version should be a 7-character commit hash, got: $VERSION"
290+
if [[ ! "$VERSION" =~ ^[0-9a-f]{7}$ ]] && [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
291+
echo "Error: Version should be either a 7-character commit hash or a version tag (vX.Y.Z), got: $VERSION"
286292
exit 1
287293
fi
288294

.github/workflows/docs.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
pull_request:
1010
workflow_dispatch:
1111

12-
env:
13-
NODE_VERSION: '20'
14-
1512
concurrency:
1613
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1714
cancel-in-progress: true
@@ -25,10 +22,13 @@ jobs:
2522
- name: Checkout repository
2623
uses: actions/checkout@v5
2724

25+
- id: versions
26+
uses: ./.github/actions/load-versions
27+
2828
- name: Setup Node.js
2929
uses: actions/setup-node@v6
3030
with:
31-
node-version: ${{ env.NODE_VERSION }}
31+
node-version: ${{ steps.versions.outputs.node-version }}
3232
cache: 'npm'
3333
cache-dependency-path: website/package-lock.json
3434

@@ -109,10 +109,13 @@ jobs:
109109
- name: Setup Pages
110110
uses: actions/configure-pages@v5
111111

112+
- id: versions
113+
uses: ./.github/actions/load-versions
114+
112115
- name: Setup Node.js
113116
uses: actions/setup-node@v6
114117
with:
115-
node-version: ${{ env.NODE_VERSION }}
118+
node-version: ${{ steps.versions.outputs.node-version }}
116119
cache: 'npm'
117120
cache-dependency-path: website/package-lock.json
118121

@@ -158,10 +161,13 @@ jobs:
158161
with:
159162
fetch-depth: 0
160163

164+
- id: versions
165+
uses: ./.github/actions/load-versions
166+
161167
- name: Setup Node.js
162168
uses: actions/setup-node@v6
163169
with:
164-
node-version: ${{ env.NODE_VERSION }}
170+
node-version: ${{ steps.versions.outputs.node-version }}
165171
cache: 'npm'
166172
cache-dependency-path: website/package-lock.json
167173

.github/workflows/frontend-macos-13.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ jobs:
1616
- name: Git checkout
1717
uses: actions/checkout@v5
1818

19+
- id: versions
20+
uses: ./.github/actions/load-versions
21+
1922
- name: Frontend build
2023
uses: ./.github/actions/frontend-build
2124
with:
25+
node-version: ${{ steps.versions.outputs.node-version }}
2226
test-build-commands: 'true'

.github/workflows/frontend-macos-14.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ jobs:
1616
- name: Git checkout
1717
uses: actions/checkout@v5
1818

19+
- id: versions
20+
uses: ./.github/actions/load-versions
21+
1922
- name: Frontend build
2023
uses: ./.github/actions/frontend-build
2124
with:
25+
node-version: ${{ steps.versions.outputs.node-version }}
2226
test-build-commands: 'true'

.github/workflows/frontend-macos-15.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ jobs:
1616
- name: Git checkout
1717
uses: actions/checkout@v5
1818

19+
- id: versions
20+
uses: ./.github/actions/load-versions
21+
1922
- name: Frontend build
2023
uses: ./.github/actions/frontend-build
2124
with:
25+
node-version: ${{ steps.versions.outputs.node-version }}
2226
test-build-commands: 'true'

0 commit comments

Comments
 (0)