Skip to content

Commit d272765

Browse files
Fix YAML indentation error in benchmark workflow
- Fix incorrect indentation of Store benchmark result step - YAML syntax is now correct
1 parent cb5ea2f commit d272765

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,26 @@ jobs:
6868
echo "=== GitHub Actions format ==="
6969
head -20 benchmark-results-gh.json
7070
71+
- name: Create gh-pages branch if needed
72+
run: |
73+
# Check if gh-pages branch exists
74+
if ! git ls-remote --exit-code --heads origin gh-pages > /dev/null 2>&1; then
75+
echo "Creating empty gh-pages branch..."
76+
git config user.name 'github-action-benchmark'
77+
git config user.email 'github@users.noreply.github.com'
78+
git checkout --orphan gh-pages
79+
git rm -rf .
80+
echo "# HSM Performance Benchmarks" > README.md
81+
echo "" >> README.md
82+
echo "Automated benchmark results generated by GitHub Actions." >> README.md
83+
git add README.md
84+
git commit -m "Initialize gh-pages branch for benchmarks"
85+
git push origin gh-pages
86+
git checkout main
87+
echo "✓ Created gh-pages branch"
88+
else
89+
echo "✓ gh-pages branch already exists"
90+
fi
7191
7292
- name: Store benchmark result
7393
uses: benchmark-action/github-action-benchmark@v1
@@ -77,11 +97,15 @@ jobs:
7797
output-file-path: benchmark-results-gh.json
7898
github-token: ${{ secrets.GITHUB_TOKEN }}
7999
auto-push: true
100+
gh-pages-branch: gh-pages
101+
benchmark-data-dir-path: dev/bench
80102
# Show alert with commit comment on detecting possible performance regression
81103
alert-threshold: '150%' # Alert if performance degrades by 50%
82104
comment-on-alert: true
83105
fail-on-alert: false
84106
alert-comment-cc-users: '@testingapisname'
107+
# Skip fetch when gh-pages doesn't exist yet
108+
skip-fetch-gh-pages: false
85109

86110
- name: Upload benchmark results as artifacts
87111
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)