Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/ms/issue-2821' into ms/issue-2821
Browse files Browse the repository at this point in the history
  • Loading branch information
mqxf committed Sep 18, 2023
2 parents 059390d + 0672b3e commit febbe08
Show file tree
Hide file tree
Showing 199 changed files with 9,500 additions and 7,877 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Build-gear-loader-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
RUSTUP_HOME: /tmp/rustup_home
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Install: Set cargo path"
run: echo "/tmp/cargo/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
needs: build-gear-loader
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download artifact
uses: actions/download-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# runs-on: [kuberunner]
# steps:
# - name: "ACTIONS: Checkout"
# uses: actions/checkout@v3
# uses: actions/checkout@v4

# - name: "Fetch origin"
# run: git fetch origin
Expand All @@ -39,7 +39,7 @@ jobs:
sccache_path: ${{ steps.sccache.outputs.sccache_path }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "CACHE: Set sccache path"
id: sccache
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
CARGO_INCREMENTAL: 0
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Install: Setup MSYS2 environment"
uses: msys2/setup-msys2@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
outputs:
cache: ${{ steps.check-commit-message.outputs.cache }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/Update-Vara-Prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
image_tag: ${{ steps.image-tag.outputs.tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create image tag
id: image-tag
Expand All @@ -24,7 +24,7 @@ jobs:
needs: tag-image
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Info
run: |
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Info
run: |
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Info
run: |
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
needs: [docker, tag-image, deploy-first-connector, deploy-second-connector, deploy-one-validator]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Info
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/Update-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
image_tag: ${{ steps.image-tag.outputs.tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create image tag
id: image-tag
Expand All @@ -24,7 +24,7 @@ jobs:
needs: tag-image
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Echo tag
run: echo ${{ needs.tag-image.outputs.image_tag }}
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
# needs: [docker, tag-image]
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# uses: actions/checkout@v4



Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
# needs: [docker, deploy-one-validator,tag-image]
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# uses: actions/checkout@v4



Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
RUSTUP_HOME: /tmp/rustup_home
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Install: Rust toolchain"
uses: dsherret/rust-toolchain-file@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
RUSTUP_HOME: /tmp/rustup_home
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "ACTIONS: Setup caching"
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-node-fuzzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
SCCACHE_DIR: ${{ inputs.cache }}
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Install: Set cargo path"
run: echo "/tmp/cargo/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
run: ./scripts/gear.sh init cargo

- name: "Build: Gear"
run: ./scripts/gear.sh build gear --locked --release
run: ./scripts/gear.sh build gear -F gear-cli/dev --locked --release

- name: "Build fuzzer"
run: ./scripts/gear.sh build fuzz --locked --release
Expand Down Expand Up @@ -96,9 +96,11 @@ jobs:

- name: "Test: Runtime benchmarks and benchmark tests work"
run: |
cargo build -p gear-cli --release --features=runtime-benchmarks,runtime-benchmarks-checkers
cargo build -p gear-cli --release --features=dev,runtime-benchmarks,runtime-benchmarks-checkers
# check that perf benchmarks works. `--steps=20` need to test, that benchmarks works for different input number.
./target/release/gear benchmark pallet --chain=dev --pallet=pallet_gear --steps=20 --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096
# check that read_big_state benchmarks works
./target/release/gear benchmark pallet --chain=dev --pallet=pallet_gear --extrinsic="read_big_state" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --extra
# check that check/test benchmarks works
./target/release/gear benchmark pallet --chain=dev --pallet=pallet_gear --extrinsic="check_all" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --extra
# check also lazy-pages benchmarks tests for native runtime
Expand All @@ -109,11 +111,11 @@ jobs:

- name: "Test: `try-runtime` feature tests"
run: |
cargo test -p "pallet-*" --features try-runtime --release --locked
cargo test -p "pallet-*" --features try-runtime,dev --release --locked
- name: "Test: Try runtime migrations"
run: |
cargo build -p gear-cli --features try-runtime --release --locked
cargo build -p gear-cli --features try-runtime,dev --release --locked
./target/release/gear try-runtime --runtime ./target/release/wbuild/gear-runtime/gear_runtime.wasm on-runtime-upgrade --checks live --uri wss://rpc-private-testnet.gear-tech.io:443
env:
RUST_LOG: info
Expand Down Expand Up @@ -194,7 +196,7 @@ jobs:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Install: Set cargo path"
run: echo "/tmp/cargo/bin" >> $GITHUB_PATH
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
SCCACHE_DIR: ${{ inputs.cache }}
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Install: Set cargo path"
run: echo "/tmp/cargo/bin" >> $GITHUB_PATH
Expand All @@ -43,7 +43,7 @@ jobs:
run: ./scripts/gear.sh clippy examples --all-targets --locked

- name: "Test: Doc tests"
run: ./scripts/gear.sh test doc
run: ./scripts/gear.sh test docs

- name: "Test: Changes in gsdk generated code"
run: |
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
access_token: ${{ github.token }}

- name: "ACTIONS: Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Install: Set cargo path"
run: echo "/tmp/cargo/bin" >> $GITHUB_PATH
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
RUSTUP_HOME: /tmp/rustup_home
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Install: Rust toolchain"
uses: dsherret/rust-toolchain-file@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
|| github.event.label.name == 'A4-insubstantial'
|| github.event.label.name == 'A2-mergeoncegreen'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/github-script@v6
Expand Down
57 changes: 39 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update config
Expand Down Expand Up @@ -49,46 +49,67 @@ jobs:
needs: prepare
runs-on: [kuberunner]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Actions: Checkout"
uses: actions/checkout@v4

- name: Set cargo path
run: echo "/tmp/cargo/bin" >> $GITHUB_PATH
- name: "Environment: Cargo path"
run: >
echo "/tmp/cargo/bin" >> $GITHUB_PATH
- name: "Install: Rust toolchain"
uses: dsherret/rust-toolchain-file@v1

- name: Install build deps
- name: "Install: Build dependencies"
run: |
sudo apt update -y
sudo apt install -y git clang curl libssl-dev llvm libudev-dev cmake protobuf-compiler wget bzip2
- name: Build wasm-proc
- name: "Environment: Export versions"
run: |
export GEAR_SPEC="$(cat runtime/gear/src/lib.rs | grep "spec_version: " | awk -F " " '{print substr($2, 1, length($2)-1)}')"
export VARA_SPEC="$(cat runtime/vara/src/lib.rs | grep "spec_version: " | awk -F " " '{print substr($2, 1, length($2)-1)}')"
- name: "Artifact: Make `artifact` directory"
run: >
mkdir -p artifact
- name: "Build: `wasm-proc`"
run: |
cargo build -p wasm-proc --release
cp -vf target/release/wasm-proc ./
- name: Build binaries
- name: "Build: Production `gear-cli`"
run: >
cargo build -p gear-cli --profile production
- name: Test runtimes
- name: "Test: Production runtimes"
run: |
./wasm-proc --check-runtime-imports target/production/wbuild/gear-runtime/gear_runtime.wasm
./wasm-proc --check-runtime-imports target/production/wbuild/vara-runtime/vara_runtime.wasm
- name: Prepare artifacts
- name: "Artifact: Production binaries"
run: |
mkdir -p artifact
cp target/production/wbuild/gear-runtime/gear_runtime.compact.compressed.wasm artifact/
cp target/production/wbuild/gear-runtime/gear_runtime.compact.wasm artifact/
cp target/production/wbuild/gear-runtime/gear_runtime.wasm artifact/
cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm artifact/
cp target/production/wbuild/vara-runtime/vara_runtime.compact.wasm artifact/
cp target/production/wbuild/vara-runtime/vara_runtime.wasm artifact/
cp target/production/gear artifact/
cp target/production/wbuild/gear-runtime/gear_runtime.compact.compressed.wasm "artifact/gear_v$GEAR_SPEC.wasm"
cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm "artifact/vara_v$VARA_SPEC.wasm"
cp target/production/gear artifact/gear
strip artifact/gear || true
- name: "Build: Development `gear-cli`"
run: >
cargo build -p gear-cli --profile production -F dev
- name: "Test: Development runtimes"
run: |
./wasm-proc --check-runtime-imports target/production/wbuild/gear-runtime/gear_runtime.wasm
./wasm-proc --check-runtime-imports target/production/wbuild/vara-runtime/vara_runtime.wasm
- name: "Artifact: Development binaries"
run: |
cp target/production/wbuild/gear-runtime/gear_runtime.compact.compressed.wasm "artifact/dev_gear_v$GEAR_SPEC.wasm"
cp target/production/wbuild/vara-runtime/vara_runtime.compact.compressed.wasm "artifact/dev_vara_v$VARA_SPEC.wasm"
cp target/production/gear artifact/dev-gear
strip artifact/dev-gear || true
- name: Publish
uses: softprops/action-gh-release@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rollback-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Info
run: |
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Info
run: |
Expand Down
Loading

0 comments on commit febbe08

Please sign in to comment.