-
Notifications
You must be signed in to change notification settings - Fork 792
[CI] Remove dependency on bot user for uploading benchmark CI results #20333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
Changes from all commits
df8990c
7ce4420
866b64e
b518e18
2109b73
6e73cf7
e20975f
3bea805
418bd1d
1539867
8e1f1b8
66c4b5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,7 +212,7 @@ on: | |
- "run-only" | ||
|
||
permissions: | ||
contents: read | ||
contents: write | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we set the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me attempt this and I'll get back to you There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like permissions have a job-level granularity, I can't just give it to a single step. Doesn't make much sense to nest an additional write permission for the job given that there is only a single job in the entire workflow, are we cool to keep it like this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security BKMs says to set top-level permissions the least required (at best read only), in case you ever add a second job |
||
packages: read | ||
|
||
jobs: | ||
|
@@ -361,4 +361,3 @@ jobs: | |
build_ref: ${{ inputs.repo_ref }} | ||
env: | ||
RUNNER_TAG: ${{ inputs.runner }} | ||
GITHUB_TOKEN: ${{ secrets.LLVM_SYCL_BENCHMARK_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,9 @@ runs: | |
python3 ./devops/scripts/benchmarks/presets.py query "$PRESET" | ||
[ "$?" -ne 0 ] && exit 1 # Stop workflow if invalid preset | ||
echo "PRESET=$PRESET" >> $GITHUB_ENV | ||
|
||
# Set branch containing benchmark CI results: | ||
echo "BENCHMARK_RESULTS_BRANCH=sycl-benchmark-ci-results" >> $GITHUB_ENV | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. perhaps just set it as an |
||
- name: Compute CPU core range to run benchmarks on | ||
shell: bash | ||
run: | | ||
|
@@ -134,9 +137,10 @@ runs: | |
|
||
cd - | ||
- name: Checkout results repo | ||
shell: bash | ||
run: | | ||
git clone -b unify-ci https://github.com/intel/llvm-ci-perf-results | ||
uses: actions/checkout@v5 | ||
with: | ||
ref: ${{ env.BENCHMARK_RESULTS_BRANCH }} | ||
path: llvm-ci-perf-results | ||
- name: Run compute-benchmarks | ||
env: | ||
# Need to append "_<device>_<backend>" to save name in order to follow | ||
|
@@ -237,9 +241,8 @@ runs: | |
shell: bash | ||
run: | | ||
cd "./llvm-ci-perf-results" | ||
git config user.name "SYCL Benchmarking Bot" | ||
git config user.email "[email protected]" | ||
results_branch="unify-ci" | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
|
||
if git diff --quiet && git diff --cached --quiet; then | ||
echo "No new results added, skipping push." | ||
|
@@ -252,7 +255,7 @@ runs: | |
git commit -m "[GHA] Upload compute-benchmarks results from https://github.com/intel/llvm/actions/runs/${{ github.run_id }}" | ||
results_file="$(git diff HEAD~1 --name-only -- results/ | head -n 1)" | ||
|
||
if git push "https://[email protected]/intel/llvm-ci-perf-results.git" "$results_branch"; then | ||
if git push; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dont we need to specify the branch? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks to be already configured by actions/checkout@v5; I figured it was better to specify the branch once than to specify the branch multiple times. |
||
echo "Push succeeded" | ||
break | ||
fi | ||
|
@@ -262,8 +265,8 @@ runs: | |
cached_result="$(mktemp -d)/$(basename $results_file)" | ||
mv "$results_file" "$cached_result" | ||
|
||
git reset --hard "origin/$results_branch" | ||
git pull origin "$results_branch" | ||
git reset --hard "origin/$BENCHMARK_CI_RESULTS" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's |
||
git pull | ||
|
||
mv "$cached_result" "$results_file" | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my note on this change - while it seems convenient, I can see on my PC, that repo
intel/llvm-ci-perf-results
is ~600MB - this will be extra MBs added tointel/llvm
repo, which is already quite big - just to consider