Skip to content

Commit 114d5d1

Browse files
authored
Merge pull request #1875 from o1-labs/io/ci-build-with-beta
CI: add beta channel lint workflow
2 parents 3d4d5e8 + 7c38e82 commit 114d5d1

File tree

5 files changed

+65
-0
lines changed

5 files changed

+65
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ outputs:
55
rust-stable:
66
description: "Rust stable version"
77
value: ${{ steps.load.outputs.rust-stable }}
8+
rust-beta:
9+
description: "Rust beta version"
10+
value: ${{ steps.load.outputs.rust-beta }}
811
rust-nightly:
912
description: "Rust nightly version"
1013
value: ${{ steps.load.outputs.rust-nightly }}
@@ -26,6 +29,7 @@ runs:
2629
2730
# Read versions from YAML file using yq
2831
RUST_STABLE=$(yq eval '.rust.stable' "$VERSIONS_FILE")
32+
RUST_BETA=$(yq eval '.rust.beta' "$VERSIONS_FILE")
2933
RUST_NIGHTLY=$(yq eval '.rust.nightly' "$VERSIONS_FILE")
3034
OCAML_VERSION=$(yq eval '.ocaml.version' "$VERSIONS_FILE")
3135
NODE_VERSION_YAML=$(yq eval '.node.version' "$VERSIONS_FILE")
@@ -43,18 +47,21 @@ runs:
4347
4448
# Set outputs
4549
echo "rust-stable=$RUST_STABLE" >> $GITHUB_OUTPUT
50+
echo "rust-beta=$RUST_BETA" >> $GITHUB_OUTPUT
4651
echo "rust-nightly=$RUST_NIGHTLY" >> $GITHUB_OUTPUT
4752
echo "ocaml-version=$OCAML_VERSION" >> $GITHUB_OUTPUT
4853
echo "node-version=$NODE_VERSION_YAML" >> $GITHUB_OUTPUT
4954
5055
# Also set as environment variables for convenience
5156
echo "RUST_STABLE_VERSION=$RUST_STABLE" >> $GITHUB_ENV
57+
echo "RUST_BETA_VERSION=$RUST_BETA" >> $GITHUB_ENV
5258
echo "RUST_NIGHTLY_VERSION=$RUST_NIGHTLY" >> $GITHUB_ENV
5359
echo "OCAML_VERSION=$OCAML_VERSION" >> $GITHUB_ENV
5460
echo "NODE_VERSION=$NODE_VERSION_YAML" >> $GITHUB_ENV
5561
5662
echo "Loaded versions:"
5763
echo " Rust stable: $RUST_STABLE"
64+
echo " Rust beta: $RUST_BETA"
5865
echo " Rust nightly: $RUST_NIGHTLY"
5966
echo " OCaml: $OCAML_VERSION"
6067
echo " Node.js: $NODE_VERSION_YAML"

.github/config/versions.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
rust:
1313
stable: "1.84"
14+
beta: "beta"
1415
nightly: "nightly"
1516

1617
ocaml:

.github/workflows/lint-beta.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Lint (Beta Channel)
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
schedule:
8+
# Run weekly on Mondays at 00:00 UTC
9+
- cron: '0 0 * * 1'
10+
11+
jobs:
12+
lint-beta:
13+
timeout-minutes: 15
14+
name: Lint (Beta) - ${{ matrix.os }}
15+
runs-on: ${{ matrix.os }}
16+
# Allow this job to fail without failing the entire workflow
17+
continue-on-error: true
18+
strategy:
19+
matrix:
20+
os: [ubuntu-24.04]
21+
steps:
22+
- uses: actions/checkout@v6
23+
24+
- name: Load versions
25+
uses: ./.github/actions/load-versions
26+
27+
- name: Setup build dependencies
28+
uses: ./.github/actions/setup-build-deps
29+
30+
- name: Use shared OCaml setting up steps
31+
uses: ./.github/actions/setup-ocaml
32+
with:
33+
ocaml_version: ${{ env.OCAML_VERSION }}
34+
35+
- name: Setup Rust (Beta)
36+
uses: ./.github/actions/setup-rust
37+
with:
38+
toolchain: ${{ env.RUST_BETA_VERSION }}
39+
components: clippy, rustfmt
40+
cache-prefix: lint-beta-${{ env.RUST_BETA_VERSION }}-v0
41+
42+
- name: Run make check-beta
43+
run: make check-beta
44+
45+
- name: Run make lint-beta
46+
run: make lint-beta
47+

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
([#1838](https://github.com/o1-labs/mina-rust/pull/1838))
1919
- **Web Node**: fix webnode build, add quality-of-life improvements when running
2020
webnode in Docker. ([#1778](https://github.com/o1-labs/mina-rust/pull/1778))
21+
- **CI**: add beta channel lint workflow to catch build issues early
22+
([#1875](https://github.com/o1-labs/mina-rust/pull/1875))
2123

2224
### Changes
2325

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ bench-database: ## Run ledger database benchmark
151151
check: ## Check code for compilation errors
152152
cargo check --all-targets
153153

154+
.PHONY: check-beta
155+
check-beta: ## Check code for compilation errors using beta Rust
156+
cargo +beta check --all-targets
157+
154158
.PHONY: check-tx-fuzzing
155159
check-tx-fuzzing: ## Check the transaction fuzzing tools, requires nightly Rust
156160
@cd tools/fuzzing && cargo +$(NIGHTLY_RUST_VERSION) check
@@ -244,6 +248,10 @@ format-md: ## Format all markdown and MDX files to wrap at 80 characters
244248
lint: ## Run linter (clippy)
245249
cargo clippy --all-targets -- -D warnings --allow clippy::mutable_key_type
246250

251+
.PHONY: lint-beta
252+
lint-beta: ## Run linter (clippy) using beta Rust
253+
cargo +beta clippy --all-targets -- -D warnings --allow clippy::mutable_key_type
254+
247255
.PHONY: lint-bash
248256
lint-bash: ## Check all shell scripts using shellcheck
249257
@echo "Running shellcheck on shell scripts..."

0 commit comments

Comments
 (0)