Skip to content

Commit 534a9eb

Browse files
authored
Merge pull request #1348 from o1-labs/dw/enforce-nightly-makefile
Makefile: enforce precise nightly version for all targets
2 parents eda3d10 + 4f4bb56 commit 534a9eb

File tree

4 files changed

+39
-14
lines changed

4 files changed

+39
-14
lines changed

.github/workflows/docs.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ jobs:
4444
uses: dtolnay/rust-toolchain@stable
4545
with:
4646
components: rustfmt
47-
toolchain: nightly
47+
# This should be in line with the verison in:
48+
# - Makefile
49+
# - ./github/workflows/docs.yaml
50+
# - ./github/workflows/fmt.yaml
51+
# - ./github/workflows/lint.yaml
52+
toolchain: nightly-2025-08-18
4853

4954
- name: Build documentation
5055
run: make docs-build
@@ -98,7 +103,12 @@ jobs:
98103
uses: dtolnay/rust-toolchain@stable
99104
with:
100105
components: rustfmt
101-
toolchain: nightly
106+
# This should be in line with the verison in:
107+
# - Makefile
108+
# - ./github/workflows/docs.yaml
109+
# - ./github/workflows/fmt.yaml
110+
# - ./github/workflows/lint.yaml
111+
toolchain: nightly-2025-08-18
102112

103113
- name: Build documentation
104114
run: make docs-build

.github/workflows/fmt.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ jobs:
1414
- name: Setup Rust
1515
uses: ./.github/actions/setup-rust
1616
with:
17-
toolchain: nightly
17+
# This should be in line with the verison in:
18+
# - Makefile
19+
# - ./github/workflows/docs.yaml
20+
# - ./github/workflows/fmt.yaml
21+
# - ./github/workflows/lint.yaml
22+
toolchain: nightly-2025-08-18
1823
components: rustfmt
1924
cache-prefix: format-nightly-v0
2025
- uses: taiki-e/install-action@v2

.github/workflows/lint.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ jobs:
4545
strategy:
4646
matrix:
4747
os: [ubuntu-24.04]
48-
toolchain: [nightly]
48+
# This should be in line with the verison in:
49+
# - Makefile
50+
# - ./github/workflows/docs.yaml
51+
# - ./github/workflows/fmt.yaml
52+
# - ./github/workflows/lint.yaml
53+
toolchain: [nightly-2025-08-18]
4954
steps:
5055
- uses: actions/checkout@v5
5156
- name: Setup build dependencies

Makefile

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Mina Makefile
22

33
# Rust
4+
# This should be in line with the verison in:
5+
# - Makefile
6+
# - ./github/workflows/docs.yaml
7+
# - ./github/workflows/fmt.yaml
8+
# - ./github/workflows/lint.yaml
49
NIGHTLY_RUST_VERSION = "nightly-2025-08-18"
510

611
# Docker
@@ -35,7 +40,7 @@ build: ## Build the project in debug mode
3540

3641
.PHONY: build-ledger
3742
build-ledger: download-circuits ## Build the ledger binary and library, requires nightly Rust
38-
@cd ledger && cargo +nightly build --release --tests
43+
@cd ledger && cargo +$(NIGHTLY_RUST_VERSION) build --release --tests
3944

4045
.PHONY: build-release
4146
build-release: ## Build the project in release mode
@@ -82,7 +87,7 @@ build-tests-webrtc: ## Build tests for WebRTC
8287

8388
.PHONY: build-vrf
8489
build-vrf: ## Build the VRF package
85-
@cd vrf && cargo +nightly build --release --tests
90+
@cd vrf && cargo +$(NIGHTLY_RUST_VERSION) build --release --tests
8691

8792
.PHONY: build-wasm
8893
build-wasm: ## Build WebAssembly node
@@ -99,11 +104,11 @@ check: ## Check code for compilation errors
99104

100105
.PHONY: check-tx-fuzzing
101106
check-tx-fuzzing: ## Check the transaction fuzzing tools, requires nightly Rust
102-
@cd tools/fuzzing && cargo +nightly check
107+
@cd tools/fuzzing && cargo +$(NIGHTLY_RUST_VERSION) check
103108

104109
.PHONY: check-format
105110
check-format: ## Check code formatting
106-
cargo +nightly fmt -- --check
111+
cargo +$(NIGHTLY_RUST_VERSION) fmt -- --check
107112
taplo format --check
108113

109114
.PHONY: check-md
@@ -172,7 +177,7 @@ download-circuits: ## Download the circuits used by Mina from GitHub
172177

173178
.PHONY: format
174179
format: ## Format code using rustfmt and taplo
175-
cargo +nightly fmt
180+
cargo +$(NIGHTLY_RUST_VERSION) fmt
176181
taplo format
177182

178183
.PHONY: format-md
@@ -236,7 +241,7 @@ test: ## Run tests
236241

237242
.PHONY: test-ledger
238243
test-ledger: build-ledger ## Run ledger tests in release mode, requires nightly Rust
239-
@cd ledger && cargo +nightly test --release -- -Z unstable-options --report-time
244+
@cd ledger && cargo +$(NIGHTLY_RUST_VERSION) test --release -- -Z unstable-options --report-time
240245

241246
.PHONY: test-p2p
242247
test-p2p: ## Run P2P tests
@@ -248,7 +253,7 @@ test-release: ## Run tests in release mode
248253

249254
.PHONY: test-vrf
250255
test-vrf: ## Run VRF tests, requires nightly Rust
251-
@cd vrf && cargo +nightly test --release -- -Z unstable-options --report-time
256+
@cd vrf && cargo +$(NIGHTLY_RUST_VERSION) test --release -- -Z unstable-options --report-time
252257

253258
.PHONY: nextest
254259
nextest: ## Run tests with cargo-nextest for faster execution
@@ -264,11 +269,11 @@ nextest-p2p: ## Run P2P tests with cargo-nextest
264269

265270
.PHONY: nextest-ledger
266271
nextest-ledger: build-ledger ## Run ledger tests with cargo-nextest, requires nightly Rust
267-
@cd ledger && cargo +nightly nextest run --release
272+
@cd ledger && cargo +$(NIGHTLY_RUST_VERSION) nextest run --release
268273

269274
.PHONY: nextest-vrf
270275
nextest-vrf: ## Run VRF tests with cargo-nextest, requires nightly Rust
271-
@cd vrf && cargo +nightly nextest run --release
276+
@cd vrf && cargo +$(NIGHTLY_RUST_VERSION) nextest run --release
272277

273278
# Docker build targets
274279

@@ -478,7 +483,7 @@ docs-rust: ## Generate Rust API documentation
478483
@echo "Generating Rust API documentation..."
479484
# Using nightly with --enable-index-page to generate workspace index
480485
# See: https://github.com/rust-lang/cargo/issues/8229
481-
@DATABASE_URL="sqlite::memory:" RUSTDOCFLAGS="--enable-index-page -Zunstable-options -D warnings" cargo +nightly doc --no-deps --document-private-items --workspace --exclude heartbeats-processor --lib --bins
486+
@DATABASE_URL="sqlite::memory:" RUSTDOCFLAGS="--enable-index-page -Zunstable-options -D warnings" cargo +$(NIGHTLY_RUST_VERSION) doc --no-deps --document-private-items --workspace --exclude heartbeats-processor --lib --bins
482487
@echo "Rust documentation generated in target/doc/"
483488
@echo "Entry point: target/doc/index.html"
484489

0 commit comments

Comments
 (0)