serialbench 0.1.2 → 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.
- checksums.yaml +4 -4
- data/.github/workflows/benchmark.yml +273 -228
- data/.github/workflows/rake.yml +11 -0
- data/.github/workflows/windows-debug.yml +171 -0
- data/.gitignore +32 -0
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +274 -0
- data/Gemfile +13 -1
- data/README.adoc +36 -0
- data/data/schemas/result.yml +29 -0
- data/docs/PLATFORM_VALIDATION_FIX.md +79 -0
- data/docs/SYCK_YAML_FIX.md +91 -0
- data/docs/WEBSITE_COMPLETION_PLAN.md +440 -0
- data/docs/WINDOWS_LIBXML_FIX.md +136 -0
- data/docs/WINDOWS_SETUP.md +122 -0
- data/lib/serialbench/benchmark_runner.rb +3 -3
- data/lib/serialbench/cli/benchmark_cli.rb +74 -1
- data/lib/serialbench/cli/environment_cli.rb +3 -3
- data/lib/serialbench/cli/resultset_cli.rb +72 -26
- data/lib/serialbench/cli/ruby_build_cli.rb +75 -88
- data/lib/serialbench/cli/validate_cli.rb +88 -0
- data/lib/serialbench/cli.rb +6 -2
- data/lib/serialbench/config_manager.rb +15 -26
- data/lib/serialbench/models/benchmark_config.rb +12 -0
- data/lib/serialbench/models/benchmark_result.rb +39 -3
- data/lib/serialbench/models/environment_config.rb +3 -2
- data/lib/serialbench/models/platform.rb +56 -4
- data/lib/serialbench/models/result.rb +28 -1
- data/lib/serialbench/models/result_set.rb +8 -0
- data/lib/serialbench/ruby_build_manager.rb +19 -23
- data/lib/serialbench/runners/asdf_runner.rb +1 -1
- data/lib/serialbench/runners/docker_runner.rb +2 -4
- data/lib/serialbench/runners/local_runner.rb +71 -0
- data/lib/serialbench/serializers/base_serializer.rb +1 -1
- data/lib/serialbench/serializers/json/rapidjson_serializer.rb +1 -1
- data/lib/serialbench/serializers/toml/base_toml_serializer.rb +0 -2
- data/lib/serialbench/serializers/toml/toml_rb_serializer.rb +1 -1
- data/lib/serialbench/serializers/toml/tomlib_serializer.rb +1 -1
- data/lib/serialbench/serializers/xml/libxml_serializer.rb +4 -8
- data/lib/serialbench/serializers/xml/nokogiri_serializer.rb +2 -2
- data/lib/serialbench/serializers/xml/oga_serializer.rb +4 -8
- data/lib/serialbench/serializers/xml/ox_serializer.rb +2 -2
- data/lib/serialbench/serializers/xml/rexml_serializer.rb +3 -3
- data/lib/serialbench/serializers/yaml/psych_serializer.rb +1 -1
- data/lib/serialbench/serializers/yaml/syck_serializer.rb +1 -1
- data/lib/serialbench/serializers.rb +2 -2
- data/lib/serialbench/site_generator.rb +180 -2
- data/lib/serialbench/templates/assets/css/format_based.css +1 -53
- data/lib/serialbench/templates/assets/css/themes.css +5 -4
- data/lib/serialbench/templates/assets/js/chart_helpers.js +44 -14
- data/lib/serialbench/templates/assets/js/dashboard.js +14 -15
- data/lib/serialbench/templates/format_based.liquid +480 -252
- data/lib/serialbench/version.rb +1 -1
- data/lib/serialbench/yaml_validator.rb +36 -0
- data/serialbench.gemspec +11 -2
- metadata +34 -23
- data/.github/workflows/ci.yml +0 -74
- data/.github/workflows/docker.yml +0 -272
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c24dcb07a68058a2ff622be5f16e6c7225cd266bf29c3fcd06a0ecd597b9b8d3
|
|
4
|
+
data.tar.gz: 95833392ca0fe8cab20d7d0300cd86f11948a2e0d766885e6dff0de2b75189b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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: [
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- '.github/workflows/windows-debug.yml'
|
|
6
8
|
pull_request:
|
|
7
|
-
|
|
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,250 +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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
|
110
153
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- name: Install system dependencies
|
|
122
|
-
run: |
|
|
123
|
-
sudo apt-get update
|
|
124
|
-
sudo apt-get install -y libxml2-dev libxslt1-dev build-essential
|
|
125
|
-
|
|
126
|
-
- name: Install gems
|
|
127
|
-
run: bundle install
|
|
128
|
-
|
|
129
|
-
- name: Download all benchmark artifacts
|
|
130
|
-
uses: actions/download-artifact@v4
|
|
131
|
-
with:
|
|
132
|
-
pattern: benchmark-results-*
|
|
133
|
-
path: artifacts/
|
|
134
|
-
|
|
135
|
-
- name: List downloaded artifacts
|
|
136
|
-
run: |
|
|
137
|
-
echo "Downloaded artifacts:"
|
|
138
|
-
find artifacts/ -type f -name "*.json" -o -name "*.html" | head -20
|
|
139
|
-
|
|
140
|
-
- name: Generate comprehensive GitHub Pages
|
|
141
|
-
run: |
|
|
142
|
-
mkdir -p docs
|
|
143
|
-
|
|
144
|
-
# Find all result directories
|
|
145
|
-
RESULT_DIRS=""
|
|
146
|
-
for dir in artifacts/benchmark-results-*/; do
|
|
147
|
-
if [ -d "$dir" ]; then
|
|
148
|
-
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
|
|
149
164
|
fi
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
bundle exec serialbench
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
This page contains benchmark results from multiple platforms and Ruby versions:
|
|
169
|
-
|
|
170
|
-
## Platforms Tested
|
|
171
|
-
- **Ubuntu Latest**: Linux x86_64 environment
|
|
172
|
-
- **macOS Latest**: Apple Silicon and Intel Mac environment
|
|
173
|
-
- **Windows Latest**: Windows Server environment
|
|
174
|
-
|
|
175
|
-
## Ruby Versions
|
|
176
|
-
- Ruby 3.1, 3.2, 3.3, 3.4
|
|
177
|
-
|
|
178
|
-
## Serialization Libraries
|
|
179
|
-
- **XML**: REXML, Ox, Nokogiri, Oga, LibXML
|
|
180
|
-
- **JSON**: JSON, Oj, RapidJSON, YAJL
|
|
181
|
-
- **YAML**: Psych, Syck
|
|
182
|
-
- **TOML**: TOML-RB, Tomlib
|
|
183
|
-
|
|
184
|
-
Results show performance variations across different operating systems and architectures.
|
|
185
|
-
EOF
|
|
186
|
-
|
|
187
|
-
- name: Setup Pages
|
|
188
|
-
uses: actions/configure-pages@v4
|
|
189
|
-
|
|
190
|
-
- name: Upload to GitHub Pages
|
|
191
|
-
uses: actions/upload-pages-artifact@v3
|
|
192
|
-
with:
|
|
193
|
-
path: docs
|
|
194
|
-
|
|
195
|
-
- name: Deploy to GitHub Pages
|
|
196
|
-
id: deployment
|
|
197
|
-
uses: actions/deploy-pages@v4
|
|
198
|
-
|
|
199
|
-
# Performance comparison analysis
|
|
200
|
-
performance-analysis:
|
|
201
|
-
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'
|
|
202
183
|
runs-on: ubuntu-latest
|
|
203
|
-
needs: [benchmark]
|
|
184
|
+
needs: [setup, benchmark]
|
|
185
|
+
environment:
|
|
186
|
+
name: github-pages
|
|
187
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
204
188
|
|
|
205
189
|
steps:
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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
|
|
243
286
|
|
|
244
287
|
# Summary job
|
|
245
288
|
summary:
|
|
246
289
|
runs-on: ubuntu-latest
|
|
247
|
-
needs: [setup, benchmark,
|
|
290
|
+
needs: [setup, benchmark, deploy-pages]
|
|
248
291
|
if: always()
|
|
249
292
|
steps:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
echo "
|
|
274
|
-
echo "
|
|
275
|
-
|
|
276
|
-
|
|
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
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -6,10 +6,21 @@ on:
|
|
|
6
6
|
push:
|
|
7
7
|
branches: [ master, main ]
|
|
8
8
|
tags: [ v* ]
|
|
9
|
+
paths-ignore:
|
|
10
|
+
- '.github/workflows/windows-debug.yml'
|
|
9
11
|
pull_request:
|
|
12
|
+
paths-ignore:
|
|
13
|
+
- '.github/workflows/windows-debug.yml'
|
|
10
14
|
|
|
11
15
|
jobs:
|
|
12
16
|
rake:
|
|
13
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
|
|
14
25
|
secrets:
|
|
15
26
|
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|