Skip to content

Commit b17b699

Browse files
committed
Yet another minor real-time benchmark improvements
Changes include: - Enable parallelism for the scheduled and manual workflows - Change length of commit hashes in order to align with GitHub's behavior - Remove unnecessary cleanup step [skip ci]
1 parent 0caebcd commit b17b699

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

.github/workflows/real-time-benchmark.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ permissions:
3636
contents: read
3737
pull-requests: write
3838
concurrency:
39-
group: ${{ github.workflow }}
39+
group: ${{ github.workflow }}-${{ github.event_name }}
4040
cancel-in-progress: false
4141
jobs:
4242
REAL_TIME_BENCHMARK:
@@ -135,7 +135,7 @@ jobs:
135135
run: |
136136
set -e
137137
138-
BASELINE_SHORT_SHA="$(echo "${{ env.BASELINE_COMMIT }}" | cut -c1-4)"
138+
BASELINE_SHORT_SHA="$(echo "${{ env.BASELINE_COMMIT }}" | cut -c 1-7)"
139139
140140
cat << EOF > ./php-version-benchmarks/config/php/baseline.ini
141141
PHP_NAME="PHP - baseline@$BASELINE_SHORT_SHA"
@@ -152,7 +152,7 @@ jobs:
152152
run: |
153153
set -e
154154
155-
BASELINE_SHORT_SHA="$(echo "${{ env.BASELINE_COMMIT }}" | cut -c1-4)"
155+
BASELINE_SHORT_SHA="$(echo "${{ env.BASELINE_COMMIT }}" | cut -c 1-7)"
156156
157157
cat << EOF > ./php-version-benchmarks/config/php/baseline_jit.ini
158158
PHP_NAME="PHP - baseline@$BASELINE_SHORT_SHA (JIT)"
@@ -240,12 +240,12 @@ jobs:
240240
241241
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
242242
WORKSPACE="manual"
243-
BASE_COMMIT="$(echo "${{ env.BASELINE_COMMIT }}" | cut -c 1-6)"
243+
BASE_COMMIT="$(echo "${{ env.BASELINE_COMMIT }}" | cut -c 1-10)"
244244
else
245245
WORKSPACE="nightly"
246-
BASE_COMMIT="$(echo "${{ env.LAST_RESULT_SHA }}" | cut -c 1-6)"
246+
BASE_COMMIT="$(echo "${{ env.LAST_RESULT_SHA }}" | cut -c 1-10)"
247247
fi
248-
COMPARE_COMMIT="$(echo "${{ env.COMMIT }}" | cut -c 1-6)"
248+
COMPARE_COMMIT="$(echo "${{ env.COMMIT }}" | cut -c 1-10)"
249249
250250
cp ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini.dist ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini
251251
sed -i "s|INFRA_DOCKER_REGISTRY=public.ecr.aws/abcdefgh|INFRA_DOCKER_REGISTRY=${{ secrets.PHP_VERSION_BENCHMARK_DOCKER_REGISTRY }}|g" ./php-version-benchmarks/config/infra/aws/x86_64-metal.ini
@@ -301,16 +301,3 @@ jobs:
301301
NEWEST_RESULT_DIRECTORY=$(ls -td ${{ github.workspace }}/php-version-benchmarks/docs/results/${{ env.YEAR }}/*/ | head -1)
302302
sed -i "s|#ARTIFACT_URL#|${{ steps.upload.outputs.artifact-url }}|g" "${NEWEST_RESULT_DIRECTORY}result.md"
303303
gh pr comment ${{ inputs.pull_request }} --body-file "${NEWEST_RESULT_DIRECTORY}result.md" --repo ${{ github.repository }}
304-
- name: Cleanup
305-
if: always()
306-
run: |
307-
set -ex
308-
309-
rm -rf ./php-version-benchmarks/tmp/
310-
rm -f ./php-version-benchmarks/build/infrastructure/config/*.tfvars
311-
rm -rf ./php-version-benchmarks/build/infrastructure/aws/.terraform/
312-
rm -f ./php-version-benchmarks/build/infrastructure/aws/.terraform.lock.hcl
313-
rm -f ./php-version-benchmarks/build/infrastructure/aws/aws.tfplan
314-
rm -f ./php-version-benchmarks/build/infrastructure/aws/terraform.tfstate
315-
rm -f ./php-version-benchmarks/build/infrastructure/aws/terraform.tfstate.backup
316-
rm -f ./php-version-benchmarks/config/infra/aws/*.ini

0 commit comments

Comments
 (0)