Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:near/mpc-recovery into phuong/fe…
Browse files Browse the repository at this point in the history
…at/flamegraph
  • Loading branch information
ChaoticTempest committed Oct 24, 2023
2 parents 633134f + f95f57a commit 0a387c9
Show file tree
Hide file tree
Showing 39 changed files with 4,193 additions and 438 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown

- uses: Swatinem/rust-cache@v1

Expand All @@ -60,8 +61,15 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile Contract
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release

- name: Build MPC Recovery Binary Locally
run: |
cargo build -p mpc-recovery --release
- name: Test
run: cargo test -p mpc-recovery-integration-tests --jobs 1 -- --test-threads 1
run: cargo test -p mpc-recovery-integration-tests mpc --jobs 1 -- --test-threads 1
env:
RUST_LOG: INFO
RUST_BACKTRACE: 1
82 changes: 82 additions & 0 deletions .github/workflows/multichain-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Integration (Multichain)

on:
push:
branches:
- develop
pull_request:

env:
RUSTFLAGS: -D warnings
jobs:
test:
name: Test
strategy:
matrix:
# FIXME: macos-latest-xl is disabled since colima is erroring out right now
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install Docker
if: ${{ matrix.os == 'macos-latest-xl' }}
run: |
brew install docker
colima start
# Colima does not expose the Docker socket by default, we have to symlink it
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull Relayer & Sandbox Docker Images
run: |
docker pull ghcr.io/near/pagoda-relayer-rs-fastauth
docker pull ghcr.io/near/sandbox
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.multichain
tags: near/mpc-recovery-node
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown

- uses: Swatinem/rust-cache@v1

- name: Install Protoc
uses: arduino/setup-protoc@v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile Contract
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release

- name: Build MPC Recovery Binary Locally
run: |
cargo build -p mpc-recovery-node --release
- name: Test
run: cargo test -p mpc-recovery-integration-tests multichain --jobs 1 -- --test-threads 1
env:
RUST_LOG: INFO
RUST_BACKTRACE: 1
3 changes: 3 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ jobs:
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compile Contract
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release
- name: Compile
run: cargo check
- name: Test format
Expand Down
Loading

0 comments on commit 0a387c9

Please sign in to comment.