Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from openmina/develop
Merge `develop` into `main`
- Loading branch information
Showing
653 changed files
with
55,941 additions
and
2,997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
target/ | ||
Dockerfile | ||
Dockerfile_FE | ||
docker-compose.yml | ||
.dockerignore | ||
cli/bin | ||
cli/tests | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,120 @@ | ||
name: Openmina CI | ||
on: [ push, pull_request, workflow_dispatch ] | ||
on: | ||
push: | ||
branches: [ main, develop ] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
run: | | ||
rustup install nightly | ||
rustup override set nightly | ||
rustup component add clippy rustfmt | ||
# - name: Check | ||
# uses: actions-rs/cargo@v1 | ||
# with: | ||
# command: check | ||
|
||
# - name: Clippy | ||
# uses: actions-rs/cargo@v1 | ||
# with: | ||
# command: clippy | ||
# # don't fail the job until clippy is fixed | ||
# continue-on-error: true | ||
|
||
- name: Setup Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt, clippy | ||
prefix-key: "ver-0" | ||
|
||
- name: Release build | ||
run: | | ||
cargo build --release --bin openmina | ||
- name: Check | ||
uses: actions-rs/cargo@v1 | ||
- name: Upload binaries | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
command: check | ||
name: bin | ||
path: target/release/openmina | ||
|
||
- name: Clippy | ||
uses: actions-rs/cargo@v1 | ||
- name: Build tests | ||
run: | | ||
mkdir target/release/tests | ||
cargo build --release --features=scenario-generators --package=openmina-node-testing --tests | ||
cargo build --release --features=scenario-generators --package=openmina-node-testing --tests --message-format=json > cargo-build-test.json | ||
jq -r '. | select(.executable != null and (.target.kind | (contains(["test"])))) | [.target.name, .executable ] | @tsv' cargo-build-test.json > tests.tsv | ||
while read NAME FILE; do cp -a $FILE target/release/tests/$NAME; done < tests.tsv | ||
cargo build --release --features=scenario-generators,p2p-webrtc --package=openmina-node-testing --tests | ||
cargo build --release --features=scenario-generators,p2p-webrtc --package=openmina-node-testing --tests --message-format=json > cargo-build-test.json | ||
jq -r '. | select(.executable != null and (.target.kind | (contains(["test"])))) | [.target.name, .executable ] | @tsv' cargo-build-test.json > tests.tsv | ||
while read NAME FILE; do cp -a $FILE target/release/tests/webrtc_$NAME; done < tests.tsv | ||
tar cf tests.tar -C target/release/tests . | ||
- name: Upload tests | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
command: clippy | ||
# don't fail the job until clippy is fixed | ||
continue-on-error: true | ||
name: tests | ||
path: tests.tar | ||
|
||
- name: Release build | ||
uses: actions-rs/cargo@v1 | ||
p2p-tests: | ||
needs: [ build ] | ||
runs-on: ubuntu-20.04 | ||
container: | ||
image: minaprotocol/mina-daemon:2.0.0rampup4-14047c5-focal-berkeley | ||
strategy: | ||
matrix: | ||
test: [p2p_basic_connections, p2p_basic_incoming, p2p_basic_outgoing] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Download tests | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: tests | ||
|
||
- name: Unpack tests | ||
run: | | ||
tar xf tests.tar ./${{ matrix.test }} | ||
- name: Run the test | ||
run: | | ||
./${{ matrix.test }} --nocapture --test-threads=1 | ||
scenario-tests: | ||
needs: [ build ] | ||
runs-on: ubuntu-20.04 | ||
container: | ||
image: minaprotocol/mina-daemon:2.0.0rampup4-14047c5-focal-berkeley | ||
strategy: | ||
matrix: | ||
test: [single_node, multi_node, connection_discovery, webrtc_single_node, webrtc_multi_node] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Download tests | ||
uses: actions/download-artifact@v3 | ||
with: | ||
command: build | ||
args: --release --bin openmina | ||
name: tests | ||
|
||
- name: Unpack tests | ||
run: | | ||
tar xf tests.tar ./${{ matrix.test }} | ||
- name: Run the test | ||
run: | | ||
./${{ matrix.test }} --nocapture --test-threads=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/target | ||
/node/testing/res/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.