serialbench 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/benchmark.yml +273 -220
  3. data/.github/workflows/rake.yml +26 -0
  4. data/.github/workflows/windows-debug.yml +171 -0
  5. data/.gitignore +32 -0
  6. data/.rubocop.yml +1 -0
  7. data/.rubocop_todo.yml +274 -0
  8. data/Gemfile +14 -1
  9. data/README.adoc +292 -1118
  10. data/Rakefile +0 -55
  11. data/config/benchmarks/full.yml +29 -0
  12. data/config/benchmarks/short.yml +26 -0
  13. data/config/environments/asdf-ruby-3.2.yml +8 -0
  14. data/config/environments/asdf-ruby-3.3.yml +8 -0
  15. data/config/environments/docker-ruby-3.0.yml +9 -0
  16. data/config/environments/docker-ruby-3.1.yml +9 -0
  17. data/config/environments/docker-ruby-3.2.yml +9 -0
  18. data/config/environments/docker-ruby-3.3.yml +9 -0
  19. data/config/environments/docker-ruby-3.4.yml +9 -0
  20. data/data/schemas/result.yml +29 -0
  21. data/docker/Dockerfile.alpine +33 -0
  22. data/docker/{Dockerfile.benchmark → Dockerfile.ubuntu} +4 -3
  23. data/docker/README.md +2 -2
  24. data/docs/PLATFORM_VALIDATION_FIX.md +79 -0
  25. data/docs/SYCK_YAML_FIX.md +91 -0
  26. data/docs/WEBSITE_COMPLETION_PLAN.md +440 -0
  27. data/docs/WINDOWS_LIBXML_FIX.md +136 -0
  28. data/docs/WINDOWS_SETUP.md +122 -0
  29. data/exe/serialbench +1 -1
  30. data/lib/serialbench/benchmark_runner.rb +261 -423
  31. data/lib/serialbench/cli/base_cli.rb +51 -0
  32. data/lib/serialbench/cli/benchmark_cli.rb +453 -0
  33. data/lib/serialbench/cli/environment_cli.rb +181 -0
  34. data/lib/serialbench/cli/resultset_cli.rb +261 -0
  35. data/lib/serialbench/cli/ruby_build_cli.rb +225 -0
  36. data/lib/serialbench/cli/validate_cli.rb +88 -0
  37. data/lib/serialbench/cli.rb +61 -600
  38. data/lib/serialbench/config_manager.rb +129 -0
  39. data/lib/serialbench/models/benchmark_config.rb +75 -0
  40. data/lib/serialbench/models/benchmark_result.rb +81 -0
  41. data/lib/serialbench/models/environment_config.rb +72 -0
  42. data/lib/serialbench/models/platform.rb +111 -0
  43. data/lib/serialbench/models/result.rb +80 -0
  44. data/lib/serialbench/models/result_set.rb +79 -0
  45. data/lib/serialbench/models/result_store.rb +108 -0
  46. data/lib/serialbench/models.rb +54 -0
  47. data/lib/serialbench/ruby_build_manager.rb +149 -0
  48. data/lib/serialbench/runners/asdf_runner.rb +296 -0
  49. data/lib/serialbench/runners/base.rb +32 -0
  50. data/lib/serialbench/runners/docker_runner.rb +140 -0
  51. data/lib/serialbench/runners/local_runner.rb +71 -0
  52. data/lib/serialbench/serializers/base_serializer.rb +9 -17
  53. data/lib/serialbench/serializers/json/base_json_serializer.rb +4 -4
  54. data/lib/serialbench/serializers/json/json_serializer.rb +0 -2
  55. data/lib/serialbench/serializers/json/oj_serializer.rb +0 -2
  56. data/lib/serialbench/serializers/json/rapidjson_serializer.rb +1 -1
  57. data/lib/serialbench/serializers/json/yajl_serializer.rb +0 -2
  58. data/lib/serialbench/serializers/toml/base_toml_serializer.rb +5 -5
  59. data/lib/serialbench/serializers/toml/toml_rb_serializer.rb +1 -3
  60. data/lib/serialbench/serializers/toml/tomlib_serializer.rb +1 -3
  61. data/lib/serialbench/serializers/toml/tomlrb_serializer.rb +56 -0
  62. data/lib/serialbench/serializers/xml/base_xml_serializer.rb +4 -9
  63. data/lib/serialbench/serializers/xml/libxml_serializer.rb +4 -10
  64. data/lib/serialbench/serializers/xml/nokogiri_serializer.rb +2 -4
  65. data/lib/serialbench/serializers/xml/oga_serializer.rb +4 -10
  66. data/lib/serialbench/serializers/xml/ox_serializer.rb +2 -4
  67. data/lib/serialbench/serializers/xml/rexml_serializer.rb +3 -5
  68. data/lib/serialbench/serializers/yaml/base_yaml_serializer.rb +5 -1
  69. data/lib/serialbench/serializers/yaml/psych_serializer.rb +1 -1
  70. data/lib/serialbench/serializers/yaml/syck_serializer.rb +60 -23
  71. data/lib/serialbench/serializers.rb +23 -6
  72. data/lib/serialbench/site_generator.rb +283 -0
  73. data/lib/serialbench/templates/assets/css/benchmark_report.css +535 -0
  74. data/lib/serialbench/templates/assets/css/format_based.css +474 -0
  75. data/lib/serialbench/templates/assets/css/themes.css +589 -0
  76. data/lib/serialbench/templates/assets/js/chart_helpers.js +411 -0
  77. data/lib/serialbench/templates/assets/js/dashboard.js +795 -0
  78. data/lib/serialbench/templates/assets/js/navigation.js +142 -0
  79. data/lib/serialbench/templates/base.liquid +49 -0
  80. data/lib/serialbench/templates/format_based.liquid +507 -0
  81. data/lib/serialbench/templates/partials/chart_section.liquid +4 -0
  82. data/lib/serialbench/version.rb +1 -1
  83. data/lib/serialbench/yaml_validator.rb +36 -0
  84. data/lib/serialbench.rb +2 -31
  85. data/serialbench.gemspec +15 -3
  86. metadata +106 -25
  87. data/.github/workflows/ci.yml +0 -74
  88. data/.github/workflows/docker.yml +0 -246
  89. data/config/ci.yml +0 -22
  90. data/config/full.yml +0 -30
  91. data/docker/run-benchmarks.sh +0 -356
  92. data/lib/serialbench/chart_generator.rb +0 -821
  93. data/lib/serialbench/result_formatter.rb +0 -182
  94. data/lib/serialbench/result_merger.rb +0 -1201
  95. data/lib/serialbench/serializers/xml/base_parser.rb +0 -69
  96. data/lib/serialbench/serializers/xml/libxml_parser.rb +0 -98
  97. data/lib/serialbench/serializers/xml/nokogiri_parser.rb +0 -111
  98. data/lib/serialbench/serializers/xml/oga_parser.rb +0 -85
  99. data/lib/serialbench/serializers/xml/ox_parser.rb +0 -64
  100. data/lib/serialbench/serializers/xml/rexml_parser.rb +0 -129
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 581c331152e89c99f638efa981ae50ae12d3a283317fe7e4e7613a2bb4910dd0
4
- data.tar.gz: e622c9f34c00629169508f5e92a4841bbf49cf802a736116d6a77752d82bd001
3
+ metadata.gz: c24dcb07a68058a2ff622be5f16e6c7225cd266bf29c3fcd06a0ecd597b9b8d3
4
+ data.tar.gz: 95833392ca0fe8cab20d7d0300cd86f11948a2e0d766885e6dff0de2b75189b1
5
5
  SHA512:
6
- metadata.gz: ec2cdc63a2917c724cccc1cda6c6a885822ccf62d8d129a17c64d49ec9b06952ad26eeda30edeb75f20b59b3373004c97cd647c186ed93334f028804b220383e
7
- data.tar.gz: 2c1243b837f25723bee4f971ceaff58e85e36264c114bc0a7d201769bda93c744a7a9169d957578128e30b700467b849b405a6609c397d4f0d9eafa0a782f1cd
6
+ metadata.gz: 8e1b7c78643b32cf34251220cd9dac61db43fa16cf104669b2882b139faad9bb1051a3a552d5caf37fc8018014c0dda6bcbe35870688e3ea229c64c5c8064d5e
7
+ data.tar.gz: d5c0727a5d5d24d82107837b996f8a31013bcf75a66a737ce6087767858c7b54b59ad9ed9014cf84d0ef3f4c07d5954bcfa3aa0698d3f745bb984477f18b880f
@@ -1,10 +1,13 @@
1
- name: benchmark
1
+ name: benchmark-weekly
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ main, master ]
5
+ branches: [main]
6
+ paths-ignore:
7
+ - '.github/workflows/windows-debug.yml'
6
8
  pull_request:
7
- branches: [ main, master ]
9
+ paths-ignore:
10
+ - '.github/workflows/windows-debug.yml'
8
11
  schedule:
9
12
  # Run benchmarks weekly on Sundays at 2 AM UTC
10
13
  - cron: '0 2 * * 0'
@@ -27,242 +30,292 @@ jobs:
27
30
  ruby-versions: ${{ steps.set-matrix.outputs.ruby-versions }}
28
31
  platforms: ${{ steps.set-matrix.outputs.platforms }}
29
32
  steps:
30
- - name: Set matrix configurations
31
- id: set-matrix
32
- run: |
33
- echo 'ruby-versions=["3.1", "3.2", "3.3", "3.4"]' >> $GITHUB_OUTPUT
34
- echo 'platforms=["ubuntu-latest", "macos-latest", "windows-latest"]' >> $GITHUB_OUTPUT
33
+ - name: Set matrix configurations
34
+ id: set-matrix
35
+ run: |
36
+ echo 'ruby-versions=["3.1", "3.2", "3.3", "3.4"]' >> $GITHUB_OUTPUT
37
+ echo 'platforms=["ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-13", "macos-15-intel", "macos-14", "macos-15", "macos-26", "windows-2022", "windows-2025", "windows-11-arm"]' >> $GITHUB_OUTPUT
35
38
 
36
39
  # Cross-platform native benchmarks
37
40
  benchmark:
38
41
  runs-on: ${{ matrix.platform }}
39
42
  needs: setup
40
43
  strategy:
44
+ fail-fast: false
41
45
  matrix:
42
46
  platform: ${{ fromJson(needs.setup.outputs.platforms) }}
43
47
  ruby-version: ${{ fromJson(needs.setup.outputs.ruby-versions) }}
44
- fail-fast: false
48
+ exclude:
49
+ # windows-11-arm only supports Ruby 3.4.x
50
+ - platform: windows-11-arm
51
+ ruby-version: "3.1"
52
+ - platform: windows-11-arm
53
+ ruby-version: "3.2"
54
+ - platform: windows-11-arm
55
+ ruby-version: "3.3"
45
56
 
46
57
  steps:
47
- - name: Checkout repository
48
- uses: actions/checkout@v4
49
-
50
- - name: Set up Ruby ${{ matrix.ruby-version }}
51
- uses: ruby/setup-ruby@v1
52
- with:
53
- ruby-version: ${{ matrix.ruby-version }}
54
- bundler-cache: true
55
-
56
- - name: Install system dependencies (Ubuntu)
57
- if: matrix.platform == 'ubuntu-latest'
58
- run: |
59
- sudo apt-get update
60
- sudo apt-get install -y libxml2-dev libxslt1-dev build-essential
61
-
62
- - name: Install system dependencies (macOS)
63
- if: matrix.platform == 'macos-latest'
64
- run: |
65
- brew install libxml2 libxslt
66
-
67
- - name: Install system dependencies (Windows)
68
- if: matrix.platform == 'windows-latest'
69
- run: |
70
- # Windows dependencies are typically handled by gem installations
71
- echo "Windows dependencies handled by gems"
72
-
73
- - name: Install gems
74
- run: |
75
- bundle install
76
-
77
- - name: List available serializers
78
- run: bundle exec serialbench list
79
-
80
- - name: Run comprehensive benchmarks
81
- run: |
82
- bundle exec serialbench benchmark \
83
- --formats xml json yaml toml \
84
- --iterations 5 \
85
- --warmup 2
86
-
87
- - name: Run tests to verify functionality
88
- run: bundle exec rspec --format documentation
89
-
90
- - name: Upload benchmark results
91
- uses: actions/upload-artifact@v4
92
- with:
93
- name: benchmark-results-${{ matrix.platform }}-ruby-${{ matrix.ruby-version }}
94
- path: results/
95
- retention-days: 30
96
-
97
- # Merge results and deploy to GitHub Pages
98
- merge-and-deploy:
99
- if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
100
- runs-on: ubuntu-latest
101
- needs: [setup, benchmark]
58
+ - name: Checkout repository
59
+ uses: actions/checkout@v4
60
+
61
+ - name: Detect Windows architecture
62
+ id: windows-arch
63
+ if: startsWith(matrix.platform, 'windows-')
64
+ run: |
65
+ if [[ "${{ matrix.platform }}" == *"-arm" ]]; then
66
+ echo "arch=arm64-windows" >> $GITHUB_OUTPUT
67
+ else
68
+ echo "arch=x64-windows" >> $GITHUB_OUTPUT
69
+ fi
70
+ shell: bash
71
+
72
+ - name: Install vcpkg dependencies (Windows)
73
+ if: startsWith(matrix.platform, 'windows-')
74
+ run: |
75
+ vcpkg install libxml2:${{ steps.windows-arch.outputs.arch }} 2>&1 || true
76
+ vcpkg integrate install 2>&1 || true
77
+ shell: bash
78
+
79
+ - name: Configure bundler for libxml2 (Windows)
80
+ if: startsWith(matrix.platform, 'windows-')
81
+ run: |
82
+ mkdir -p .bundle 2>&1 || true
83
+ echo "---" > .bundle/config 2>&1 || true
84
+ echo 'BUNDLE_BUILD__LIBXML___RUBY: "--with-xml2-dir=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }} --with-xml2-include=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/include/libxml2 --with-xml2-lib=C:/vcpkg/installed/${{ steps.windows-arch.outputs.arch }}/lib"' >> .bundle/config 2>&1 || true
85
+ shell: bash
86
+
87
+ - name: Set up Ruby ${{ matrix.ruby-version }}
88
+ uses: ruby/setup-ruby@v1
89
+ with:
90
+ ruby-version: ${{ matrix.ruby-version }}
91
+ bundler-cache: true
92
+
93
+ - name: Install system dependencies (Ubuntu)
94
+ if: startsWith(matrix.platform, 'ubuntu-')
95
+ run: |
96
+ sudo apt-get update
97
+ sudo apt-get install -y libxml2-dev libxslt1-dev build-essential
98
+
99
+ - name: Install system dependencies (macOS)
100
+ if: startsWith(matrix.platform, 'macos-')
101
+ run: |
102
+ brew install libxml2 libxslt
103
+
104
+ - name: Debug Ruby platform (Windows only)
105
+ if: startsWith(matrix.platform, 'windows-')
106
+ shell: ruby {0}
107
+ run: |
108
+ puts "=== Ruby Platform Debug Info ==="
109
+ puts "RUBY_PLATFORM: #{RUBY_PLATFORM}"
110
+ puts "Gem.win_platform?: #{Gem.win_platform?}"
111
+ puts "RbConfig::CONFIG['host_os']: #{RbConfig::CONFIG['host_os']}"
112
+ puts "RbConfig::CONFIG['host_cpu']: #{RbConfig::CONFIG['host_cpu']}"
113
+ puts "RbConfig::CONFIG['arch']: #{RbConfig::CONFIG['arch']}"
114
+ puts "================================"
115
+
116
+ - name: Install gems
117
+ run: bundle install
118
+
119
+ - name: Update Ruby-Build cache
120
+ run: bundle exec serialbench ruby-build update
121
+ env:
122
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123
+
124
+ - name: Create environment config
125
+ run: |
126
+ mkdir -p config/environments
127
+ cat > config/environments/ci-ruby-${{ matrix.ruby-version }}.yml << EOF
128
+ ---
129
+ name: ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}
130
+ kind: local
131
+ created_at: '$(date -u +"%Y-%m-%dT%H:%M:%SZ")'
132
+ ruby_build_tag: "${{ matrix.ruby-version }}"
133
+ description: CI environment for Ruby ${{ matrix.ruby-version }} on ${{ matrix.platform }}
134
+ EOF
135
+ shell: bash
136
+
137
+ - name: Run benchmarks
138
+ env:
139
+ GITHUB_RUNNER_PLATFORM: ${{ matrix.platform }}
140
+ run: |
141
+ bundle exec serialbench environment execute config/environments/ci-ruby-${{ matrix.ruby-version }}.yml config/benchmarks/short.yml results/runs/ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}
142
+
143
+ - name: Verify benchmark results before upload
144
+ run: |
145
+ echo "=== Verifying benchmark results ==="
146
+ RESULTS_FILE="results/runs/ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}/results.yaml"
147
+
148
+ echo "📁 Checking file exists..."
149
+ if [ ! -f "$RESULTS_FILE" ]; then
150
+ echo "❌ ERROR: results.yaml not found at $RESULTS_FILE"
151
+ exit 1
152
+ fi
102
153
 
103
- steps:
104
- - name: Checkout repository
105
- uses: actions/checkout@v4
106
-
107
- - name: Set up Ruby (for report generation)
108
- uses: ruby/setup-ruby@v1
109
- with:
110
- ruby-version: '3.3'
111
- bundler-cache: true
112
-
113
- - name: Install system dependencies
114
- run: |
115
- sudo apt-get update
116
- sudo apt-get install -y libxml2-dev libxslt1-dev build-essential
117
-
118
- - name: Install gems
119
- run: bundle install
120
-
121
- - name: Download all benchmark artifacts
122
- uses: actions/download-artifact@v4
123
- with:
124
- pattern: benchmark-results-*
125
- path: artifacts/
126
-
127
- - name: List downloaded artifacts
128
- run: |
129
- echo "Downloaded artifacts:"
130
- find artifacts/ -type f -name "*.json" -o -name "*.html" | head -20
131
-
132
- - name: Generate comprehensive GitHub Pages
133
- run: |
134
- mkdir -p docs
135
-
136
- # Find all result directories
137
- RESULT_DIRS=""
138
- for dir in artifacts/benchmark-results-*/; do
139
- if [ -d "$dir" ]; then
140
- RESULT_DIRS="$RESULT_DIRS $dir"
154
+ echo "📊 Checking file size..."
155
+ SIZE=$(wc -c < "$RESULTS_FILE" | tr -d ' ')
156
+ echo " File size: $SIZE bytes"
157
+
158
+ if [ "$SIZE" -lt 1000 ]; then
159
+ echo "❌ ERROR: results.yaml is suspiciously small ($SIZE bytes)"
160
+ echo " Expected at least 1000 bytes for valid benchmark results"
161
+ echo "=== File contents ==="
162
+ cat "$RESULTS_FILE"
163
+ exit 1
141
164
  fi
142
- done
143
-
144
- echo "Processing result directories: $RESULT_DIRS"
145
-
146
- # Generate GitHub Pages from all results
147
- if [ -n "$RESULT_DIRS" ]; then
148
- bundle exec serialbench github_pages $RESULT_DIRS docs/
149
- else
150
- echo "No result directories found, creating placeholder page"
151
- echo "<html><body><h1>No benchmark results available</h1></body></html>" > docs/index.html
152
- fi
153
-
154
- - name: Create platform comparison summary
155
- run: |
156
- # Create a summary of cross-platform results
157
- cat > docs/platform-summary.md << 'EOF'
158
- # Cross-Platform Benchmark Summary
159
-
160
- This page contains benchmark results from multiple platforms and Ruby versions:
161
-
162
- ## Platforms Tested
163
- - **Ubuntu Latest**: Linux x86_64 environment
164
- - **macOS Latest**: Apple Silicon and Intel Mac environment
165
- - **Windows Latest**: Windows Server environment
166
-
167
- ## Ruby Versions
168
- - Ruby 3.1, 3.2, 3.3, 3.4
169
-
170
- ## Serialization Libraries
171
- - **XML**: REXML, Ox, Nokogiri, Oga, LibXML
172
- - **JSON**: JSON, Oj, RapidJSON, YAJL
173
- - **YAML**: Psych, Syck
174
- - **TOML**: TOML-RB, Tomlib
175
-
176
- Results show performance variations across different operating systems and architectures.
177
- EOF
178
-
179
- - name: Setup Pages
180
- uses: actions/configure-pages@v4
181
-
182
- - name: Upload to GitHub Pages
183
- uses: actions/upload-pages-artifact@v3
184
- with:
185
- path: docs
186
-
187
- - name: Deploy to GitHub Pages
188
- id: deployment
189
- uses: actions/deploy-pages@v4
190
-
191
- # Performance comparison analysis
192
- performance-analysis:
193
- if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
165
+
166
+ echo "✅ File size OK: $SIZE bytes"
167
+ shell: bash
168
+
169
+ - name: Validate YAML schema
170
+ run: |
171
+ bundle exec serialbench validate result results/runs/ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}/results.yaml
172
+
173
+ - name: Upload benchmark results
174
+ uses: actions/upload-artifact@v4
175
+ with:
176
+ name: benchmark-results-${{ matrix.platform }}-ruby-${{ matrix.ruby-version }}
177
+ path: results/runs/ci-ruby-${{ matrix.ruby-version }}-${{ matrix.platform }}
178
+ retention-days: 30
179
+
180
+ # Aggregate results and deploy to GitHub Pages
181
+ deploy-pages:
182
+ if: github.ref == 'refs/heads/main'
194
183
  runs-on: ubuntu-latest
195
- needs: [benchmark]
184
+ needs: [setup, benchmark]
185
+ environment:
186
+ name: github-pages
187
+ url: ${{ steps.deployment.outputs.page_url }}
196
188
 
197
189
  steps:
198
- - name: Checkout repository
199
- uses: actions/checkout@v4
200
-
201
- - name: Download all benchmark results
202
- uses: actions/download-artifact@v4
203
- with:
204
- pattern: benchmark-results-*-ruby-*
205
- path: analysis/
206
-
207
- - name: Set up Ruby for analysis
208
- uses: ruby/setup-ruby@v1
209
- with:
210
- ruby-version: '3.3'
211
- bundler-cache: true
212
-
213
- - name: Install dependencies
214
- run: |
215
- sudo apt-get update
216
- sudo apt-get install -y libxml2-dev libxslt1-dev
217
- bundle install
218
-
219
- - name: Generate performance analysis
220
- run: |
221
- bundle exec serialbench analyze_performance analysis/benchmark-results-*/ performance_analysis.json
222
-
223
- - name: Generate platform comparison report
224
- run: |
225
- bundle exec serialbench platform_comparison performance_analysis.json platform_comparison.json
226
-
227
- - name: Upload performance analysis
228
- uses: actions/upload-artifact@v4
229
- with:
230
- name: performance-analysis
231
- path: |
232
- performance_analysis.json
233
- platform_comparison.json
234
- retention-days: 90
190
+ - name: Checkout repository
191
+ uses: actions/checkout@v4
192
+
193
+ - name: Set up Ruby
194
+ uses: ruby/setup-ruby@v1
195
+ with:
196
+ ruby-version: '3.3'
197
+ bundler-cache: true
198
+
199
+ - name: Install system dependencies
200
+ run: |
201
+ sudo apt-get update
202
+ sudo apt-get install -y libxml2-dev libxslt1-dev build-essential
203
+
204
+ - name: Install gems
205
+ run: bundle install
206
+
207
+ - name: Download all benchmark artifacts
208
+ uses: actions/download-artifact@v4
209
+ with:
210
+ pattern: benchmark-results-*
211
+ path: artifacts/
212
+
213
+ - name: List downloaded artifacts structure
214
+ run: |
215
+ echo "=== Artifacts directory structure ==="
216
+ ls -la artifacts/
217
+ echo ""
218
+ echo "=== Searching for results.yaml files ==="
219
+ find artifacts/ -name "results.yaml" -type f
220
+ echo ""
221
+ echo "=== Directory tree (first 3 levels) ==="
222
+ find artifacts/ -maxdepth 3 -type d | sort
223
+
224
+ - name: Create resultset
225
+ run: |
226
+ mkdir -p results/sets
227
+ bundle exec serialbench resultset create weekly-benchmark results/sets/weekly-benchmark
228
+
229
+ - name: Add all results to resultset
230
+ run: |
231
+ bundle exec serialbench resultset add-result results/sets/weekly-benchmark artifacts/benchmark-results-*/
232
+
233
+ - name: Generate GitHub Pages site
234
+ run: |
235
+ bundle exec serialbench resultset build-site results/sets/weekly-benchmark _site
236
+
237
+ - name: Create summary page
238
+ run: |
239
+ mkdir -p _site
240
+ cat > _site/README.md << 'EOF'
241
+ # Serialbench - Weekly Benchmark Results
242
+
243
+ This site contains automated benchmark results for Ruby serialization libraries.
244
+
245
+ ## Benchmarked Libraries
246
+
247
+ - **XML**: REXML, Ox, Nokogiri, Oga, LibXML
248
+ - **JSON**: JSON, Oj, RapidJSON, YAJL
249
+ - **YAML**: Psych
250
+ - **TOML**: TOML-RB, Tomlib, tomlrb
251
+
252
+ ## Platforms Tested
253
+
254
+ - Ubuntu Latest (Linux x86_64)
255
+ - Ubuntu 24.04 (Linux ARM64)
256
+ - Ubuntu 22.04 (Linux ARM64)
257
+ - macOS 13 (Intel x86_64)
258
+ - macOS 15 Intel (Intel x86_64)
259
+ - macOS 14 (Apple Silicon ARM64)
260
+ - macOS 15 (Apple Silicon ARM64)
261
+
262
+ ## Ruby Versions
263
+
264
+ - Ruby 3.1, 3.2, 3.3, 3.4
265
+
266
+ ## View Results
267
+
268
+ Open [index.html](./index.html) to view the interactive dashboard.
269
+
270
+ ---
271
+
272
+ *Last updated: $(date -u +"%Y-%m-%d %H:%M:%S UTC")*
273
+ EOF
274
+
275
+ - name: Setup Pages
276
+ uses: actions/configure-pages@v4
277
+
278
+ - name: Upload to GitHub Pages
279
+ uses: actions/upload-pages-artifact@v3
280
+ with:
281
+ path: _site
282
+
283
+ - name: Deploy to GitHub Pages
284
+ id: deployment
285
+ uses: actions/deploy-pages@v4
235
286
 
236
287
  # Summary job
237
288
  summary:
238
289
  runs-on: ubuntu-latest
239
- needs: [setup, benchmark, merge-and-deploy, performance-analysis]
290
+ needs: [setup, benchmark, deploy-pages]
240
291
  if: always()
241
292
  steps:
242
- - name: Generate workflow summary
243
- run: |
244
- echo "## Cross-Platform Benchmark Summary" >> $GITHUB_STEP_SUMMARY
245
- echo "" >> $GITHUB_STEP_SUMMARY
246
- echo "**Benchmark Status**: ${{ needs.benchmark.result }}" >> $GITHUB_STEP_SUMMARY
247
- echo "**Deploy Status**: ${{ needs.merge-and-deploy.result }}" >> $GITHUB_STEP_SUMMARY
248
- echo "**Analysis Status**: ${{ needs.performance-analysis.result }}" >> $GITHUB_STEP_SUMMARY
249
- echo "" >> $GITHUB_STEP_SUMMARY
250
- echo "### Platforms Tested" >> $GITHUB_STEP_SUMMARY
251
- echo "- Ubuntu Latest (Linux x86_64)" >> $GITHUB_STEP_SUMMARY
252
- echo "- macOS Latest (Apple Silicon/Intel)" >> $GITHUB_STEP_SUMMARY
253
- echo "- Windows Latest (Windows Server)" >> $GITHUB_STEP_SUMMARY
254
- echo "" >> $GITHUB_STEP_SUMMARY
255
- echo "### Ruby Versions" >> $GITHUB_STEP_SUMMARY
256
- echo "- Ruby 3.1, 3.2, 3.3, 3.4" >> $GITHUB_STEP_SUMMARY
257
- echo "" >> $GITHUB_STEP_SUMMARY
258
- echo "### Serialization Libraries" >> $GITHUB_STEP_SUMMARY
259
- echo "- **XML**: REXML, Ox, Nokogiri, Oga, LibXML" >> $GITHUB_STEP_SUMMARY
260
- echo "- **JSON**: JSON, Oj, RapidJSON, YAJL" >> $GITHUB_STEP_SUMMARY
261
- echo "- **YAML**: Psych, Syck" >> $GITHUB_STEP_SUMMARY
262
- echo "- **TOML**: TOML-RB, Tomlib" >> $GITHUB_STEP_SUMMARY
263
- echo "" >> $GITHUB_STEP_SUMMARY
264
- if [ "${{ github.ref }}" == "refs/heads/main" ] || [ "${{ github.ref }}" == "refs/heads/master" ]; then
265
- echo "### Results" >> $GITHUB_STEP_SUMMARY
266
- echo "📊 [View Interactive Results](https://metanorma.github.io/serialbench/)" >> $GITHUB_STEP_SUMMARY
267
- echo "📈 Performance analysis and platform comparison available in artifacts" >> $GITHUB_STEP_SUMMARY
268
- fi
293
+ - name: Generate workflow summary
294
+ run: |
295
+ echo "## Weekly Benchmark Summary" >> $GITHUB_STEP_SUMMARY
296
+ echo "" >> $GITHUB_STEP_SUMMARY
297
+ echo "**Benchmark Status**: ${{ needs.benchmark.result }}" >> $GITHUB_STEP_SUMMARY
298
+ echo "**Deploy Status**: ${{ needs.deploy-pages.result }}" >> $GITHUB_STEP_SUMMARY
299
+ echo "" >> $GITHUB_STEP_SUMMARY
300
+ echo "### Platforms Tested" >> $GITHUB_STEP_SUMMARY
301
+ echo "- Ubuntu Latest (Linux x86_64)" >> $GITHUB_STEP_SUMMARY
302
+ echo "- Ubuntu 24.04 (Linux ARM64)" >> $GITHUB_STEP_SUMMARY
303
+ echo "- Ubuntu 22.04 (Linux ARM64)" >> $GITHUB_STEP_SUMMARY
304
+ echo "- macOS 13 (Intel x86_64)" >> $GITHUB_STEP_SUMMARY
305
+ echo "- macOS 15 Intel (Intel x86_64)" >> $GITHUB_STEP_SUMMARY
306
+ echo "- macOS 14 (Apple Silicon ARM64)" >> $GITHUB_STEP_SUMMARY
307
+ echo "- macOS 15 (Apple Silicon ARM64)" >> $GITHUB_STEP_SUMMARY
308
+ echo "" >> $GITHUB_STEP_SUMMARY
309
+ echo "### Ruby Versions" >> $GITHUB_STEP_SUMMARY
310
+ echo "- Ruby 3.1, 3.2, 3.3, 3.4" >> $GITHUB_STEP_SUMMARY
311
+ echo "" >> $GITHUB_STEP_SUMMARY
312
+ echo "### Serialization Libraries" >> $GITHUB_STEP_SUMMARY
313
+ echo "- **XML**: REXML, Ox, Nokogiri, Oga, LibXML" >> $GITHUB_STEP_SUMMARY
314
+ echo "- **JSON**: JSON, Oj, RapidJSON, YAJL" >> $GITHUB_STEP_SUMMARY
315
+ echo "- **YAML**: Psych" >> $GITHUB_STEP_SUMMARY
316
+ echo "- **TOML**: TOML-RB, Tomlib, tomlrb" >> $GITHUB_STEP_SUMMARY
317
+ echo "" >> $GITHUB_STEP_SUMMARY
318
+ if [ "${{ github.ref }}" == "refs/heads/main" ]; then
319
+ echo "### Results" >> $GITHUB_STEP_SUMMARY
320
+ echo "📊 [View Interactive Dashboard](https://metanorma.github.io/serialbench/)" >> $GITHUB_STEP_SUMMARY
321
+ fi
@@ -0,0 +1,26 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
9
+ paths-ignore:
10
+ - '.github/workflows/windows-debug.yml'
11
+ pull_request:
12
+ paths-ignore:
13
+ - '.github/workflows/windows-debug.yml'
14
+
15
+ jobs:
16
+ rake:
17
+ uses: metanorma/ci/.github/workflows/generic-rake.yml@main
18
+ with:
19
+ before-setup-ruby: |
20
+ vcpkg install libxml2:x64-windows 2>&1 || true
21
+ vcpkg integrate install 2>&1 || true
22
+ mkdir -p .bundle 2>&1 || true
23
+ echo "---" > .bundle/config 2>&1 || true
24
+ echo 'BUNDLE_BUILD__LIBXML___RUBY: "--with-xml2-dir=C:/vcpkg/installed/x64-windows --with-xml2-include=C:/vcpkg/installed/x64-windows/include/libxml2 --with-xml2-lib=C:/vcpkg/installed/x64-windows/lib"' >> .bundle/config 2>&1 || true
25
+ secrets:
26
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}