Skip to content

Commit

Permalink
Merge branch 'manta' into zombienet-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Dengjianping authored Sep 18, 2023
2 parents cf86ae4 + eb48ca1 commit 9fd65c5
Show file tree
Hide file tree
Showing 22 changed files with 1,501 additions and 1,079 deletions.
126 changes: 126 additions & 0 deletions .github/workflows/benchmark_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Run Benchmark Tests
on:
pull_request:
branches: [manta]
types: [opened, reopened, synchronize, labeled]
push:
branches: [manta]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
DEBIAN_FRONTEND: noninteractive
jobs:
start-benchmark-checks:
timeout-minutes: 180
runs-on: runtime
if: contains(github.event.pull_request.labels.*.name, 'A-benchmark-checks')
container:
image: ubuntu:20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- name: install sccache
env:
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.5.3
run: |
apt update
apt install -y curl wget
npm install -g yarn && node --version && node --version && npm --version && yarn --version
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
chmod +x $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: cache sccache
uses: actions/cache@v2
continue-on-error: false
with:
path: ~/.cache/sccache
key: sccache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
sccache-
- name: start sccache server
run: sccache --start-server
- name: rust setup
shell: bash
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
# SCCACHE_CACHE_SIZE: 120G
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ~/.cache/sccache
CARGO_TERM_COLOR: always
run: |
apt update
apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install nightly-2023-03-03
rustup default nightly-2023-03-03
rustup target add wasm32-unknown-unknown
- name: cache cargo
uses: Swatinem/rust-cache@v2
- name: build benchmarking binary
run: |
RUSTC_BOOTSTRAP=1 cargo build --release --features runtime-benchmarks --timings
- name: create-calamari-chainspec
run: |
$GITHUB_WORKSPACE/target/release/manta build-spec --chain calamari-dev --disable-default-bootnode --raw > $GITHUB_WORKSPACE/tests/data/fork.json
- name: append manta-pay storage for Calamari
run: |
wget -P $GITHUB_WORKSPACE/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json
cd $GITHUB_WORKSPACE/tests
yarn install
yarn
node append_storage.js
- name: Run live benchmarks test
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
# SCCACHE_CACHE_SIZE: 120G
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ~/.cache/sccache
run: |
$GITHUB_WORKSPACE/target/release/manta \
benchmark \
pallet \
--chain=$GITHUB_WORKSPACE/tests/data/fork.json \
--pallet=* \
--extrinsic=* \
--repeat=1 \
--steps=2
- name: create-manta-dev-chainspec
run: |
$GITHUB_WORKSPACE/target/release/manta build-spec --chain manta-dev --disable-default-bootnode --raw > $GITHUB_WORKSPACE/tests/data/fork.json
- name: append manta-pay storage for Manta
run: |
wget -P $GITHUB_WORKSPACE/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json
cd $GITHUB_WORKSPACE/tests
yarn install
yarn
node append_storage.js
- name: Run live benchmarks test
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
# SCCACHE_CACHE_SIZE: 120G
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ~/.cache/sccache
run: |
$GITHUB_WORKSPACE/target/release/manta \
benchmark \
pallet \
--chain=$GITHUB_WORKSPACE/tests/data/fork.json \
--pallet=* \
--extrinsic=* \
--repeat=1 \
--steps=2
- name: stop sccache server
run: sccache --stop-server || true
172 changes: 0 additions & 172 deletions .github/workflows/check_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,178 +71,6 @@ jobs:
RUSTC_BOOTSTRAP=1 cargo test -p integration-tests --release --features=manta --no-default-features --timings
- name: stop sccache server
run: sccache --stop-server || true
start-benchmark-checks:
timeout-minutes: 360
runs-on: runtime
if: contains(github.event.pull_request.labels.*.name, 'A-benchmark-checks')
container:
image: ubuntu:20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- name: install sccache
env:
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.5.3
run: |
apt update
apt install -y curl wget
npm install -g yarn && node --version && node --version && npm --version && yarn --version
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
chmod +x $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: cache sccache
uses: actions/cache@v2
continue-on-error: false
with:
path: ~/.cache/sccache
key: sccache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
sccache-
- name: start sccache server
run: sccache --start-server
- name: rust setup
shell: bash
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
# SCCACHE_CACHE_SIZE: 120G
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ~/.cache/sccache
CARGO_TERM_COLOR: always
run: |
apt update
apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install nightly-2023-03-03
rustup default nightly-2023-03-03
rustup target add wasm32-unknown-unknown
- name: cache cargo
uses: Swatinem/rust-cache@v2
- name: build benchmarking binary
run: |
RUSTC_BOOTSTRAP=1 cargo build --release --features runtime-benchmarks --timings
- name: create-calamari-chainspec
run: |
$GITHUB_WORKSPACE/target/release/manta build-spec --chain calamari-dev --disable-default-bootnode --raw > $GITHUB_WORKSPACE/tests/data/fork.json
- name: append manta-pay storage for Calamari
run: |
wget -P $GITHUB_WORKSPACE/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json
cd $GITHUB_WORKSPACE/tests
yarn install
yarn
node append_storage.js
- name: Run live benchmarks test
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
# SCCACHE_CACHE_SIZE: 120G
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ~/.cache/sccache
run: |
$GITHUB_WORKSPACE/target/release/manta \
benchmark \
pallet \
--chain=$GITHUB_WORKSPACE/tests/data/fork.json \
--pallet=* \
--extrinsic=* \
--repeat=1 \
--steps=2
- name: create-manta-dev-chainspec
run: |
$GITHUB_WORKSPACE/target/release/manta build-spec --chain manta-dev --disable-default-bootnode --raw > $GITHUB_WORKSPACE/tests/data/fork.json
- name: append manta-pay storage for Manta
run: |
wget -P $GITHUB_WORKSPACE/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json
cd $GITHUB_WORKSPACE/tests
yarn install
yarn
node append_storage.js
- name: Run live benchmarks test
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
# SCCACHE_CACHE_SIZE: 120G
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ~/.cache/sccache
run: |
$GITHUB_WORKSPACE/target/release/manta \
benchmark \
pallet \
--chain=$GITHUB_WORKSPACE/tests/data/fork.json \
--pallet=* \
--extrinsic=* \
--repeat=1 \
--steps=2
- name: stop sccache server
run: sccache --stop-server || true
start-unit-test-checks:
if: contains(github.event.pull_request.labels.*.name, 'A-unit-test-checks')
timeout-minutes: 480
runs-on: runtime
container:
image: ubuntu:20.04
steps:
- uses: actions/checkout@v2
- name: install sccache
env:
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.5.3
run: |
apt update
apt install -y curl
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
chmod +x $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: cache sccache
uses: actions/cache@v2
continue-on-error: false
with:
path: ~/.cache/sccache
key: sccache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
sccache-
- name: start sccache server
run: sccache --start-server
- name: init
shell: bash
run: |
apt update
apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup update
rustup toolchain install nightly-2023-03-03
rustup default nightly-2023-03-03
rustup target add wasm32-unknown-unknown
- name: cache cargo
uses: Swatinem/rust-cache@v2
- name: Run Unit Tests
shell: bash
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
# SCCACHE_CACHE_SIZE: 240
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ~/.cache/sccache
run: |
source ${HOME}/.cargo/env
RUSTC_BOOTSTRAP=1 cargo test --release --features=runtime-benchmarks,try-runtime --workspace --exclude integration-tests --timings
- name: stop sccache server
run: sccache --stop-server || true
start-congestion-test-checks:
if: contains(github.event.pull_request.labels.*.name, 'A-congestion-test-checks')
timeout-minutes: 480
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration_test_calamari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
name: manta
path: target/production/manta
calamari-integration-test:
if: contains(github.event.pull_request.labels.*.name, 'A-calamari' || github.ref == 'refs/heads/manta')
if: contains(github.event.pull_request.labels.*.name, 'A-calamari')
needs: [build-node-current]
runs-on: runtime-integration-test
timeout-minutes: 240
Expand Down Expand Up @@ -381,7 +381,7 @@ jobs:
path: $GITHUB_WORKSPACE/zombienet-for-${{ matrix.chain-spec.id }}-stdout.log
docker-image-test:
timeout-minutes: 120
if: contains(github.event.pull_request.labels.*.name, 'A-calamari' || github.ref == 'refs/heads/manta')
if: contains(github.event.pull_request.labels.*.name, 'A-calamari')
needs: [build-node-current]
runs-on: ubuntu-20.04
strategy:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration_test_manta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
POLKADOT_BINARY: https://github.com/paritytech/polkadot/releases/download/v1.0.0/polkadot
jobs:
print-rust-versions:
if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta')
if: contains(github.event.pull_request.labels.*.name, 'A-manta')
runs-on: ubuntu-20.04
container:
image: paritytech/ci-linux:production
Expand All @@ -29,7 +29,7 @@ jobs:
echo "::set-output name=nightly::$(rustc +nightly --version)"
build-node-current:
timeout-minutes: 120
if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta')
if: contains(github.event.pull_request.labels.*.name, 'A-manta')
runs-on: ubuntu-20.04
env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
name: manta
path: target/production/manta
manta-integration-test:
if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta')
if: contains(github.event.pull_request.labels.*.name, 'A-manta')
needs: [build-node-current]
runs-on: runtime-integration-test
timeout-minutes: 240
Expand Down Expand Up @@ -427,7 +427,7 @@ jobs:
MANTA_BINARY=$HOME/.local/bin/manta yarn tests
docker-image-test:
timeout-minutes: 120
if: contains(github.event.pull_request.labels.*.name, 'A-manta' || github.ref == 'refs/heads/manta')
if: contains(github.event.pull_request.labels.*.name, 'A-manta')
needs: [build-node-current]
runs-on: ubuntu-20.04
strategy:
Expand Down
Loading

0 comments on commit 9fd65c5

Please sign in to comment.