Skip to content
Open
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
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build]
rustflags = []

[target.aarch64-apple-darwin]
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]
2 changes: 1 addition & 1 deletion .github/actions/setup-build-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
if: runner.os == 'macOS'
shell: bash
run: |
brew install protobuf
brew install protobuf ocaml opam
- name: Install cargo-nextest
if: inputs.install-nextest == 'true'
Expand Down
7 changes: 7 additions & 0 deletions .github/actions/setup-ocaml/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ runs:
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ inputs.ocaml_version }}

# - name: Setup OPAM environment
# shell: bash
# run: |
# # Export all OPAM environment variables to GITHUB_ENV
# # This avoids other steps to run `eval $(opam env)`
# opam env | sed -E 's/; export [A-Za-z_][A-Za-z0-9_]*;?//g' >> $GITHUB_ENV
150 changes: 100 additions & 50 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Mina CI
on:
push:
branches: [ main, develop ]
branches: [main, develop]
pull_request:
paths-ignore: [ "frontend" ]
paths-ignore: ["frontend"]
workflow_dispatch:
inputs:
refresh_cache:
description: 'Refresh cargo cache'
description: "Refresh cargo cache"
required: false
type: boolean
default: false
Expand All @@ -17,7 +17,7 @@ env:
RUST_BACKTRACE: full
MINA_PANIC_ON_BUG: true
CARGO_INCREMENTAL: 1
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off"
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off -C link-args=-Wl,-undefined,dynamic_lookup"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -40,13 +40,21 @@ jobs:
ledger-tests:
timeout-minutes: 20
runs-on: ubuntu-24.04
strategy:
matrix:
ocaml_version: [4.14.2]
steps:
- name: Git checkout
uses: actions/checkout@v5

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

- name: Use shared OCaml setting up steps
uses: ./.github/actions/setup-ocaml
with:
ocaml_version: ${{ matrix.ocaml_version }}

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
Expand All @@ -62,48 +70,57 @@ jobs:
- name: Run ledger tests
run: make test-ledger

ledger-32x9-tests:
runs-on: ubuntu-24.04
steps:
- name: Git checkout
uses: actions/checkout@v5
# TODO: add back when reimplemented
# ledger-32x9-tests:
# runs-on: ubuntu-24.04
# steps:
# - name: Git checkout
# uses: actions/checkout@v5

- name: Setup build dependencies
uses: ./.github/actions/setup-build-deps
# - name: Setup build dependencies
# uses: ./.github/actions/setup-build-deps

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
cache-prefix: ledger-32x9-v0
# - name: Setup Rust
# uses: ./.github/actions/setup-rust
# with:
# toolchain: nightly
# cache-prefix: ledger-32x9-v0

- name: Download circuits files
uses: ./.github/actions/setup-circuits
# - name: Download circuits files
# uses: ./.github/actions/setup-circuits

- name: Enable 32x9 fields implementation
run: |
cargo install sd
sd '^mina-curves.*$' '' ./Cargo.toml
sd '^ark-ff = \{ version .*$' '' ./Cargo.toml
sd -F '# UNCOMMENTED_IN_CI ' '' ./Cargo.toml
cat ./Cargo.toml
# - name: Enable 32x9 fields implementation
# run: |
# cargo install sd
# sd '^mina-curves.*$' '' ./Cargo.toml
# sd '^ark-ff = \{ version .*$' '' ./Cargo.toml
# sd -F '# UNCOMMENTED_IN_CI ' '' ./Cargo.toml
# cat ./Cargo.toml

- name: Build ledger tests
run: make build-ledger
# - name: Build ledger tests
# run: make build-ledger

- name: Run ledger tests
run: make test-ledger
# - name: Run ledger tests
# run: make test-ledger

vrf-tests:
timeout-minutes: 8
timeout-minutes: 20
runs-on: ubuntu-24.04
strategy:
matrix:
ocaml_version: [4.14.2]
steps:
- name: Git checkout
uses: actions/checkout@v5

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

- name: Use shared OCaml setting up steps
uses: ./.github/actions/setup-ocaml
with:
ocaml_version: ${{ matrix.ocaml_version }}

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
Expand Down Expand Up @@ -140,9 +157,10 @@ jobs:
# NOTE: If you add or remove platforms from this matrix, make sure to update
# the documentation at website/docs/developers/getting-started.mdx
strategy:
fail-fast: false # Allow other platforms to continue if one fails
fail-fast: false # Allow other platforms to continue if one fails
matrix:
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
ocaml_version: [4.14.2]
runs-on: ${{ matrix.os }}
steps:
- name: Git checkout
Expand All @@ -151,6 +169,11 @@ jobs:
- name: Setup build dependencies
uses: ./.github/actions/setup-build-deps

- name: Use shared OCaml setting up steps
uses: ./.github/actions/setup-ocaml
with:
ocaml_version: ${{ matrix.ocaml_version }}

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
Expand All @@ -173,9 +196,10 @@ jobs:
# NOTE: If you add or remove platforms from this matrix, make sure to update
# the documentation at website/docs/developers/getting-started.mdx
strategy:
fail-fast: false # Allow other platforms to continue if one fails
fail-fast: false # Allow other platforms to continue if one fails
matrix:
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
ocaml_version: [4.14.2]
runs-on: ${{ matrix.os }}
steps:
- name: Git checkout
Expand All @@ -184,22 +208,30 @@ jobs:
- name: Setup build dependencies
uses: ./.github/actions/setup-build-deps

- name: Use shared OCaml setting up steps
uses: ./.github/actions/setup-ocaml
with:
ocaml_version: ${{ matrix.ocaml_version }}

- name: Setup WebAssembly environment
uses: ./.github/actions/setup-wasm
with:
cache-prefix: wasm-${{ matrix.os }}-v0

- name: Release build
run: make build-wasm
env:
RUSTFLAGS: ""

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

- name: Use shared OCaml setting up steps
uses: ./.github/actions/setup-ocaml
with:
ocaml_version: ${{ matrix.ocaml_version }}

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
Expand All @@ -230,9 +267,10 @@ jobs:
# NOTE: If you add or remove platforms from this matrix, make sure to update
# the documentation at website/docs/developers/getting-started.mdx
strategy:
fail-fast: false # Allow other platforms to continue if one fails
fail-fast: false # Allow other platforms to continue if one fails
matrix:
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-latest]
ocaml_version: [4.14.2]
runs-on: ${{ matrix.os }}
steps:
- name: Git checkout
Expand All @@ -241,6 +279,11 @@ jobs:
- name: Setup build dependencies
uses: ./.github/actions/setup-build-deps

- name: Use shared OCaml setting up steps
uses: ./.github/actions/setup-ocaml
with:
ocaml_version: ${{ matrix.ocaml_version }}

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
Expand All @@ -259,7 +302,7 @@ jobs:
retention-days: 7

p2p-scenario-tests:
needs: [ build-tests, build-tests-webrtc ]
needs: [build-tests, build-tests-webrtc]
runs-on: ubuntu-24.04
timeout-minutes: 20
container:
Expand All @@ -269,8 +312,15 @@ jobs:
BPF_ALIAS: /coda/0.0.1/29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6-0.0.0.0
strategy:
matrix:
test: [p2p_basic_connections, p2p_basic_incoming, p2p_basic_outgoing, p2p_pubsub, p2p_kad,
webrtc_p2p_basic_connections]
test:
[
p2p_basic_connections,
p2p_basic_incoming,
p2p_basic_outgoing,
p2p_pubsub,
p2p_kad,
webrtc_p2p_basic_connections,
]
fail-fast: false

services:
Expand All @@ -288,10 +338,10 @@ jobs:
steps:
- name: Install libssl3t64 # Our binaries are built on a newer ubuntu and require libssl3t64
run: |
apt-get update && \
apt-get install -y --no-install-recommends libssl3t64 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
apt-get update && \
apt-get install -y --no-install-recommends libssl3t64 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

- name: Download tests
uses: actions/download-artifact@v5
Expand Down Expand Up @@ -369,10 +419,10 @@ jobs:
steps:
- name: Install libssl3t64 # Our binaries are built on a newer ubuntu and require libssl3t64
run: |
apt-get update && \
apt-get install -y --no-install-recommends libssl3t64 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
apt-get update && \
apt-get install -y --no-install-recommends libssl3t64 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

- name: Download tests
uses: actions/download-artifact@v5
Expand Down Expand Up @@ -426,10 +476,10 @@ jobs:
steps:
- name: Install libssl3t64 # Our binaries are built on a newer ubuntu and require libssl3t64
run: |
apt-get update && \
apt-get install -y --no-install-recommends libssl3t64 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
apt-get update && \
apt-get install -y --no-install-recommends libssl3t64 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

- name: Download tests
uses: actions/download-artifact@v5
Expand All @@ -447,7 +497,7 @@ jobs:

bootstrap-test:
timeout-minutes: 4
needs: [ build, build-tests ]
needs: [build, build-tests]
runs-on: ubuntu-24.04
env:
MINA_HOME: data
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/doc-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
jobs:
test-doc-commands:
runs-on: ubuntu-22.04
strategy:
matrix:
ocaml_version: [4.14.2]
steps:
- name: Git checkout
uses: actions/checkout@v5
Expand All @@ -36,6 +39,11 @@ jobs:
toolchain: 1.84
cache-prefix: test-doc-commands-v0

- name: Use shared OCaml setting up steps
uses: ./.github/actions/setup-ocaml
with:
ocaml_version: ${{ matrix.ocaml_version }}

- name: Download circuits files
uses: ./.github/actions/setup-circuits

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup build dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler
sudo apt install -y protobuf-compiler ocaml

- name: Install documentation dependencies
run: make docs-install
Expand Down
Loading
Loading