Skip to content

Commit bc380c2

Browse files
Fix performance workflow: build llama-cli and handle API permissions
- Add llama-cli target to build steps (needed for model download) - Add continue-on-error to PR comment steps - Wrap API calls in try-catch to handle permission errors gracefully This fixes the performance-cpu job failure where llama-cli was missing and the 'Resource not accessible by integration' error when trying to comment on PRs from forks. Co-Authored-By: Alex Peng <[email protected]>
1 parent c682451 commit bc380c2

File tree

1 file changed

+36
-21
lines changed

1 file changed

+36
-21
lines changed

.github/workflows/performance-regression.yml

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
cmake -B build \
7676
-DCMAKE_BUILD_TYPE=Release \
7777
-DLLAMA_FATAL_WARNINGS=ON
78-
cmake --build build --target llama-bench -j $(nproc)
78+
cmake --build build --target llama-bench llama-cli -j $(nproc)
7979
8080
- name: Download test model
8181
run: |
@@ -143,6 +143,7 @@ jobs:
143143
144144
- name: Comment on PR with results
145145
if: github.event_name == 'pull_request' && always()
146+
continue-on-error: true
146147
uses: actions/github-script@v7
147148
with:
148149
script: |
@@ -155,12 +156,16 @@ jobs:
155156
report += 'No regression report generated.';
156157
}
157158
158-
github.rest.issues.createComment({
159-
issue_number: context.issue.number,
160-
owner: context.repo.owner,
161-
repo: context.repo.repo,
162-
body: report
163-
});
159+
try {
160+
await github.rest.issues.createComment({
161+
issue_number: context.issue.number,
162+
owner: context.repo.owner,
163+
repo: context.repo.repo,
164+
body: report
165+
});
166+
} catch (error) {
167+
console.log('Could not post comment (likely permissions issue):', error.message);
168+
}
164169
165170
- name: Fail if regression detected
166171
if: steps.detect-regression.outputs.regression == 'true'
@@ -206,7 +211,7 @@ jobs:
206211
-DCMAKE_BUILD_TYPE=Release \
207212
-DGGML_CUDA=ON \
208213
-DLLAMA_FATAL_WARNINGS=ON
209-
cmake --build build --target llama-bench -j $(nproc)
214+
cmake --build build --target llama-bench llama-cli -j $(nproc)
210215
211216
- name: Download test model
212217
run: |
@@ -272,6 +277,7 @@ jobs:
272277
273278
- name: Comment on PR with results
274279
if: github.event_name == 'pull_request' && always()
280+
continue-on-error: true
275281
uses: actions/github-script@v7
276282
with:
277283
script: |
@@ -284,12 +290,16 @@ jobs:
284290
report += 'No regression report generated.';
285291
}
286292
287-
github.rest.issues.createComment({
288-
issue_number: context.issue.number,
289-
owner: context.repo.owner,
290-
repo: context.repo.repo,
291-
body: report
292-
});
293+
try {
294+
await github.rest.issues.createComment({
295+
issue_number: context.issue.number,
296+
owner: context.repo.owner,
297+
repo: context.repo.repo,
298+
body: report
299+
});
300+
} catch (error) {
301+
console.log('Could not post comment (likely permissions issue):', error.message);
302+
}
293303
294304
- name: Fail if regression detected
295305
if: steps.detect-regression-cuda.outputs.regression == 'true'
@@ -334,7 +344,7 @@ jobs:
334344
-DCMAKE_BUILD_TYPE=Release \
335345
-DGGML_METAL=ON \
336346
-DLLAMA_FATAL_WARNINGS=ON
337-
cmake --build build --target llama-bench -j $(sysctl -n hw.logicalcpu)
347+
cmake --build build --target llama-bench llama-cli -j $(sysctl -n hw.logicalcpu)
338348
339349
- name: Download test model
340350
run: |
@@ -401,6 +411,7 @@ jobs:
401411
402412
- name: Comment on PR with results
403413
if: github.event_name == 'pull_request' && always()
414+
continue-on-error: true
404415
uses: actions/github-script@v7
405416
with:
406417
script: |
@@ -413,12 +424,16 @@ jobs:
413424
report += 'No regression report generated.';
414425
}
415426
416-
github.rest.issues.createComment({
417-
issue_number: context.issue.number,
418-
owner: context.repo.owner,
419-
repo: context.repo.repo,
420-
body: report
421-
});
427+
try {
428+
await github.rest.issues.createComment({
429+
issue_number: context.issue.number,
430+
owner: context.repo.owner,
431+
repo: context.repo.repo,
432+
body: report
433+
});
434+
} catch (error) {
435+
console.log('Could not post comment (likely permissions issue):', error.message);
436+
}
422437
423438
- name: Fail if regression detected
424439
if: steps.detect-regression-metal.outputs.regression == 'true'

0 commit comments

Comments
 (0)