From 8c4bfcfa059ddef0db59234333a4535f4dc6cfd3 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Mon, 10 Jun 2024 15:33:33 +0200 Subject: [PATCH 1/2] moved artifact dire to util --- scripts/bench.sh | 2 -- scripts/command-utils.sh | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bench.sh b/scripts/bench.sh index a8a47413666fc..2f4ef7ec6a141 100755 --- a/scripts/bench.sh +++ b/scripts/bench.sh @@ -11,8 +11,6 @@ set -eu -o pipefail shopt -s inherit_errexit -ARTIFACTS_DIR="$PWD/.git/.artifacts" - # realpath allows to reuse the current BENCH_ROOT_DIR=$(realpath "$(dirname "${BASH_SOURCE[0]}")") diff --git a/scripts/command-utils.sh b/scripts/command-utils.sh index 01d764b7e5229..252e4c86480e6 100644 --- a/scripts/command-utils.sh +++ b/scripts/command-utils.sh @@ -6,6 +6,8 @@ else export LOADED_UTILS_SH=true fi +export ARTIFACTS_DIR="$PWD/.git/.artifacts" + die() { if [ "${1:-}" ]; then >&2 echo "$1" From 547e31a6f0d9ddb009049db6b005ac01411b1e4d Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Mon, 10 Jun 2024 15:33:54 +0200 Subject: [PATCH 2/2] added missing runtime dir --- .github/workflows/command-bench.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/command-bench.yml b/.github/workflows/command-bench.yml index 334765b994db1..a22969a3b8122 100644 --- a/.github/workflows/command-bench.yml +++ b/.github/workflows/command-bench.yml @@ -63,6 +63,19 @@ on: - substrate - polkadot - cumulus + runtime_dir: + description: Runtime directory + type: choice + options: + - people + - collectives + - coretime + - bridge-hubs + - contracts + - glutton + - starters + - testing + jobs: set-image: @@ -90,7 +103,7 @@ jobs: GH_TOKEN: ${{ github.token }} - name: Run bench run: | - "./scripts/bench.sh" "${{ inputs.benchmark }}" --runtime "${{ inputs.runtime }}" --pallet "${{ inputs.pallet }}" --target_dir "${{ inputs.target_dir }}" --subcommand "${{ inputs.subcommand }}" + "./scripts/bench.sh" "${{ inputs.benchmark }}" --runtime "${{ inputs.runtime }}" --pallet "${{ inputs.pallet }}" --target_dir "${{ inputs.target_dir }}" --subcommand "${{ inputs.subcommand }}" --runtime_dir "${{ inputs.runtime_dir }}" - name: Report failure if: ${{ failure() }} run: gh pr comment ${{ inputs.pr }} --body "

Command failed ❌

Run by @${{ github.actor }} for ${{ github.workflow }} failed. See logs here."