Skip to content

Commit 02b8752

Browse files
fix zizmor issues
1 parent 82b2f04 commit 02b8752

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

devops/actions/run-tests/benchmark/action.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ runs:
132132
echo "Using SYCL from: $CMPLR_ROOT !"
133133
echo "CMPLR_ROOT=$CMPLR_ROOT" >> $GITHUB_ENV
134134
fi
135+
136+
# Set BENCH_WORKDIR env var
137+
export BENCH_WORKDIR="$(realpath ./llvm_test_workdir)"
138+
echo "BENCH_WORKDIR=$BENCH_WORKDIR" >> $GITHUB_ENV
135139
- name: Set NUMA node to run benchmarks on
136140
shell: bash
137141
run: |
@@ -255,12 +259,13 @@ runs:
255259
sycl-ls --verbose
256260
- name: Build and run benchmarks
257261
shell: bash
262+
env:
263+
BENCH_WORKDIR: ${{ env.BENCH_WORKDIR }}
264+
BENCHMARK_RESULTS_REPO_PATH: ${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}
258265
run: |
259266
# Build and run benchmarks
260267
261268
echo "::group::setup_workdir"
262-
export BENCH_WORKDIR="$(realpath ./llvm_test_workdir)"
263-
echo "BENCH_WORKDIR=$BENCH_WORKDIR" >> $GITHUB_ENV
264269
if [ -n "$BENCH_WORKDIR" ] && [ -d "$BENCH_WORKDIR" ] && [[ "$BENCH_WORKDIR" == *llvm_test_workdir* ]]; then rm -rf "$BENCH_WORKDIR" ; fi
265270
266271
# Clean up potentially existing, old summary files
@@ -277,8 +282,8 @@ runs:
277282
--adapter "$FORCELOAD_ADAPTER" \
278283
--save "$SAVE_NAME" \
279284
--output-html remote \
280-
--results-dir "${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}/" \
281-
--output-dir "${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}/" \
285+
--results-dir "${BENCHMARK_RESULTS_REPO_PATH}/" \
286+
--output-dir "${BENCHMARK_RESULTS_REPO_PATH}/" \
282287
--preset "$PRESET" \
283288
--timestamp-override "$SAVE_TIMESTAMP" \
284289
--detect-version sycl,compute_runtime \
@@ -293,8 +298,8 @@ runs:
293298
--avg-type EWMA \
294299
--cutoff "$(date -u -d '7 days ago' +'%Y%m%d_%H%M%S')" \
295300
--name "$SAVE_NAME" \
296-
--compare-file "${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}/results/${SAVE_NAME}_${SAVE_TIMESTAMP}.json" \
297-
--results-dir "${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}/results/" \
301+
--compare-file "${BENCHMARK_RESULTS_REPO_PATH}/results/${SAVE_NAME}_${SAVE_TIMESTAMP}.json" \
302+
--results-dir "${BENCHMARK_RESULTS_REPO_PATH}/results/" \
298303
--regression-filter '^[a-z_]+_sycl .* CPU count' \
299304
--regression-filter-type 'SYCL benchmark (measured using CPU cycle count)' \
300305
--verbose \
@@ -305,6 +310,8 @@ runs:
305310
- name: Run benchmarks integration tests
306311
shell: bash
307312
if: ${{ github.event_name == 'pull_request' }}
313+
env:
314+
BENCH_WORKDIR: ${{ env.BENCH_WORKDIR }}
308315
run: |
309316
# Run benchmarks' integration tests
310317
@@ -320,7 +327,7 @@ runs:
320327
[ -f "github_summary_exe.md" ] && cat github_summary_exe.md >> $GITHUB_STEP_SUMMARY
321328
[ -f "github_summary_reg.md" ] && cat github_summary_reg.md >> $GITHUB_STEP_SUMMARY
322329
323-
cd "${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}"
330+
cd "${BENCHMARK_RESULTS_REPO_PATH}"
324331
git add .
325332
for diff in $(git diff HEAD --name-only); do
326333
mkdir -p "../cached_changes/$(dirname $diff)"
@@ -329,9 +336,12 @@ runs:
329336
- name: Push benchmarks results
330337
if: always() && inputs.upload_results == 'true'
331338
shell: bash
339+
env:
340+
BENCHMARK_RESULTS_REPO_PATH: ${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}
341+
BENCHMARK_RESULTS_BRANCH: ${{ steps.results_repo.outputs.BENCHMARK_RESULTS_BRANCH }}
332342
run: |
333343
# Push benchmarks results
334-
cd "${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}"
344+
cd "${BENCHMARK_RESULTS_REPO_PATH}"
335345
git config user.name "github-actions[bot]"
336346
git config user.email "github-actions[bot]@users.noreply.github.com"
337347
@@ -356,7 +366,7 @@ runs:
356366
cached_result="$(mktemp -d)/$(basename $results_file)"
357367
mv "$results_file" "$cached_result"
358368
359-
git reset --hard "origin/${{ steps.results_repo.outputs.BENCHMARK_RESULTS_BRANCH }}"
369+
git reset --hard "origin/${BENCHMARK_RESULTS_BRANCH}"
360370
git pull
361371
362372
mv "$cached_result" "$results_file"
@@ -367,8 +377,8 @@ runs:
367377
./devops/scripts/benchmarks/main.py \
368378
"$(realpath ./llvm_test_workdir)" \
369379
--output-html remote \
370-
--results-dir "${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}/" \
371-
--output-dir "${{ steps.results_repo.outputs.BENCHMARK_RESULTS_REPO_PATH }}/" \
380+
--results-dir "${BENCHMARK_RESULTS_REPO_PATH}/" \
381+
--output-dir "${BENCHMARK_RESULTS_REPO_PATH}/" \
372382
--dry-run
373383
cd -
374384
done

0 commit comments

Comments
 (0)