Skip to content

Commit c45b206

Browse files
committed
fix: fetch gh-pages branch in ci.yml jobs
Add 'git fetch origin gh-pages:gh-pages' step between npm run build and Run benchmark for all jobs that set skip-fetch-gh-pages: true, ensuring the local branch exists before the action tries to use it.
1 parent c48b72c commit c45b206

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
dotnet-version: '6.0.101' # SDK Version to use. keep in line with examples/benchmarkdotnet/global.json
2323
- run: npm ci
2424
- run: npm run build
25+
- name: Fetch gh-pages branch
26+
run: git fetch origin gh-pages:gh-pages
2527
- name: Run benchmark
2628
run: cd examples/benchmarkdotnet && dotnet run --exporters json --filter '*'
2729
- name: Store benchmark result
@@ -48,6 +50,8 @@ jobs:
4850
cache: 'npm'
4951
- run: npm ci
5052
- run: npm run build
53+
- name: Fetch gh-pages branch
54+
run: git fetch origin gh-pages:gh-pages
5155
- name: Run benchmark
5256
run: cd examples/benchmarkjs && npm install && node bench.js | tee output.txt
5357
- name: Store benchmark result
@@ -74,6 +78,8 @@ jobs:
7478
cache: 'npm'
7579
- run: npm ci
7680
- run: npm run build
81+
- name: Fetch gh-pages branch
82+
run: git fetch origin gh-pages:gh-pages
7783
- name: Run benchmark
7884
run: |
7985
cd examples/catch2_v2
@@ -105,6 +111,8 @@ jobs:
105111
cache: 'npm'
106112
- run: npm ci
107113
- run: npm run build
114+
- name: Fetch gh-pages branch
115+
run: git fetch origin gh-pages:gh-pages
108116
- name: Run benchmark
109117
run: |
110118
cd examples/catch2
@@ -136,6 +144,8 @@ jobs:
136144
cache: 'npm'
137145
- run: npm ci
138146
- run: npm run build
147+
- name: Fetch gh-pages branch
148+
run: git fetch origin gh-pages:gh-pages
139149
- name: Cache Benchmark library
140150
uses: actions/cache@v4
141151
with:
@@ -172,6 +182,8 @@ jobs:
172182
go-version: "stable"
173183
- run: npm ci
174184
- run: npm run build
185+
- name: Fetch gh-pages branch
186+
run: git fetch origin gh-pages:gh-pages
175187
- name: Run benchmark
176188
run: cd examples/go && go test -bench 'BenchmarkFib' | tee output.txt
177189
- name: Store benchmark result
@@ -202,6 +214,8 @@ jobs:
202214
java-version: '11'
203215
- run: npm ci
204216
- run: npm run build
217+
- name: Fetch gh-pages branch
218+
run: git fetch origin gh-pages:gh-pages
205219
- name: Run benchmark
206220
run: |
207221
cd examples/java
@@ -231,6 +245,8 @@ jobs:
231245
cache: 'npm'
232246
- run: npm ci
233247
- run: npm run build
248+
- name: Fetch gh-pages branch
249+
run: git fetch origin gh-pages:gh-pages
234250
- uses: julia-actions/setup-julia@v1
235251
with:
236252
version: '1'
@@ -269,6 +285,8 @@ jobs:
269285
python-version: 3.9
270286
- run: npm ci
271287
- run: npm run build
288+
- name: Fetch gh-pages branch
289+
run: git fetch origin gh-pages:gh-pages
272290
- name: Run benchmark
273291
run: |
274292
cd examples/pytest

0 commit comments

Comments
 (0)