Skip to content

Commit 12cad30

Browse files
committed
wip
1 parent ddc007e commit 12cad30

2 files changed

Lines changed: 32 additions & 5 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: BW Benchmarks
33
on: [workflow_call]
44

55
permissions:
6-
contents: write
7-
pull-requests: write
6+
contents: read
87

98
env:
109
BENCHMARK_JSON: benchmark-results/current.json
@@ -18,6 +17,8 @@ jobs:
1817
benchmark_attempt:
1918
runs-on: ubuntu-latest
2019
continue-on-error: true
20+
permissions:
21+
contents: read
2122
defaults:
2223
run:
2324
shell: bash -el {0}
@@ -85,6 +86,10 @@ jobs:
8586
benchmark:
8687
needs: [benchmark_attempt]
8788
runs-on: ubuntu-latest
89+
permissions:
90+
contents: read
91+
issues: write
92+
pull-requests: write
8893

8994
steps:
9095
- name: Checkout BEC Widgets
@@ -185,8 +190,27 @@ jobs:
185190
if: github.event_name == 'pull_request' && steps.compare.outcome == 'failure'
186191
run: exit 1
187192

193+
publish:
194+
needs: [benchmark]
195+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
196+
runs-on: ubuntu-latest
197+
permissions:
198+
contents: write
199+
200+
steps:
201+
- name: Checkout BEC Widgets
202+
uses: actions/checkout@v4
203+
with:
204+
repository: bec-project/bec_widgets
205+
ref: ${{ github.sha }}
206+
207+
- name: Download aggregate benchmark artifact
208+
uses: actions/download-artifact@v4
209+
with:
210+
name: bw-benchmark-json
211+
path: .
212+
188213
- name: Prepare gh-pages for publishing
189-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
190214
run: |
191215
# Clean up any existing worktree/directory
192216
if [ -d gh-pages-benchmark-data ]; then
@@ -203,7 +227,6 @@ jobs:
203227
fi
204228
205229
- name: Publish benchmark data to gh-pages
206-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
207230
working-directory: gh-pages-benchmark-data
208231
run: |
209232
mkdir -p benchmarks/history

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ concurrency:
2323

2424
permissions:
2525
pull-requests: write
26-
contents: write
26+
contents: read
2727

2828
jobs:
2929
check_pr_status:
@@ -37,6 +37,10 @@ jobs:
3737
benchmark:
3838
needs: [check_pr_status]
3939
if: needs.check_pr_status.outputs.branch-pr == ''
40+
permissions:
41+
contents: write
42+
issues: write
43+
pull-requests: write
4044
uses: ./.github/workflows/benchmark.yml
4145

4246
unit-test:

0 commit comments

Comments
 (0)