Skip to content

Commit 9f8b151

Browse files
authored
Merge pull request #175 from openmina/develop
Merge `develop` into `main`
2 parents 7ed81c9 + 908286f commit 9f8b151

File tree

653 files changed

+55941
-2997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

653 files changed

+55941
-2997
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
target/
22
Dockerfile
3+
Dockerfile_FE
4+
docker-compose.yml
35
.dockerignore
46
cli/bin
57
cli/tests

.drone.yml

Lines changed: 275 additions & 57 deletions
Large diffs are not rendered by default.

.github/workflows/ci.yaml

Lines changed: 104 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,120 @@
11
name: Openmina CI
2-
on: [ push, pull_request, workflow_dispatch ]
2+
on:
3+
push:
4+
branches: [ main, develop ]
5+
pull_request:
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
311

412
jobs:
513
build:
6-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-20.04
715
steps:
816
- name: Git checkout
917
uses: actions/checkout@v3
1018

1119
- name: Setup Rust
12-
uses: actions-rs/toolchain@v1
20+
run: |
21+
rustup install nightly
22+
rustup override set nightly
23+
rustup component add clippy rustfmt
24+
25+
# - name: Check
26+
# uses: actions-rs/cargo@v1
27+
# with:
28+
# command: check
29+
30+
# - name: Clippy
31+
# uses: actions-rs/cargo@v1
32+
# with:
33+
# command: clippy
34+
# # don't fail the job until clippy is fixed
35+
# continue-on-error: true
36+
37+
- name: Setup Rust Cache
38+
uses: Swatinem/rust-cache@v2
1339
with:
14-
toolchain: nightly
15-
override: true
16-
components: rustfmt, clippy
40+
prefix-key: "ver-0"
41+
42+
- name: Release build
43+
run: |
44+
cargo build --release --bin openmina
1745
18-
- name: Check
19-
uses: actions-rs/cargo@v1
46+
- name: Upload binaries
47+
uses: actions/upload-artifact@v3
2048
with:
21-
command: check
49+
name: bin
50+
path: target/release/openmina
2251

23-
- name: Clippy
24-
uses: actions-rs/cargo@v1
52+
- name: Build tests
53+
run: |
54+
mkdir target/release/tests
55+
56+
cargo build --release --features=scenario-generators --package=openmina-node-testing --tests
57+
cargo build --release --features=scenario-generators --package=openmina-node-testing --tests --message-format=json > cargo-build-test.json
58+
jq -r '. | select(.executable != null and (.target.kind | (contains(["test"])))) | [.target.name, .executable ] | @tsv' cargo-build-test.json > tests.tsv
59+
while read NAME FILE; do cp -a $FILE target/release/tests/$NAME; done < tests.tsv
60+
61+
cargo build --release --features=scenario-generators,p2p-webrtc --package=openmina-node-testing --tests
62+
cargo build --release --features=scenario-generators,p2p-webrtc --package=openmina-node-testing --tests --message-format=json > cargo-build-test.json
63+
jq -r '. | select(.executable != null and (.target.kind | (contains(["test"])))) | [.target.name, .executable ] | @tsv' cargo-build-test.json > tests.tsv
64+
while read NAME FILE; do cp -a $FILE target/release/tests/webrtc_$NAME; done < tests.tsv
65+
66+
tar cf tests.tar -C target/release/tests .
67+
68+
- name: Upload tests
69+
uses: actions/upload-artifact@v3
2570
with:
26-
command: clippy
27-
# don't fail the job until clippy is fixed
28-
continue-on-error: true
71+
name: tests
72+
path: tests.tar
2973

30-
- name: Release build
31-
uses: actions-rs/cargo@v1
74+
p2p-tests:
75+
needs: [ build ]
76+
runs-on: ubuntu-20.04
77+
container:
78+
image: minaprotocol/mina-daemon:2.0.0rampup4-14047c5-focal-berkeley
79+
strategy:
80+
matrix:
81+
test: [p2p_basic_connections, p2p_basic_incoming, p2p_basic_outgoing]
82+
fail-fast: false
83+
84+
steps:
85+
- name: Download tests
86+
uses: actions/download-artifact@v3
87+
with:
88+
name: tests
89+
90+
- name: Unpack tests
91+
run: |
92+
tar xf tests.tar ./${{ matrix.test }}
93+
94+
- name: Run the test
95+
run: |
96+
./${{ matrix.test }} --nocapture --test-threads=1
97+
98+
scenario-tests:
99+
needs: [ build ]
100+
runs-on: ubuntu-20.04
101+
container:
102+
image: minaprotocol/mina-daemon:2.0.0rampup4-14047c5-focal-berkeley
103+
strategy:
104+
matrix:
105+
test: [single_node, multi_node, connection_discovery, webrtc_single_node, webrtc_multi_node]
106+
fail-fast: false
107+
108+
steps:
109+
- name: Download tests
110+
uses: actions/download-artifact@v3
32111
with:
33-
command: build
34-
args: --release --bin openmina
112+
name: tests
113+
114+
- name: Unpack tests
115+
run: |
116+
tar xf tests.tar ./${{ matrix.test }}
117+
118+
- name: Run the test
119+
run: |
120+
./${{ matrix.test }} --nocapture --test-threads=1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target
2+
/node/testing/res/

.idea/.gitignore

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/openmina.iml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)