Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into al-non-lazy-removal
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/test-measurements.yaml
#	runtime/gear/Cargo.toml
#	runtime/vara/Cargo.toml
  • Loading branch information
ark0f committed Sep 15, 2023
2 parents d242af3 + 9eea531 commit edaab28
Show file tree
Hide file tree
Showing 82 changed files with 5,162 additions and 6,764 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
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 All @@ -93,7 +93,7 @@ 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
Expand All @@ -108,11 +108,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
53 changes: 37 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,46 +49,67 @@ jobs:
needs: prepare
runs-on: [kuberunner]
steps:
- name: Checkout
- 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
2 changes: 1 addition & 1 deletion .github/workflows/test-measurements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
tar -xf /cache/check_cargo_registry_${{ github.ref_name }}.tar -C /
- name: "Build: Gear"
run: ./scripts/gear.sh build gear --release --locked --features=runtime-benchmarks
run: ./scripts/gear.sh build gear --release --locked --features=dev,runtime-benchmarks

- name: "Collect: Gear workspace tests"
run: |
Expand Down
Loading

0 comments on commit edaab28

Please sign in to comment.