Skip to content

Commit 33c11a6

Browse files
authored
[CI] Remove dependency on bot user for uploading benchmark CI results (#20333)
This PR: - moves benchmarking CI data to `benchmark-ci-tests` branch instead of intel/llvm-ci-perf-results - removes the need for an additional bot user when pushing data (as well as the need to periodically update its tokens) Test run: https://github.com/intel/llvm/actions/runs/18386952310/job/52388325821 (job failed due to "regression"; issue should be addressed with the merge of #20277
1 parent 3dfb538 commit 33c11a6

File tree

9 files changed

+58
-12
lines changed

9 files changed

+58
-12
lines changed

.github/workflows/sycl-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
touch .nojekyll
6565
# Update benchmarking dashboard configuration
6666
cat << EOF > benchmarks/config.js
67-
remoteDataUrl = 'https://raw.githubusercontent.com/intel/llvm-ci-perf-results/refs/heads/unify-ci/';
67+
remoteDataUrl = 'https://raw.githubusercontent.com/intel/llvm/refs/heads/sycl-benchmark-ci-results/';
6868
defaultCompareNames = ["Baseline_PVC_L0"];
6969
EOF
7070
# Upload the generated docs as an artifact and deploy to GitHub Pages.

.github/workflows/sycl-linux-precommit-aws.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
e2e-cuda:
6464
needs: [aws-start]
6565
uses: ./.github/workflows/sycl-linux-run-tests.yml
66+
permissions:
67+
contents: write
68+
packages: read
6669
with:
6770
name: CUDA E2E
6871
runner: '["aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}"]'

.github/workflows/sycl-linux-precommit.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ jobs:
144144
E2E:
145145
needs: [build, detect_changes, compat_read_exclude]
146146
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
147+
permissions:
148+
contents: write
149+
packages: read
147150
strategy:
148151
fail-fast: false
149152
matrix:
@@ -231,6 +234,9 @@ jobs:
231234

232235
test-perf:
233236
needs: [build, detect_changes]
237+
permissions:
238+
contents: write
239+
packages: read
234240
if: |
235241
always() && !cancelled()
236242
&& needs.build.outputs.build_conclusion == 'success'

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ jobs:
233233
if: github.event_name == 'workflow_dispatch' || inputs.skip_run == 'false'
234234
name: ${{ inputs.name }}
235235
runs-on: ${{ fromJSON(inputs.runner) }}
236+
permissions:
237+
contents: write
238+
packages: read
236239
container:
237240
image: ${{ inputs.image || 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps'}}
238241
options: ${{ inputs.image_options }}
@@ -376,4 +379,3 @@ jobs:
376379
build_ref: ${{ inputs.repo_ref }}
377380
env:
378381
RUNNER_TAG: ${{ inputs.runner }}
379-
GITHUB_TOKEN: ${{ secrets.LLVM_SYCL_BENCHMARK_TOKEN }}

.github/workflows/sycl-nightly.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ jobs:
8282

8383
ubuntu2204_test:
8484
needs: [ubuntu2204_build]
85+
permissions:
86+
contents: write
87+
packages: read
8588
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
8689
strategy:
8790
fail-fast: false
@@ -169,6 +172,9 @@ jobs:
169172

170173
ubuntu2404_oneapi_test:
171174
needs: [ubuntu2404_oneapi_build]
175+
permissions:
176+
contents: write
177+
packages: read
172178
if: ${{ always() && !cancelled() && needs.ubuntu2404_oneapi_build.outputs.build_conclusion == 'success' }}
173179
uses: ./.github/workflows/sycl-linux-run-tests.yml
174180
with:
@@ -230,6 +236,9 @@ jobs:
230236

231237
cuda-run-tests:
232238
needs: [ubuntu2204_build, cuda-aws-start]
239+
permissions:
240+
contents: write
241+
packages: read
233242
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
234243
uses: ./.github/workflows/sycl-linux-run-tests.yml
235244
with:
@@ -254,6 +263,9 @@ jobs:
254263

255264
build-sycl-cts-linux:
256265
needs: ubuntu2204_build
266+
permissions:
267+
contents: write
268+
packages: read
257269
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
258270
uses: ./.github/workflows/sycl-linux-run-tests.yml
259271
with:
@@ -270,6 +282,9 @@ jobs:
270282

271283
run-sycl-cts-linux:
272284
needs: [ubuntu2204_build, build-sycl-cts-linux]
285+
permissions:
286+
contents: write
287+
packages: read
273288
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
274289
strategy:
275290
fail-fast: false

.github/workflows/sycl-post-commit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
e2e-lin:
4949
needs: [detect_changes, build-lin]
5050
if: ${{ always() && !cancelled() && needs.build-lin.outputs.build_conclusion == 'success' }}
51+
permissions:
52+
contents: write
53+
packages: read
5154
strategy:
5255
fail-fast: false
5356
matrix:

.github/workflows/sycl-ur-perf-benchmarking.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ jobs:
150150
benchmark_dispatch:
151151
name: '[Dispatch] Benchmarks'
152152
needs: [ build_sycl_dispatch, sanitize_inputs_dispatch ]
153+
permissions:
154+
contents: write
155+
packages: read
153156
if: always() && !cancelled() && needs.build_sycl_dispatch.outputs.build_conclusion == 'success'
154157
strategy:
155158
matrix:
@@ -193,6 +196,9 @@ jobs:
193196
benchmark_nightly:
194197
name: '[Nightly] Benchmarks'
195198
needs: [build_nightly]
199+
permissions:
200+
contents: write
201+
packages: read
196202
if: always() && !cancelled() && needs.build_nightly.outputs.build_conclusion == 'success'
197203
strategy:
198204
fail-fast: false
@@ -241,6 +247,9 @@ jobs:
241247
test_benchmark_framework:
242248
name: '[PR] Benchmark suite testing'
243249
needs: [build_pr]
250+
permissions:
251+
contents: write
252+
packages: read
244253
if: always() && !cancelled() && needs.build_pr.outputs.build_conclusion == 'success'
245254
uses: ./.github/workflows/sycl-linux-run-tests.yml
246255
with:

.github/workflows/sycl-weekly.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
# This job builds SYCL-CTS with -fsycl-use-spirv-backend-for-spirv-gen.
2323
build-sycl-cts:
2424
needs: ubuntu2204_build
25+
permissions:
26+
contents: write
27+
packages: read
2528
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
2629
uses: ./.github/workflows/sycl-linux-run-tests.yml
2730
with:
@@ -39,6 +42,9 @@ jobs:
3942

4043
run-sycl-cts:
4144
needs: [ubuntu2204_build, build-sycl-cts]
45+
permissions:
46+
contents: write
47+
packages: read
4248
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
4349
strategy:
4450
fail-fast: false

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ inputs:
3737
type: string
3838
required: False
3939

40+
env:
41+
BENCHMARK_RESULTS_BRANCH: "sycl-benchmark-ci-results"
42+
4043
runs:
4144
# composite actions don't make use of 'name', so copy-paste names as a comment in the first line of each step
4245
using: "composite"
@@ -162,10 +165,10 @@ runs:
162165
163166
cd -
164167
- name: Checkout results repo
165-
shell: bash
166-
run: |
167-
# Checkout results repo
168-
git clone -b unify-ci https://github.com/intel/llvm-ci-perf-results
168+
uses: actions/checkout@v5
169+
with:
170+
ref: ${{ env.BENCHMARK_RESULTS_BRANCH }}
171+
path: llvm-ci-perf-results
169172
- name: Build and run benchmarks
170173
env:
171174
# Need to append "_<device>_<backend>" to save name in order to follow
@@ -273,9 +276,8 @@ runs:
273276
run: |
274277
# Push benchmarks results
275278
cd "./llvm-ci-perf-results"
276-
git config user.name "SYCL Benchmarking Bot"
277-
git config user.email "[email protected]"
278-
results_branch="unify-ci"
279+
git config user.name "github-actions[bot]"
280+
git config user.email "github-actions[bot]@users.noreply.github.com"
279281
280282
if git diff --quiet && git diff --cached --quiet; then
281283
echo "No new results added, skipping push."
@@ -288,7 +290,7 @@ runs:
288290
git commit -m "[GHA] Upload compute-benchmarks results from https://github.com/intel/llvm/actions/runs/${{ github.run_id }}"
289291
results_file="$(git diff HEAD~1 --name-only -- results/ | head -n 1)"
290292
291-
if git push "https://[email protected]/intel/llvm-ci-perf-results.git" "$results_branch"; then
293+
if git push; then
292294
echo "Push succeeded"
293295
break
294296
fi
@@ -298,8 +300,8 @@ runs:
298300
cached_result="$(mktemp -d)/$(basename $results_file)"
299301
mv "$results_file" "$cached_result"
300302
301-
git reset --hard "origin/$results_branch"
302-
git pull origin "$results_branch"
303+
git reset --hard "origin/$BENCHMARK_RESULTS_BRANCH"
304+
git pull
303305
304306
mv "$cached_result" "$results_file"
305307
fi

0 commit comments

Comments
 (0)