Skip to content

Commit 3015c32

Browse files
committed
Fixed lint issues
1 parent 591567c commit 3015c32

File tree

32 files changed

+230
-4029
lines changed

32 files changed

+230
-4029
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: 99 additions & 49 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:
@@ -62,48 +70,57 @@ jobs:
6270
- name: Run ledger tests
6371
run: make test-ledger
6472

65-
ledger-32x9-tests:
66-
runs-on: ubuntu-24.04
67-
steps:
68-
- name: Git checkout
69-
uses: actions/checkout@v5
73+
# TODO: add back when reimplemented
74+
# ledger-32x9-tests:
75+
# runs-on: ubuntu-24.04
76+
# steps:
77+
# - name: Git checkout
78+
# uses: actions/checkout@v5
7079

71-
- name: Setup build dependencies
72-
uses: ./.github/actions/setup-build-deps
80+
# - name: Setup build dependencies
81+
# uses: ./.github/actions/setup-build-deps
7382

74-
- name: Setup Rust
75-
uses: ./.github/actions/setup-rust
76-
with:
77-
toolchain: nightly
78-
cache-prefix: ledger-32x9-v0
83+
# - name: Setup Rust
84+
# uses: ./.github/actions/setup-rust
85+
# with:
86+
# toolchain: nightly
87+
# cache-prefix: ledger-32x9-v0
7988

80-
- name: Download circuits files
81-
uses: ./.github/actions/setup-circuits
89+
# - name: Download circuits files
90+
# uses: ./.github/actions/setup-circuits
8291

83-
- name: Enable 32x9 fields implementation
84-
run: |
85-
cargo install sd
86-
sd '^mina-curves.*$' '' ./Cargo.toml
87-
sd '^ark-ff = \{ version .*$' '' ./Cargo.toml
88-
sd -F '# UNCOMMENTED_IN_CI ' '' ./Cargo.toml
89-
cat ./Cargo.toml
92+
# - name: Enable 32x9 fields implementation
93+
# run: |
94+
# cargo install sd
95+
# sd '^mina-curves.*$' '' ./Cargo.toml
96+
# sd '^ark-ff = \{ version .*$' '' ./Cargo.toml
97+
# sd -F '# UNCOMMENTED_IN_CI ' '' ./Cargo.toml
98+
# cat ./Cargo.toml
9099

91-
- name: Build ledger tests
92-
run: make build-ledger
100+
# - name: Build ledger tests
101+
# run: make build-ledger
93102

94-
- name: Run ledger tests
95-
run: make test-ledger
103+
# - name: Run ledger tests
104+
# run: make test-ledger
96105

97106
vrf-tests:
98107
timeout-minutes: 8
99108
runs-on: ubuntu-24.04
109+
strategy:
110+
matrix:
111+
ocaml_version: [4.14.2]
100112
steps:
101113
- name: Git checkout
102114
uses: actions/checkout@v5
103115

104116
- name: Setup build dependencies
105117
uses: ./.github/actions/setup-build-deps
106118

119+
- name: Use shared OCaml setting up steps
120+
uses: ./.github/actions/setup-ocaml
121+
with:
122+
ocaml_version: ${{ matrix.ocaml_version }}
123+
107124
- name: Setup Rust
108125
uses: ./.github/actions/setup-rust
109126
with:
@@ -140,9 +157,10 @@ jobs:
140157
# NOTE: If you add or remove platforms from this matrix, make sure to update
141158
# the documentation at website/docs/developers/getting-started.mdx
142159
strategy:
143-
fail-fast: false # Allow other platforms to continue if one fails
160+
fail-fast: false # Allow other platforms to continue if one fails
144161
matrix:
145162
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
163+
ocaml_version: [4.14.2]
146164
runs-on: ${{ matrix.os }}
147165
steps:
148166
- name: Git checkout
@@ -151,6 +169,11 @@ jobs:
151169
- name: Setup build dependencies
152170
uses: ./.github/actions/setup-build-deps
153171

172+
- name: Use shared OCaml setting up steps
173+
uses: ./.github/actions/setup-ocaml
174+
with:
175+
ocaml_version: ${{ matrix.ocaml_version }}
176+
154177
- name: Setup Rust
155178
uses: ./.github/actions/setup-rust
156179
with:
@@ -173,9 +196,10 @@ jobs:
173196
# NOTE: If you add or remove platforms from this matrix, make sure to update
174197
# the documentation at website/docs/developers/getting-started.mdx
175198
strategy:
176-
fail-fast: false # Allow other platforms to continue if one fails
199+
fail-fast: false # Allow other platforms to continue if one fails
177200
matrix:
178201
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
202+
ocaml_version: [4.14.2]
179203
runs-on: ${{ matrix.os }}
180204
steps:
181205
- name: Git checkout
@@ -184,22 +208,30 @@ jobs:
184208
- name: Setup build dependencies
185209
uses: ./.github/actions/setup-build-deps
186210

211+
- name: Use shared OCaml setting up steps
212+
uses: ./.github/actions/setup-ocaml
213+
with:
214+
ocaml_version: ${{ matrix.ocaml_version }}
215+
187216
- name: Setup WebAssembly environment
188217
uses: ./.github/actions/setup-wasm
189218
with:
190219
cache-prefix: wasm-${{ matrix.os }}-v0
191220

192221
- name: Release build
193222
run: make build-wasm
223+
env:
224+
RUSTFLAGS: ""
194225

195226
build-tests:
196227
timeout-minutes: 60
197228
# NOTE: If you add or remove platforms from this matrix, make sure to update
198229
# the documentation at website/docs/developers/getting-started.mdx
199230
strategy:
200-
fail-fast: false # Allow other platforms to continue if one fails
231+
fail-fast: false # Allow other platforms to continue if one fails
201232
matrix:
202233
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
234+
ocaml_version: [4.14.2]
203235
runs-on: ${{ matrix.os }}
204236
steps:
205237
- name: Git checkout
@@ -208,6 +240,11 @@ jobs:
208240
- name: Setup build dependencies
209241
uses: ./.github/actions/setup-build-deps
210242

243+
- name: Use shared OCaml setting up steps
244+
uses: ./.github/actions/setup-ocaml
245+
with:
246+
ocaml_version: ${{ matrix.ocaml_version }}
247+
211248
- name: Setup Rust
212249
uses: ./.github/actions/setup-rust
213250
with:
@@ -230,9 +267,10 @@ jobs:
230267
# NOTE: If you add or remove platforms from this matrix, make sure to update
231268
# the documentation at website/docs/developers/getting-started.mdx
232269
strategy:
233-
fail-fast: false # Allow other platforms to continue if one fails
270+
fail-fast: false # Allow other platforms to continue if one fails
234271
matrix:
235272
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
273+
ocaml_version: [4.14.2]
236274
runs-on: ${{ matrix.os }}
237275
steps:
238276
- name: Git checkout
@@ -241,6 +279,11 @@ jobs:
241279
- name: Setup build dependencies
242280
uses: ./.github/actions/setup-build-deps
243281

282+
- name: Use shared OCaml setting up steps
283+
uses: ./.github/actions/setup-ocaml
284+
with:
285+
ocaml_version: ${{ matrix.ocaml_version }}
286+
244287
- name: Setup Rust
245288
uses: ./.github/actions/setup-rust
246289
with:
@@ -259,7 +302,7 @@ jobs:
259302
retention-days: 7
260303

261304
p2p-scenario-tests:
262-
needs: [ build-tests, build-tests-webrtc ]
305+
needs: [build-tests, build-tests-webrtc]
263306
runs-on: ubuntu-24.04
264307
timeout-minutes: 20
265308
container:
@@ -269,8 +312,15 @@ jobs:
269312
BPF_ALIAS: /coda/0.0.1/29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6-0.0.0.0
270313
strategy:
271314
matrix:
272-
test: [p2p_basic_connections, p2p_basic_incoming, p2p_basic_outgoing, p2p_pubsub, p2p_kad,
273-
webrtc_p2p_basic_connections]
315+
test:
316+
[
317+
p2p_basic_connections,
318+
p2p_basic_incoming,
319+
p2p_basic_outgoing,
320+
p2p_pubsub,
321+
p2p_kad,
322+
webrtc_p2p_basic_connections,
323+
]
274324
fail-fast: false
275325

276326
services:
@@ -288,10 +338,10 @@ jobs:
288338
steps:
289339
- name: Install libssl3t64 # Our binaries are built on a newer ubuntu and require libssl3t64
290340
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/*
341+
apt-get update && \
342+
apt-get install -y --no-install-recommends libssl3t64 && \
343+
apt-get clean && \
344+
rm -rf /var/lib/apt/lists/*
295345
296346
- name: Download tests
297347
uses: actions/download-artifact@v5
@@ -369,10 +419,10 @@ jobs:
369419
steps:
370420
- name: Install libssl3t64 # Our binaries are built on a newer ubuntu and require libssl3t64
371421
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/*
422+
apt-get update && \
423+
apt-get install -y --no-install-recommends libssl3t64 && \
424+
apt-get clean && \
425+
rm -rf /var/lib/apt/lists/*
376426
377427
- name: Download tests
378428
uses: actions/download-artifact@v5
@@ -426,10 +476,10 @@ jobs:
426476
steps:
427477
- name: Install libssl3t64 # Our binaries are built on a newer ubuntu and require libssl3t64
428478
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/*
479+
apt-get update && \
480+
apt-get install -y --no-install-recommends libssl3t64 && \
481+
apt-get clean && \
482+
rm -rf /var/lib/apt/lists/*
433483
434484
- name: Download tests
435485
uses: actions/download-artifact@v5
@@ -447,7 +497,7 @@ jobs:
447497
448498
bootstrap-test:
449499
timeout-minutes: 4
450-
needs: [ build, build-tests ]
500+
needs: [build, build-tests]
451501
runs-on: ubuntu-24.04
452502
env:
453503
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

0 commit comments

Comments
 (0)