3333 run : bundle install
3434 - name : Run benchmarks
3535 run : bundle exec rake
36- - name : Generate Markdown page for all versions
37- run : bundle exec rake generate_versions_html
36+ - name : Generate HTML files for each benchmark
37+ run : |
38+ for v in $(ls reports); do
39+ mkdir -p html_reports/$v
40+ for f in $(ls reports/$v/*.txt); do
41+ ruby scripts/generate_benchmarks_html.rb "$f" "html_reports/$v/$(basename $f .txt).html"
42+ done
43+ done
44+ - name : Upload HTML reports as artifacts
45+ uses : actions/upload-artifact@v4
46+ with :
47+ name : html-reports
48+ path : html_reports/**/*
3849
3950 publish :
4051 needs : rake
4354 - uses : actions/checkout@v3
4455 with :
4556 fetch-depth : 0
46- - name : Copy generated Markdown page
57+ - name : Download HTML reports
58+ uses : actions/download-artifact@v4
59+ with :
60+ name : html-reports
61+ path : all_html_reports
62+ - name : Merge all HTML files into one
4763 run : |
48- cp all_versions_benchmarks.html ./
64+ ruby scripts/merge_html_reports.rb all_html_reports merged_benchmarks.html
4965 touch .nojekyll
5066 - name : Prepare gh-pages branch
5167 run : |
@@ -54,10 +70,10 @@ jobs:
5470 git fetch origin gh-pages || git checkout --orphan gh-pages
5571 git checkout gh-pages || git checkout --orphan gh-pages
5672 rm -rf *
57- cp all_versions_benchmarks .html ./
73+ cp merged_benchmarks .html ./
5874 touch .nojekyll
59- - name : Commit and push Markdown page
75+ - name : Commit and push merged HTML page
6076 run : |
6177 git add .
62- git commit -m "Update all versions benchmark HTML [ci skip]" || echo "No changes to commit"
78+ git commit -m "Update merged benchmark HTML [ci skip]" || echo "No changes to commit"
6379 git push origin gh-pages
0 commit comments