Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: condense node, keys, and contract into chain-signatures #623

Merged
merged 8 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
4 changes: 2 additions & 2 deletions .github/workflows/deploy-multichain-dev-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: debug
run: cat ~/.near-credentials/testnet/v5.multichain-mpc-dev.testnet.json

- name: Cargo Build
- name: Build & Deploy Dev Contract
run: |
source $HOME/.cargo/env && cd ./contract ; rustup target add wasm32-unknown-unknown && cargo build --target wasm32-unknown-unknown --release && \
source $HOME/.cargo/env && cd chain-signatures ; rustup target add wasm32-unknown-unknown && cargo build -p mpc-contract --target wasm32-unknown-unknown --release && \
cd .. && (yes || true) | near deploy v5.multichain-mpc-dev.testnet target/wasm32-unknown-unknown/release/mpc_contract.wasm
4 changes: 2 additions & 2 deletions .github/workflows/multichain-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
- uses: Swatinem/rust-cache@v1

- name: Compile Contract
run: cd ./contract && cargo build --target wasm32-unknown-unknown --release
run: cd ./chain-signatures && cargo build -p mpc-contract --target wasm32-unknown-unknown --release

- name: Test Contract
run: cd ./contract && cargo test --target x86_64-unknown-linux-gnu --release
run: cd ./chain-signatures && cargo test -p mpc-contract --target x86_64-unknown-linux-gnu --release
env:
RUST_LOG: INFO
RUST_BACKTRACE: 1
14 changes: 10 additions & 4 deletions .github/workflows/multichain-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,18 @@ jobs:
aws --profile default configure set aws_secret_access_key "456"

- name: Compile Chain-Signature Contract
working-directory: ./contract
run: cargo build --target wasm32-unknown-unknown --release
working-directory: ./chain-signatures
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release

- name: Build Chain-Signature Node Binary Locally
working-directory: ./node
run: cargo build --release
working-directory: ./chain-signatures
run: cargo build -p mpc-recovery-node --release

# Build the tests before actually running them to see how long the tests take to run by itself
# instead of including the build time in the test time report on Github.
- name: Build Chain-Signatures Integration Tests
working-directory: ./integration-tests/chain-signatures
run: cargo build --tests

- name: Test
working-directory: ./integration-tests/chain-signatures
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,18 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compile Contract
run: cd contract && cargo build --target wasm32-unknown-unknown --release
run: cd chain-signatures && cargo build -p mpc-contract --target wasm32-unknown-unknown --release
- name: Compile
run: |
( cd keys ; cargo check )
( cd node ; cargo check )
( cd contract ; cargo check )
( cd chain-signatures ; cargo check )
( cd mpc-recovery ; cargo check )
( cd load-tests ; cargo check )
( cd test-oidc-provider ; cargo check )
( cd integration-tests/chain-signatures ; cargo check )
( cd integration-tests/fastauth ; cargo check )
- name: Test format
run: |
( cd keys ; cargo fmt -- --check )
( cd node ; cargo fmt -- --check )
( cd contract ; cargo fmt -- --check )
( cd chain-signatures ; cargo fmt -- --check )
( cd mpc-recovery ; cargo fmt -- --check )
( cd load-tests ; cargo fmt -- --check )
( cd test-oidc-provider ; cargo fmt -- --check )
Expand All @@ -50,9 +46,7 @@ jobs:
run: ( cd mpc-recovery && cargo test )
- name: Test clippy
run: |
( cd keys ; cargo clippy --tests -- -Dclippy::all )
( cd node ; cargo clippy --tests -- -Dclippy::all )
( cd contract ; cargo clippy --tests -- -Dclippy::all )
( cd chain-signatures ; cargo clippy --tests -- -Dclippy::all )
( cd mpc-recovery ; cargo clippy --tests -- -Dclippy::all )
( cd load-tests ; cargo clippy --tests -- -Dclippy::all )
( cd test-oidc-provider ; cargo clippy --tests -- -Dclippy::all )
Expand Down
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"develop"
],
"rust-analyzer.linkedProjects": [
"keys/Cargo.toml",
"node/Cargo.toml",
"contract/Cargo.toml",
"chain-signatures/Cargo.toml",
"integration-tests/chain-signatures/Cargo.toml",
"integration-tests/fastauth/Cargo.toml",
"mpc-recovery/Cargo.toml",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.multichain
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update \
apt-get install --no-install-recommends --assume-yes \
protobuf-compiler libprotobuf-dev
RUN echo "fn main() {}" > dummy.rs
COPY node/Cargo.toml Cargo.toml
COPY chain-signatures/node/Cargo.toml Cargo.toml
RUN sed -i 's#src/main.rs#dummy.rs#' Cargo.toml
RUN sed -i 's#mpc-keys = { path = "../keys" }##' Cargo.toml
RUN sed -i 's#mpc-contract = { path = "../contract" }##' Cargo.toml
Expand Down
File renamed without changes.
Loading
Loading