Skip to content

Commit a5a4acd

Browse files
committed
Fixed lint issues
1 parent 591567c commit a5a4acd

File tree

32 files changed

+203
-3997
lines changed

32 files changed

+203
-3997
lines changed

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build]
2+
rustflags = []
3+
4+
[target.aarch64-apple-darwin]
5+
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]

.github/actions/setup-build-deps/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
if: runner.os == 'macOS'
2828
shell: bash
2929
run: |
30-
brew install protobuf
30+
brew install protobuf ocaml opam
3131
3232
- name: Install cargo-nextest
3333
if: inputs.install-nextest == 'true'

.github/actions/setup-ocaml/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ runs:
1111
uses: ocaml/setup-ocaml@v3
1212
with:
1313
ocaml-compiler: ${{ inputs.ocaml_version }}
14+
15+
# - name: Setup OPAM environment
16+
# shell: bash
17+
# run: |
18+
# # Export all OPAM environment variables to GITHUB_ENV
19+
# # This avoids other steps to run `eval $(opam env)`
20+
# opam env | sed -E 's/; export [A-Za-z_][A-Za-z0-9_]*;?//g' >> $GITHUB_ENV

.github/workflows/ci.yaml

Lines changed: 73 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Mina CI
22
on:
33
push:
4-
branches: [ main, develop ]
4+
branches: [main, develop]
55
pull_request:
6-
paths-ignore: [ "frontend" ]
6+
paths-ignore: ["frontend"]
77
workflow_dispatch:
88
inputs:
99
refresh_cache:
10-
description: 'Refresh cargo cache'
10+
description: "Refresh cargo cache"
1111
required: false
1212
type: boolean
1313
default: false
@@ -17,7 +17,7 @@ env:
1717
RUST_BACKTRACE: full
1818
MINA_PANIC_ON_BUG: true
1919
CARGO_INCREMENTAL: 1
20-
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off"
20+
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off -C link-args=-Wl,-undefined,dynamic_lookup"
2121

2222
concurrency:
2323
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -40,13 +40,21 @@ jobs:
4040
ledger-tests:
4141
timeout-minutes: 20
4242
runs-on: ubuntu-24.04
43+
strategy:
44+
matrix:
45+
ocaml_version: [4.14.2]
4346
steps:
4447
- name: Git checkout
4548
uses: actions/checkout@v5
4649

4750
- name: Setup build dependencies
4851
uses: ./.github/actions/setup-build-deps
4952

53+
- name: Use shared OCaml setting up steps
54+
uses: ./.github/actions/setup-ocaml
55+
with:
56+
ocaml_version: ${{ matrix.ocaml_version }}
57+
5058
- name: Setup Rust
5159
uses: ./.github/actions/setup-rust
5260
with:
@@ -97,13 +105,21 @@ jobs:
97105
vrf-tests:
98106
timeout-minutes: 8
99107
runs-on: ubuntu-24.04
108+
strategy:
109+
matrix:
110+
ocaml_version: [4.14.2]
100111
steps:
101112
- name: Git checkout
102113
uses: actions/checkout@v5
103114

104115
- name: Setup build dependencies
105116
uses: ./.github/actions/setup-build-deps
106117

118+
- name: Use shared OCaml setting up steps
119+
uses: ./.github/actions/setup-ocaml
120+
with:
121+
ocaml_version: ${{ matrix.ocaml_version }}
122+
107123
- name: Setup Rust
108124
uses: ./.github/actions/setup-rust
109125
with:
@@ -140,9 +156,10 @@ jobs:
140156
# NOTE: If you add or remove platforms from this matrix, make sure to update
141157
# the documentation at website/docs/developers/getting-started.mdx
142158
strategy:
143-
fail-fast: false # Allow other platforms to continue if one fails
159+
fail-fast: false # Allow other platforms to continue if one fails
144160
matrix:
145161
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
162+
ocaml_version: [4.14.2]
146163
runs-on: ${{ matrix.os }}
147164
steps:
148165
- name: Git checkout
@@ -151,6 +168,11 @@ jobs:
151168
- name: Setup build dependencies
152169
uses: ./.github/actions/setup-build-deps
153170

171+
- name: Use shared OCaml setting up steps
172+
uses: ./.github/actions/setup-ocaml
173+
with:
174+
ocaml_version: ${{ matrix.ocaml_version }}
175+
154176
- name: Setup Rust
155177
uses: ./.github/actions/setup-rust
156178
with:
@@ -173,9 +195,10 @@ jobs:
173195
# NOTE: If you add or remove platforms from this matrix, make sure to update
174196
# the documentation at website/docs/developers/getting-started.mdx
175197
strategy:
176-
fail-fast: false # Allow other platforms to continue if one fails
198+
fail-fast: false # Allow other platforms to continue if one fails
177199
matrix:
178200
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
201+
ocaml_version: [4.14.2]
179202
runs-on: ${{ matrix.os }}
180203
steps:
181204
- name: Git checkout
@@ -184,22 +207,30 @@ jobs:
184207
- name: Setup build dependencies
185208
uses: ./.github/actions/setup-build-deps
186209

210+
- name: Use shared OCaml setting up steps
211+
uses: ./.github/actions/setup-ocaml
212+
with:
213+
ocaml_version: ${{ matrix.ocaml_version }}
214+
187215
- name: Setup WebAssembly environment
188216
uses: ./.github/actions/setup-wasm
189217
with:
190218
cache-prefix: wasm-${{ matrix.os }}-v0
191219

192220
- name: Release build
193221
run: make build-wasm
222+
env:
223+
RUSTFLAGS: ""
194224

195225
build-tests:
196226
timeout-minutes: 60
197227
# NOTE: If you add or remove platforms from this matrix, make sure to update
198228
# the documentation at website/docs/developers/getting-started.mdx
199229
strategy:
200-
fail-fast: false # Allow other platforms to continue if one fails
230+
fail-fast: false # Allow other platforms to continue if one fails
201231
matrix:
202232
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
233+
ocaml_version: [4.14.2]
203234
runs-on: ${{ matrix.os }}
204235
steps:
205236
- name: Git checkout
@@ -208,6 +239,11 @@ jobs:
208239
- name: Setup build dependencies
209240
uses: ./.github/actions/setup-build-deps
210241

242+
- name: Use shared OCaml setting up steps
243+
uses: ./.github/actions/setup-ocaml
244+
with:
245+
ocaml_version: ${{ matrix.ocaml_version }}
246+
211247
- name: Setup Rust
212248
uses: ./.github/actions/setup-rust
213249
with:
@@ -230,9 +266,10 @@ jobs:
230266
# NOTE: If you add or remove platforms from this matrix, make sure to update
231267
# the documentation at website/docs/developers/getting-started.mdx
232268
strategy:
233-
fail-fast: false # Allow other platforms to continue if one fails
269+
fail-fast: false # Allow other platforms to continue if one fails
234270
matrix:
235271
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
272+
ocaml_version: [4.14.2]
236273
runs-on: ${{ matrix.os }}
237274
steps:
238275
- name: Git checkout
@@ -241,6 +278,11 @@ jobs:
241278
- name: Setup build dependencies
242279
uses: ./.github/actions/setup-build-deps
243280

281+
- name: Use shared OCaml setting up steps
282+
uses: ./.github/actions/setup-ocaml
283+
with:
284+
ocaml_version: ${{ matrix.ocaml_version }}
285+
244286
- name: Setup Rust
245287
uses: ./.github/actions/setup-rust
246288
with:
@@ -259,7 +301,7 @@ jobs:
259301
retention-days: 7
260302

261303
p2p-scenario-tests:
262-
needs: [ build-tests, build-tests-webrtc ]
304+
needs: [build-tests, build-tests-webrtc]
263305
runs-on: ubuntu-24.04
264306
timeout-minutes: 20
265307
container:
@@ -269,8 +311,15 @@ jobs:
269311
BPF_ALIAS: /coda/0.0.1/29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6-0.0.0.0
270312
strategy:
271313
matrix:
272-
test: [p2p_basic_connections, p2p_basic_incoming, p2p_basic_outgoing, p2p_pubsub, p2p_kad,
273-
webrtc_p2p_basic_connections]
314+
test:
315+
[
316+
p2p_basic_connections,
317+
p2p_basic_incoming,
318+
p2p_basic_outgoing,
319+
p2p_pubsub,
320+
p2p_kad,
321+
webrtc_p2p_basic_connections,
322+
]
274323
fail-fast: false
275324

276325
services:
@@ -288,10 +337,10 @@ jobs:
288337
steps:
289338
- name: Install libssl3t64 # Our binaries are built on a newer ubuntu and require libssl3t64
290339
run: |
291-
apt-get update && \
292-
apt-get install -y --no-install-recommends libssl3t64 && \
293-
apt-get clean && \
294-
rm -rf /var/lib/apt/lists/*
340+
apt-get update && \
341+
apt-get install -y --no-install-recommends libssl3t64 && \
342+
apt-get clean && \
343+
rm -rf /var/lib/apt/lists/*
295344
296345
- name: Download tests
297346
uses: actions/download-artifact@v5
@@ -369,10 +418,10 @@ jobs:
369418
steps:
370419
- name: Install libssl3t64 # Our binaries are built on a newer ubuntu and require libssl3t64
371420
run: |
372-
apt-get update && \
373-
apt-get install -y --no-install-recommends libssl3t64 && \
374-
apt-get clean && \
375-
rm -rf /var/lib/apt/lists/*
421+
apt-get update && \
422+
apt-get install -y --no-install-recommends libssl3t64 && \
423+
apt-get clean && \
424+
rm -rf /var/lib/apt/lists/*
376425
377426
- name: Download tests
378427
uses: actions/download-artifact@v5
@@ -426,10 +475,10 @@ jobs:
426475
steps:
427476
- name: Install libssl3t64 # Our binaries are built on a newer ubuntu and require libssl3t64
428477
run: |
429-
apt-get update && \
430-
apt-get install -y --no-install-recommends libssl3t64 && \
431-
apt-get clean && \
432-
rm -rf /var/lib/apt/lists/*
478+
apt-get update && \
479+
apt-get install -y --no-install-recommends libssl3t64 && \
480+
apt-get clean && \
481+
rm -rf /var/lib/apt/lists/*
433482
434483
- name: Download tests
435484
uses: actions/download-artifact@v5
@@ -447,7 +496,7 @@ jobs:
447496
448497
bootstrap-test:
449498
timeout-minutes: 4
450-
needs: [ build, build-tests ]
499+
needs: [build, build-tests]
451500
runs-on: ubuntu-24.04
452501
env:
453502
MINA_HOME: data

.github/workflows/doc-commands.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ concurrency:
2222
jobs:
2323
test-doc-commands:
2424
runs-on: ubuntu-22.04
25+
strategy:
26+
matrix:
27+
ocaml_version: [4.14.2]
2528
steps:
2629
- name: Git checkout
2730
uses: actions/checkout@v5
@@ -36,6 +39,11 @@ jobs:
3639
toolchain: 1.84
3740
cache-prefix: test-doc-commands-v0
3841

42+
- name: Use shared OCaml setting up steps
43+
uses: ./.github/actions/setup-ocaml
44+
with:
45+
ocaml_version: ${{ matrix.ocaml_version }}
46+
3947
- name: Download circuits files
4048
uses: ./.github/actions/setup-circuits
4149

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Setup build dependencies
3636
run: |
3737
sudo apt update
38-
sudo apt install -y protobuf-compiler
38+
sudo apt install -y protobuf-compiler ocaml
3939
4040
- name: Install documentation dependencies
4141
run: make docs-install

.github/workflows/lint.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15+
ocaml_version: [4.14.2]
1516
os: [ubuntu-24.04]
1617
toolchain: [1.84]
1718
steps:
@@ -20,6 +21,10 @@ jobs:
2021
uses: ./.github/actions/setup-build-deps
2122
with:
2223
include-sqlite: true
24+
- name: Use shared OCaml setting up steps
25+
uses: ./.github/actions/setup-ocaml
26+
with:
27+
ocaml_version: ${{ matrix.ocaml_version }}
2328
- name: Setup SQLite database for SQLx
2429
run: |
2530
sqlite3 /tmp/heartbeats.db < tools/heartbeats-processor/schema.sql
@@ -46,10 +51,15 @@ jobs:
4651
matrix:
4752
os: [ubuntu-24.04]
4853
toolchain: [nightly]
54+
ocaml_version: [4.14.2]
4955
steps:
5056
- uses: actions/checkout@v5
5157
- name: Setup build dependencies
5258
uses: ./.github/actions/setup-build-deps
59+
- name: Use shared OCaml setting up steps
60+
uses: ./.github/actions/setup-ocaml
61+
with:
62+
ocaml_version: ${{ matrix.ocaml_version }}
5363
- name: Setup Rust
5464
uses: ./.github/actions/setup-rust
5565
with:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7272
- Use consistent `use` statements for fields. Replace `mina_hasher::Fp` with
7373
`mina_curves::pasta::Fp`.
7474
([#1269](https://github.com/o1-labs/openmina/pull/1269/)).
75+
- **Proof systems**: Updated proof systems to use same version as Ocaml node
7576
- **CI**: set fail-fast to false to prevent cancellation of other jobs
7677
([#1305](https://github.com/o1-labs/openmina/pull/1305))
7778
- **Website**: (temporary) new design, for a first release and rename OpenMina

0 commit comments

Comments
 (0)