expressir 1.3.3-aarch64-linux-musl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +7 -0
  2. data/.cross_rubies +28 -0
  3. data/.github/workflows/codeql.yml +47 -0
  4. data/.github/workflows/rake.yml +448 -0
  5. data/.github/workflows/release.yml +189 -0
  6. data/.github/workflows/stress.yml +53 -0
  7. data/.gitignore +23 -0
  8. data/.gitmodules +6 -0
  9. data/.hound.yml +3 -0
  10. data/.rspec +2 -0
  11. data/.rubocop.yml +18 -0
  12. data/.yardopts +11 -0
  13. data/Gemfile +4 -0
  14. data/README.adoc +155 -0
  15. data/Rakefile +17 -0
  16. data/bin/console +11 -0
  17. data/bin/rspec +29 -0
  18. data/bin/setup +8 -0
  19. data/docs/development.md +90 -0
  20. data/exe/expressir +22 -0
  21. data/exe/format +18 -0
  22. data/exe/format-test +81 -0
  23. data/exe/generate-parser +51 -0
  24. data/expressir.gemspec +48 -0
  25. data/lib/expressir/cli/ui.rb +36 -0
  26. data/lib/expressir/cli.rb +21 -0
  27. data/lib/expressir/config.rb +23 -0
  28. data/lib/expressir/express/2.7/express_parser.so +0 -0
  29. data/lib/expressir/express/3.0/express_parser.so +0 -0
  30. data/lib/expressir/express/3.1/express_parser.so +0 -0
  31. data/lib/expressir/express/3.2/express_parser.so +0 -0
  32. data/lib/expressir/express/cache.rb +51 -0
  33. data/lib/expressir/express/formatter.rb +1608 -0
  34. data/lib/expressir/express/hyperlink_formatter.rb +36 -0
  35. data/lib/expressir/express/model_visitor.rb +24 -0
  36. data/lib/expressir/express/parser.rb +83 -0
  37. data/lib/expressir/express/resolve_references_model_visitor.rb +31 -0
  38. data/lib/expressir/express/schema_head_formatter.rb +23 -0
  39. data/lib/expressir/express/visitor.rb +2591 -0
  40. data/lib/expressir/model/cache.rb +17 -0
  41. data/lib/expressir/model/data_type.rb +9 -0
  42. data/lib/expressir/model/data_types/aggregate.rb +31 -0
  43. data/lib/expressir/model/data_types/array.rb +31 -0
  44. data/lib/expressir/model/data_types/bag.rb +25 -0
  45. data/lib/expressir/model/data_types/binary.rb +22 -0
  46. data/lib/expressir/model/data_types/boolean.rb +10 -0
  47. data/lib/expressir/model/data_types/enumeration.rb +25 -0
  48. data/lib/expressir/model/data_types/enumeration_item.rb +26 -0
  49. data/lib/expressir/model/data_types/generic.rb +26 -0
  50. data/lib/expressir/model/data_types/generic_entity.rb +26 -0
  51. data/lib/expressir/model/data_types/integer.rb +10 -0
  52. data/lib/expressir/model/data_types/list.rb +28 -0
  53. data/lib/expressir/model/data_types/logical.rb +10 -0
  54. data/lib/expressir/model/data_types/number.rb +10 -0
  55. data/lib/expressir/model/data_types/real.rb +19 -0
  56. data/lib/expressir/model/data_types/select.rb +28 -0
  57. data/lib/expressir/model/data_types/set.rb +25 -0
  58. data/lib/expressir/model/data_types/string.rb +22 -0
  59. data/lib/expressir/model/declaration.rb +9 -0
  60. data/lib/expressir/model/declarations/attribute.rb +47 -0
  61. data/lib/expressir/model/declarations/constant.rb +34 -0
  62. data/lib/expressir/model/declarations/entity.rb +53 -0
  63. data/lib/expressir/model/declarations/function.rb +67 -0
  64. data/lib/expressir/model/declarations/interface.rb +28 -0
  65. data/lib/expressir/model/declarations/interface_item.rb +23 -0
  66. data/lib/expressir/model/declarations/interfaced_item.rb +37 -0
  67. data/lib/expressir/model/declarations/parameter.rb +34 -0
  68. data/lib/expressir/model/declarations/procedure.rb +64 -0
  69. data/lib/expressir/model/declarations/remark_item.rb +21 -0
  70. data/lib/expressir/model/declarations/rule.rb +71 -0
  71. data/lib/expressir/model/declarations/schema.rb +117 -0
  72. data/lib/expressir/model/declarations/schema_version.rb +22 -0
  73. data/lib/expressir/model/declarations/schema_version_item.rb +22 -0
  74. data/lib/expressir/model/declarations/subtype_constraint.rb +40 -0
  75. data/lib/expressir/model/declarations/type.rb +45 -0
  76. data/lib/expressir/model/declarations/unique_rule.rb +31 -0
  77. data/lib/expressir/model/declarations/variable.rb +34 -0
  78. data/lib/expressir/model/declarations/where_rule.rb +31 -0
  79. data/lib/expressir/model/expression.rb +9 -0
  80. data/lib/expressir/model/expressions/aggregate_initializer.rb +19 -0
  81. data/lib/expressir/model/expressions/aggregate_initializer_item.rb +22 -0
  82. data/lib/expressir/model/expressions/binary_expression.rb +53 -0
  83. data/lib/expressir/model/expressions/entity_constructor.rb +22 -0
  84. data/lib/expressir/model/expressions/function_call.rb +22 -0
  85. data/lib/expressir/model/expressions/interval.rb +34 -0
  86. data/lib/expressir/model/expressions/query_expression.rb +35 -0
  87. data/lib/expressir/model/expressions/unary_expression.rb +27 -0
  88. data/lib/expressir/model/identifier.rb +34 -0
  89. data/lib/expressir/model/literal.rb +9 -0
  90. data/lib/expressir/model/literals/binary.rb +19 -0
  91. data/lib/expressir/model/literals/integer.rb +19 -0
  92. data/lib/expressir/model/literals/logical.rb +23 -0
  93. data/lib/expressir/model/literals/real.rb +19 -0
  94. data/lib/expressir/model/literals/string.rb +22 -0
  95. data/lib/expressir/model/model_element.rb +208 -0
  96. data/lib/expressir/model/reference.rb +9 -0
  97. data/lib/expressir/model/references/attribute_reference.rb +22 -0
  98. data/lib/expressir/model/references/group_reference.rb +22 -0
  99. data/lib/expressir/model/references/index_reference.rb +27 -0
  100. data/lib/expressir/model/references/simple_reference.rb +24 -0
  101. data/lib/expressir/model/repository.rb +23 -0
  102. data/lib/expressir/model/statement.rb +9 -0
  103. data/lib/expressir/model/statements/alias.rb +35 -0
  104. data/lib/expressir/model/statements/assignment.rb +22 -0
  105. data/lib/expressir/model/statements/case.rb +25 -0
  106. data/lib/expressir/model/statements/case_action.rb +22 -0
  107. data/lib/expressir/model/statements/compound.rb +19 -0
  108. data/lib/expressir/model/statements/escape.rb +10 -0
  109. data/lib/expressir/model/statements/if.rb +25 -0
  110. data/lib/expressir/model/statements/null.rb +10 -0
  111. data/lib/expressir/model/statements/procedure_call.rb +22 -0
  112. data/lib/expressir/model/statements/repeat.rb +47 -0
  113. data/lib/expressir/model/statements/return.rb +19 -0
  114. data/lib/expressir/model/statements/skip.rb +10 -0
  115. data/lib/expressir/model/supertype_expression.rb +9 -0
  116. data/lib/expressir/model/supertype_expressions/binary_supertype_expression.rb +29 -0
  117. data/lib/expressir/model/supertype_expressions/oneof_supertype_expression.rb +19 -0
  118. data/lib/expressir/model.rb +79 -0
  119. data/lib/expressir/version.rb +3 -0
  120. data/lib/expressir.rb +44 -0
  121. data/rakelib/antlr4-native.rake +173 -0
  122. data/rakelib/cross-ruby.rake +403 -0
  123. data/spec/acceptance/version_spec.rb +30 -0
  124. data/spec/expressir/express/cache_spec.rb +89 -0
  125. data/spec/expressir/express/formatter_spec.rb +171 -0
  126. data/spec/expressir/express/parser_spec.rb +141 -0
  127. data/spec/expressir/model/model_element_spec.rb +318 -0
  128. data/spec/spec_helper.rb +24 -0
  129. data/spec/support/console_helper.rb +29 -0
  130. data/spec/syntax/multiple.exp +23 -0
  131. data/spec/syntax/multiple.yaml +198 -0
  132. data/spec/syntax/multiple_formatted.exp +71 -0
  133. data/spec/syntax/multiple_hyperlink_formatted.exp +71 -0
  134. data/spec/syntax/multiple_schema_head_hyperlink_formatted.exp +13 -0
  135. data/spec/syntax/remark.exp +193 -0
  136. data/spec/syntax/remark.yaml +471 -0
  137. data/spec/syntax/remark_formatted.exp +228 -0
  138. data/spec/syntax/single.exp +4 -0
  139. data/spec/syntax/single.yaml +18 -0
  140. data/spec/syntax/single_formatted.exp +10 -0
  141. data/spec/syntax/single_formatted.yaml +36 -0
  142. data/spec/syntax/syntax.exp +333 -0
  143. data/spec/syntax/syntax.yaml +3509 -0
  144. data/spec/syntax/syntax_formatted.exp +902 -0
  145. data/spec/syntax/syntax_hyperlink_formatted.exp +902 -0
  146. data/spec/syntax/syntax_schema_head_formatted.exp +18 -0
  147. metadata +392 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: aad412f92ba545d639802d4c66a511e38b198bb03b398eafa42fe5647f4f7757
4
+ data.tar.gz: e2a0dbc27ae502f349818974942e79b4c74e0559ea6cd40aed0f2a56b7847a8f
5
+ SHA512:
6
+ metadata.gz: 80953d43ee88f7c31aa6a7ffd603a91946308e16c8f6063d4a45532fec3db4a0dc2ec3fe3aa87f2c0b10c33728ba89abe6985f5cefaad6fba2fe1c1cb54feb03
7
+ data.tar.gz: a118e440ede66924738e62816bb11d9220f439464d9d0482cca4ca1568e67cb38e80d30ef15a8b3d146e00ba75e78171f97063498e97994f777e88a96ccfd619
data/.cross_rubies ADDED
@@ -0,0 +1,28 @@
1
+ 3.2.0:x86_64-w64-mingw32
2
+ 3.2.0:x86_64-linux-gnu
3
+ 3.2.0:x86_64-linux-musl
4
+ 3.2.0:aarch64-linux-gnu
5
+ 3.2.0:aarch64-linux-musl
6
+ 3.2.0:x86_64-darwin
7
+ 3.2.0:arm64-darwin
8
+ 3.1.0:x86_64-w64-mingw32
9
+ 3.1.0:x86_64-linux-gnu
10
+ 3.1.0:x86_64-linux-musl
11
+ 3.1.0:aarch64-linux-gnu
12
+ 3.1.0:aarch64-linux-musl
13
+ 3.1.0:x86_64-darwin
14
+ 3.1.0:arm64-darwin
15
+ 3.0.0:x86_64-w64-mingw32
16
+ 3.0.0:x86_64-linux-gnu
17
+ 3.0.0:x86_64-linux-musl
18
+ 3.0.0:aarch64-linux-gnu
19
+ 3.0.0:aarch64-linux-musl
20
+ 3.0.0:x86_64-darwin
21
+ 3.0.0:arm64-darwin
22
+ 2.7.0:x86_64-w64-mingw32
23
+ 2.7.0:x86_64-linux-gnu
24
+ 2.7.0:x86_64-linux-musl
25
+ 2.7.0:aarch64-linux-gnu
26
+ 2.7.0:aarch64-linux-musl
27
+ 2.7.0:x86_64-darwin
28
+ 2.7.0:arm64-darwin
@@ -0,0 +1,47 @@
1
+ name: "CodeQL"
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ schedule:
7
+ - cron: '0 23 * * 3'
8
+ workflow_dispatch:
9
+
10
+ concurrency:
11
+ group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
12
+ cancel-in-progress: true
13
+
14
+ env:
15
+ BUNDLER_VER: 2.4.22
16
+
17
+ jobs:
18
+ analyze:
19
+ name: Analyze
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - name: Checkout
24
+ uses: actions/checkout@v4
25
+ with:
26
+ submodules: recursive
27
+
28
+ - name: Install Ruby
29
+ uses: ruby/setup-ruby@master
30
+ with:
31
+ ruby-version: 3.1
32
+ bundler: ${{ env.BUNDLER_VER }}
33
+ bundler-cache: false
34
+
35
+ - name: Bundle
36
+ run: bundle install --jobs 4 --retry 3
37
+
38
+ - name: Initialize CodeQL
39
+ uses: github/codeql-action/init@v2
40
+ with:
41
+ languages: "ruby, cpp"
42
+
43
+ - name: Build native extension
44
+ run: bundle exec rake compile
45
+
46
+ - name: Perform CodeQL Analysis
47
+ uses: github/codeql-action/analyze@v2
@@ -0,0 +1,448 @@
1
+ name: rake
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ paths-ignore:
7
+ - 'docs/**'
8
+ - '**.adoc'
9
+ - '**.md'
10
+ - .github/workflows/release.yml
11
+ - .github/workflows/codeql.yml
12
+ pull_request:
13
+ workflow_dispatch:
14
+
15
+ concurrency:
16
+ group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
17
+ cancel-in-progress: true
18
+
19
+ env:
20
+ RUBYGEM_VER: 3.4.22
21
+ BUNDLER_VER: 2.4.22
22
+ # Forcing bundler version to ensure that it is consistent everywhere and
23
+ # does not cause bundler gem reinstalls
24
+ # bundler/rubygems 2.3.22 is a minimal requirement to support gnu/musl differentiation
25
+ # https://github.com/rubygems/rubygems/pull/4488
26
+
27
+ jobs:
28
+ rubocop:
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - name: Checkout
32
+ uses: actions/checkout@v4
33
+ with:
34
+ submodules: recursive
35
+
36
+ - name: Install Ruby
37
+ uses: ruby/setup-ruby@master
38
+ with:
39
+ ruby-version: 3.1
40
+ bundler: ${{ env.BUNDLER_VER }}
41
+ bundler-cache: true
42
+
43
+ - name: Bundle
44
+ run: bundle install --jobs 4 --retry 3
45
+
46
+ - name: Rubocop
47
+ run: bundle exec rake rubocop
48
+
49
+ rake:
50
+ name: test on ruby-${{ matrix.ruby }} ${{ matrix.os }}
51
+ runs-on: ${{ matrix.os }}
52
+ strategy:
53
+ fail-fast: false
54
+ matrix:
55
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
56
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
57
+
58
+ steps:
59
+ - name: Checkout
60
+ uses: actions/checkout@v4
61
+ with:
62
+ submodules: recursive
63
+
64
+ - name: Setup packages
65
+ if: startsWith(matrix.os, 'macos')
66
+ run: brew install autoconf automake libtool
67
+
68
+ - name: Install Ruby
69
+ uses: ruby/setup-ruby@master
70
+ with:
71
+ ruby-version: ${{ matrix.ruby }}
72
+ bundler: ${{ env.BUNDLER_VER }}
73
+ # Rice gem has issues with bundler cache
74
+ # more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
75
+ # but it is not the only issue
76
+ bundler-cache: false
77
+
78
+ - name: Bundle
79
+ run: bundle install --jobs 4 --retry 3
80
+
81
+ - name: Process cache
82
+ uses: actions/cache@v4
83
+ id: cache
84
+ with:
85
+ path: lib/expressir/express/express_parser.*
86
+ key: v4-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('ext/express_parser/extconf.rb', 'ext/express_parser/antlrgen/**', 'ext/express_parser/express_parser.cpp', '.git/modules/ext/express_parser/antlr4-upstream/HEAD') }}
87
+
88
+ - name: Build native extension
89
+ if: steps.cache.outputs.cache-hit != 'true'
90
+ run: bundle exec rake compile
91
+
92
+ - name: Run tests
93
+ run: |
94
+ bundle exec rake
95
+ cat .rspec_status
96
+
97
+ rake-alpine:
98
+ name: test on ruby-${{ matrix.ruby }} alpine container
99
+ runs-on: ubuntu-latest
100
+ strategy:
101
+ fail-fast: false
102
+ matrix:
103
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
104
+ container: ruby:${{ matrix.ruby }}-alpine
105
+ steps:
106
+ - name: Install packages
107
+ run: |
108
+ apk --no-cache --upgrade add build-base git bash tar
109
+
110
+ - name: Checkout
111
+ uses: actions/checkout@v4
112
+ with:
113
+ submodules: recursive
114
+
115
+ - name: Upgrade RubyGems
116
+ if: matrix.ruby == '3.0' || matrix.ruby == '2.7'
117
+ run: gem update --system ${{ env.RUBYGEM_VER }} --no-document
118
+
119
+ - name: Bundle
120
+ run: |
121
+ git config --global --add safe.directory $PWD
122
+ bundle install --jobs 4 --retry 3
123
+
124
+ - name: Process cache
125
+ uses: actions/cache@v4
126
+ id: cache
127
+ with:
128
+ path: lib/expressir/express/express_parser.*
129
+ key: v4-alpine-${{ matrix.ruby }}-${{ hashFiles('ext/express_parser/extconf.rb', 'ext/express_parser/antlrgen/**', 'ext/express_parser/express_parser.cpp', '.git/modules/ext/express_parser/antlr4-upstream/HEAD') }}
130
+
131
+ - name: Build native extension
132
+ if: steps.cache.outputs.cache-hit != 'true'
133
+ run: bundle exec rake compile
134
+
135
+ - name: Run tests
136
+ run: |
137
+ bundle exec rake
138
+ cat .rspec_status
139
+
140
+ # test release workflow
141
+ pack-ruby:
142
+ runs-on: ubuntu-latest
143
+ steps:
144
+ - name: Checkout
145
+ uses: actions/checkout@v4
146
+ with:
147
+ submodules: recursive
148
+
149
+ - name: Setup Ruby
150
+ uses: ruby/setup-ruby@master
151
+ with:
152
+ ruby-version: '3.1'
153
+ bundler: ${{ env.BUNDLER_VER }}
154
+ bundler-cache: false
155
+
156
+ - name: Bundle
157
+ run: bundle install --jobs 4 --retry 3
158
+
159
+ - name: Build gem without native extension
160
+ run: gem build expressir.gemspec
161
+
162
+ - name: Package gem without native extension
163
+ uses: actions/upload-artifact@v4
164
+ with:
165
+ name: pkg-ruby
166
+ path: expressir-*.gem
167
+
168
+ pack:
169
+ runs-on: ubuntu-latest
170
+ strategy:
171
+ fail-fast: false
172
+ matrix:
173
+ platform: [ linux-gnu, linux-musl, windows, darwin ]
174
+ steps:
175
+ - name: Checkout
176
+ uses: actions/checkout@v4
177
+ with:
178
+ submodules: recursive
179
+
180
+ - name: Setup Ruby
181
+ uses: ruby/setup-ruby@master
182
+ with:
183
+ ruby-version: '3.1'
184
+ bundler-cache: false
185
+ bundler: ${{ env.BUNDLER_VER }}
186
+
187
+ - name: Bundle
188
+ run: bundle install --jobs 4 --retry 3
189
+
190
+ - name: Enable swap
191
+ run: |
192
+ sudo fallocate -l 15g /compile.swap
193
+ sudo chmod 600 /compile.swap
194
+ sudo mkswap /compile.swap
195
+ sudo swapon /compile.swap
196
+ sudo swapon --all --verbose
197
+
198
+ - name: Build gem with native extension
199
+ run: bundle exec rake gem:${{ matrix.platform }}
200
+
201
+ - name: Package gem with native extension
202
+ uses: actions/upload-artifact@v4
203
+ with:
204
+ name: pkg-${{ matrix.platform }}
205
+ path: pkg/*.gem
206
+
207
+ verify-ruby:
208
+ name: verify ruby gem on ruby-${{ matrix.ruby }} ${{ matrix.os }}
209
+ needs: pack-ruby
210
+ runs-on: ${{ matrix.os }}
211
+ strategy:
212
+ fail-fast: false
213
+ matrix:
214
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
215
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
216
+ steps:
217
+ - name: Install Ruby
218
+ uses: ruby/setup-ruby@master
219
+ with:
220
+ ruby-version: ${{ matrix.ruby }}
221
+ bundler-cache: false
222
+ bundler: ${{ env.BUNDLER_VER }}
223
+
224
+ - name: Checkout
225
+ uses: actions/checkout@v4
226
+ with:
227
+ submodules: recursive
228
+
229
+ - name: Bundle
230
+ run: bundle install --jobs 4 --retry 3
231
+
232
+ - name: Download packaged gem
233
+ uses: actions/download-artifact@v4
234
+ with:
235
+ name: pkg-ruby
236
+ path: pkg
237
+
238
+ - name: Install gem
239
+ run: gem install -l pkg/expressir-*.gem
240
+
241
+ - name: Verify
242
+ run: |
243
+ cd $(ruby -e "puts Gem::Specification.find_by_name('expressir').gem_dir")
244
+ ruby bin/rspec
245
+ cat .rspec_status || echo ".rspec_status was not found"
246
+
247
+ verify-ruby-linux-musl:
248
+ name: verify ruby gem on ruby-${{ matrix.ruby }} on alpine container
249
+ needs: pack-ruby
250
+ runs-on: ubuntu-latest
251
+ strategy:
252
+ fail-fast: false
253
+ matrix:
254
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
255
+ container: ruby:${{ matrix.ruby }}-alpine
256
+ steps:
257
+ - name: Install packages
258
+ run: |
259
+ apk --no-cache --upgrade add build-base git bash tar
260
+
261
+ - name: Checkout
262
+ uses: actions/checkout@v4
263
+ with:
264
+ submodules: recursive
265
+
266
+ - name: Upgrade RubyGems
267
+ if: matrix.ruby == '3.0' || matrix.ruby == '2.7'
268
+ run: gem update --system ${{ env.RUBYGEM_VER }} --no-document
269
+
270
+ - name: Bundle
271
+ run: |
272
+ git config --global --add safe.directory $PWD
273
+ bundle install --jobs 4 --retry 3
274
+
275
+ - name: Download packaged gem
276
+ uses: actions/download-artifact@v4
277
+ with:
278
+ name: pkg-ruby
279
+ path: pkg
280
+
281
+ - name: Install gem
282
+ run: gem install -l pkg/expressir-*.gem
283
+
284
+ - name: Verify
285
+ run: |
286
+ cd $(ruby -e "puts Gem::Specification.find_by_name('expressir').gem_dir")
287
+ ruby bin/rspec
288
+ cat .rspec_status || echo ".rspec_status was not found"
289
+
290
+ verify-darwin:
291
+ name: verify MacOS binary gem on ruby-${{ matrix.ruby }}
292
+ needs: pack
293
+ runs-on: macos-latest
294
+ strategy:
295
+ fail-fast: false
296
+ matrix:
297
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
298
+ steps:
299
+ - name: Install Ruby
300
+ uses: ruby/setup-ruby@master
301
+ with:
302
+ ruby-version: ${{ matrix.ruby }}
303
+ bundler-cache: false
304
+ bundler: ${{ env.BUNDLER_VER }}
305
+
306
+ - name: Checkout
307
+ uses: actions/checkout@v4
308
+
309
+ - name: Bundle
310
+ run: bundle install --jobs 4 --retry 3
311
+
312
+ - name: Download packaged gem
313
+ uses: actions/download-artifact@v4
314
+ with:
315
+ name: pkg-darwin
316
+ path: pkg
317
+
318
+ - name: Install binary gem
319
+ run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM.sub(/darwin\d{2}$/, 'darwin')").gem
320
+ # MacOS with have something like x86_64-darwin19, others just x86_64-linux
321
+
322
+ - name: Verify
323
+ run: |
324
+ cd $(ruby -e "puts Gem::Specification.find_by_name('expressir').gem_dir")
325
+ ruby bin/rspec
326
+ cat .rspec_status || echo ".rspec_status was not found"
327
+
328
+ verify-linux-gnu:
329
+ name: verify Linux (gnu) binary gem on ruby-${{ matrix.ruby }}
330
+ needs: pack
331
+ runs-on: ubuntu-latest
332
+ strategy:
333
+ fail-fast: false
334
+ matrix:
335
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
336
+ steps:
337
+ - name: Install Ruby
338
+ uses: ruby/setup-ruby@master
339
+ with:
340
+ ruby-version: ${{ matrix.ruby }}
341
+ bundler-cache: false
342
+ bundler: ${{ env.BUNDLER_VER }}
343
+
344
+ - name: Upgrade RubyGems
345
+ if: matrix.ruby == '3.0' || matrix.ruby == '2.7'
346
+ run: gem update --system ${{ env.RUBYGEM_VER }} --no-document
347
+
348
+ - name: Checkout
349
+ uses: actions/checkout@v4
350
+
351
+ - name: Bundle
352
+ run: bundle install --jobs 4 --retry 3
353
+
354
+ - name: Download packaged gem
355
+ uses: actions/download-artifact@v4
356
+ with:
357
+ name: pkg-linux-gnu
358
+ path: pkg
359
+
360
+ - name: Install binary gem
361
+ run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM")-gnu.gem
362
+
363
+ - name: Verify
364
+ run: |
365
+ cd $(ruby -e "puts Gem::Specification.find_by_name('expressir').gem_dir")
366
+ ruby bin/rspec
367
+ cat .rspec_status || echo ".rspec_status was not found"
368
+
369
+ verify-windows:
370
+ name: verify Windows binary gem on ruby-${{ matrix.ruby }}
371
+ needs: pack
372
+ continue-on-error: true
373
+ runs-on: windows-latest
374
+ strategy:
375
+ fail-fast: false
376
+ matrix:
377
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
378
+ steps:
379
+ - name: Install Ruby
380
+ uses: ruby/setup-ruby@master
381
+ with:
382
+ ruby-version: ${{ matrix.ruby }}
383
+ bundler-cache: false
384
+ bundler: ${{ env.BUNDLER_VER }}
385
+
386
+ - name: Checkout
387
+ uses: actions/checkout@v4
388
+
389
+ - name: Bundle
390
+ run: bundle install --jobs 4 --retry 3
391
+
392
+ - name: Download packaged gem
393
+ uses: actions/download-artifact@v4
394
+ with:
395
+ name: pkg-windows
396
+ path: pkg
397
+
398
+ - name: Install binary gem
399
+ run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM").gem
400
+
401
+ - name: Verify
402
+ run: |
403
+ cd $(ruby -e "puts Gem::Specification.find_by_name('expressir').gem_dir")
404
+ ruby bin/rspec
405
+ cat .rspec_status || echo ".rspec_status was not found"
406
+
407
+ verify-linux-musl:
408
+ name: verify Linux (musl) binary gem on ruby-${{ matrix.ruby }}
409
+ needs: pack
410
+ runs-on: ubuntu-latest
411
+ strategy:
412
+ fail-fast: false
413
+ matrix:
414
+ ruby: [ '3.2', '3.1', '3.0', '2.7' ]
415
+ container: ruby:${{ matrix.ruby }}-alpine
416
+ steps:
417
+ - name: Install packages
418
+ run: |
419
+ apk --no-cache --upgrade add build-base git bash tar
420
+
421
+ - name: Checkout
422
+ uses: actions/checkout@v4
423
+ with:
424
+ submodules: recursive
425
+
426
+ - name: Upgrade RubyGems
427
+ if: matrix.ruby == '3.0' || matrix.ruby == '2.7'
428
+ run: gem update --system ${{ env.RUBYGEM_VER }} --no-document
429
+
430
+ - name: Bundle
431
+ run: |
432
+ git config --global --add safe.directory $PWD
433
+ bundle install --jobs 4 --retry 3
434
+
435
+ - name: Download packaged gem
436
+ uses: actions/download-artifact@v4
437
+ with:
438
+ name: pkg-linux-musl
439
+ path: pkg
440
+
441
+ - name: Install binary gem
442
+ run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM").gem
443
+
444
+ - name: Verify
445
+ run: |
446
+ cd $(ruby -e "puts Gem::Specification.find_by_name('expressir').gem_dir")
447
+ ruby bin/rspec
448
+ cat .rspec_status || echo ".rspec_status was not found"