Skip to content

Commit

Permalink
fix(benchmarks): add missing artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
StackOverflowExcept1on committed Apr 1, 2024
1 parent 53071e1 commit f596a22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: weights-vara
path: runtime/vara/src/weights/
path: |
runtime/vara/src/weights/
utils/wasm-instrument/src/gas_metering/
- name: "TIP: download the artifacts and use `./scripts/unpack-weights.sh`"
run: |
Expand All @@ -73,7 +75,7 @@ jobs:
with:
commit_message: >-
chore(runtime): update weights
file_pattern: "pallets/gear/src/ runtime/vara/src/weights/"
file_pattern: "pallets/gear/src/ runtime/vara/src/weights/ utils/wasm-instrument/src/gas_metering/"

- name: Create Pull Request
if: ${{ inputs.change-type == 'pull_request' }}
Expand All @@ -82,6 +84,7 @@ jobs:
add-paths: |
pallets/gear/src/
runtime/vara/src/weights/
utils/wasm-instrument/src/gas_metering/
commit-message: update weights
branch: weights/patch
branch-suffix: short-commit-hash
Expand Down
6 changes: 1 addition & 5 deletions scripts/unpack-weights.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ say_err() {
}

err() {
if [ ! -z ${td-} ]; then
rm -rf $td
fi

say_err "error: $@"
exit 1
}
Expand All @@ -39,7 +35,7 @@ if [[ ! -f $VARA_RUNTIME ]]; then
fi

# extract artifacts to the correct directories
unzip -o $VARA_RUNTIME -d runtime/vara/src/weights/ && rm $VARA_RUNTIME
unzip -o $VARA_RUNTIME && rm $VARA_RUNTIME

# apply some patches for `pallets/gear/src/weights.rs`
cp runtime/vara/src/weights/pallet_gear.rs pallets/gear/src/weights.rs
Expand Down

0 comments on commit f596a22

Please sign in to comment.