Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
toolchain: nightly
# This should be in line with the verison in:
# - Makefile
# - ./github/workflows/docs.yaml
# - ./github/workflows/fmt.yaml
# - ./github/workflows/lint.yaml
toolchain: nightly-2025-08-18

- name: Build documentation
run: make docs-build
Expand Down Expand Up @@ -98,7 +103,12 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
toolchain: nightly
# This should be in line with the verison in:
# - Makefile
# - ./github/workflows/docs.yaml
# - ./github/workflows/fmt.yaml
# - ./github/workflows/lint.yaml
toolchain: nightly-2025-08-18

- name: Build documentation
run: make docs-build
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/fmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
# This should be in line with the verison in:
# - Makefile
# - ./github/workflows/docs.yaml
# - ./github/workflows/fmt.yaml
# - ./github/workflows/lint.yaml
toolchain: nightly-2025-08-18
components: rustfmt
cache-prefix: format-nightly-v0
- uses: taiki-e/install-action@v2
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04]
toolchain: [nightly]
# This should be in line with the verison in:
# - Makefile
# - ./github/workflows/docs.yaml
# - ./github/workflows/fmt.yaml
# - ./github/workflows/lint.yaml
toolchain: [nightly-2025-08-18]
steps:
- uses: actions/checkout@v5
- name: Setup build dependencies
Expand Down
25 changes: 15 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Mina Makefile

# Rust
# This should be in line with the verison in:
# - Makefile
# - ./github/workflows/docs.yaml
# - ./github/workflows/fmt.yaml
# - ./github/workflows/lint.yaml
NIGHTLY_RUST_VERSION = "nightly-2025-08-18"

# Docker
Expand Down Expand Up @@ -35,7 +40,7 @@ build: ## Build the project in debug mode

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

.PHONY: build-release
build-release: ## Build the project in release mode
Expand Down Expand Up @@ -82,7 +87,7 @@ build-tests-webrtc: ## Build tests for WebRTC

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

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

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

.PHONY: check-format
check-format: ## Check code formatting
cargo +nightly fmt -- --check
cargo +$(NIGHTLY_RUST_VERSION) fmt -- --check
taplo format --check

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

.PHONY: format
format: ## Format code using rustfmt and taplo
cargo +nightly fmt
cargo +$(NIGHTLY_RUST_VERSION) fmt
taplo format

.PHONY: format-md
Expand Down Expand Up @@ -236,7 +241,7 @@ test: ## Run tests

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

.PHONY: test-p2p
test-p2p: ## Run P2P tests
Expand All @@ -248,7 +253,7 @@ test-release: ## Run tests in release mode

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

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

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

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

# Docker build targets

Expand Down Expand Up @@ -478,7 +483,7 @@ docs-rust: ## Generate Rust API documentation
@echo "Generating Rust API documentation..."
# Using nightly with --enable-index-page to generate workspace index
# See: https://github.com/rust-lang/cargo/issues/8229
@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
@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
@echo "Rust documentation generated in target/doc/"
@echo "Entry point: target/doc/index.html"

Expand Down
Loading