expressir 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cross_rubies +8 -0
- data/.github/workflows/rake.yml +139 -5
- data/.github/workflows/release.yml +1 -1
- data/expressir.gemspec +1 -1
- data/lib/expressir/version.rb +1 -1
- data/rakelib/cross-ruby.rake +39 -20
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d96c2cd6d31a1202a26d62331a0d6766c1e3b566250ff2e6f97db0f105d5f7e
|
4
|
+
data.tar.gz: 3fa00f8b74260b373398a36e4358a38fa8c05f3f2574fa27e38c3fd438d1f987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5db3569cd696964cc2319216fcad7e5ed9541052b5cfa412d8a9ee235170567e7e1c992926ce2c184a18180b068ee0abc3f37c1eb3b36668d67bb2e36ea5bfa
|
7
|
+
data.tar.gz: 8d1bb252bcf1abc3d1b38805117667e18a47a391e8c8e0b6f112b9b82c362a25e4d77ad3aefbe4750bdb1c7599b4cccb8afaeafc25045d51ed3cab9aa7c6d725
|
data/.cross_rubies
CHANGED
@@ -1,20 +1,28 @@
|
|
1
1
|
3.2.0:x86_64-w64-mingw32
|
2
2
|
3.2.0:x86_64-linux-gnu
|
3
|
+
3.2.0:x86_64-linux-musl
|
3
4
|
3.2.0:aarch64-linux-gnu
|
5
|
+
3.2.0:aarch64-linux-musl
|
4
6
|
3.2.0:x86_64-darwin
|
5
7
|
3.2.0:arm64-darwin
|
6
8
|
3.1.0:x86_64-w64-mingw32
|
7
9
|
3.1.0:x86_64-linux-gnu
|
10
|
+
3.1.0:x86_64-linux-musl
|
8
11
|
3.1.0:aarch64-linux-gnu
|
12
|
+
3.1.0:aarch64-linux-musl
|
9
13
|
3.1.0:x86_64-darwin
|
10
14
|
3.1.0:arm64-darwin
|
11
15
|
3.0.0:x86_64-w64-mingw32
|
12
16
|
3.0.0:x86_64-linux-gnu
|
17
|
+
3.0.0:x86_64-linux-musl
|
13
18
|
3.0.0:aarch64-linux-gnu
|
19
|
+
3.0.0:aarch64-linux-musl
|
14
20
|
3.0.0:x86_64-darwin
|
15
21
|
3.0.0:arm64-darwin
|
16
22
|
2.7.0:x86_64-w64-mingw32
|
17
23
|
2.7.0:x86_64-linux-gnu
|
24
|
+
2.7.0:x86_64-linux-musl
|
18
25
|
2.7.0:aarch64-linux-gnu
|
26
|
+
2.7.0:aarch64-linux-musl
|
19
27
|
2.7.0:x86_64-darwin
|
20
28
|
2.7.0:arm64-darwin
|
data/.github/workflows/rake.yml
CHANGED
@@ -17,6 +17,7 @@ concurrency:
|
|
17
17
|
cancel-in-progress: true
|
18
18
|
|
19
19
|
env:
|
20
|
+
RUBYGEM_VER: 3.4.22
|
20
21
|
BUNDLER_VER: 2.4.22
|
21
22
|
# Forcing bundler version to ensure that it is consistent everywhere and
|
22
23
|
# does not cause bundler gem reinstalls
|
@@ -93,6 +94,49 @@ jobs:
|
|
93
94
|
bundle exec rake
|
94
95
|
cat .rspec_status
|
95
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
|
+
|
96
140
|
# test release workflow
|
97
141
|
pack-ruby:
|
98
142
|
runs-on: ubuntu-latest
|
@@ -126,7 +170,7 @@ jobs:
|
|
126
170
|
strategy:
|
127
171
|
fail-fast: false
|
128
172
|
matrix:
|
129
|
-
platform: [ linux-gnu, windows, darwin ]
|
173
|
+
platform: [ linux-gnu, linux-musl, windows, darwin ]
|
130
174
|
steps:
|
131
175
|
- name: Checkout
|
132
176
|
uses: actions/checkout@v4
|
@@ -196,7 +240,50 @@ jobs:
|
|
196
240
|
|
197
241
|
- name: Verify
|
198
242
|
run: |
|
199
|
-
cd $(ruby -e "puts
|
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")
|
200
287
|
ruby bin/rspec
|
201
288
|
cat .rspec_status || echo ".rspec_status was not found"
|
202
289
|
|
@@ -234,7 +321,7 @@ jobs:
|
|
234
321
|
|
235
322
|
- name: Verify
|
236
323
|
run: |
|
237
|
-
cd $(ruby -e "puts
|
324
|
+
cd $(ruby -e "puts Gem::Specification.find_by_name('expressir').gem_dir")
|
238
325
|
ruby bin/rspec
|
239
326
|
cat .rspec_status || echo ".rspec_status was not found"
|
240
327
|
|
@@ -254,6 +341,10 @@ jobs:
|
|
254
341
|
bundler-cache: false
|
255
342
|
bundler: ${{ env.BUNDLER_VER }}
|
256
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
|
+
|
257
348
|
- name: Checkout
|
258
349
|
uses: actions/checkout@v4
|
259
350
|
|
@@ -271,7 +362,7 @@ jobs:
|
|
271
362
|
|
272
363
|
- name: Verify
|
273
364
|
run: |
|
274
|
-
cd $(ruby -e "puts
|
365
|
+
cd $(ruby -e "puts Gem::Specification.find_by_name('expressir').gem_dir")
|
275
366
|
ruby bin/rspec
|
276
367
|
cat .rspec_status || echo ".rspec_status was not found"
|
277
368
|
|
@@ -309,6 +400,49 @@ jobs:
|
|
309
400
|
|
310
401
|
- name: Verify
|
311
402
|
run: |
|
312
|
-
cd $(ruby -e "puts
|
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")
|
313
447
|
ruby bin/rspec
|
314
448
|
cat .rspec_status || echo ".rspec_status was not found"
|
data/expressir.gemspec
CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency "pry", "~> 0.12.2"
|
40
40
|
spec.add_development_dependency "rake", "~> 13.0"
|
41
41
|
spec.add_development_dependency "rake-compiler", "~> 1.2"
|
42
|
-
spec.add_development_dependency "rake-compiler-dock", "~> 1.
|
42
|
+
spec.add_development_dependency "rake-compiler-dock", "~> 1.5"
|
43
43
|
spec.add_development_dependency "rspec", "~> 3.11"
|
44
44
|
spec.add_development_dependency "rubocop", "1.58"
|
45
45
|
spec.add_development_dependency "rubocop-performance", "~> 1.19"
|
data/lib/expressir/version.rb
CHANGED
data/rakelib/cross-ruby.rake
CHANGED
@@ -3,6 +3,7 @@ require "shellwords"
|
|
3
3
|
|
4
4
|
WINDOWS_PLATFORM_REGEX = /mingw|mswin/.freeze
|
5
5
|
LINUX_GNU_PLATFORM_REGEX = /linux-gnu/.freeze
|
6
|
+
LINUX_MUSL_PLATFORM_REGEX = /linux-musl/.freeze
|
6
7
|
DARWIN_PLATFORM_REGEX = /darwin/.freeze
|
7
8
|
GLIBC_MIN_VERSION = "2.17".freeze
|
8
9
|
|
@@ -11,16 +12,20 @@ CrossRuby = Struct.new(:version, :host) do
|
|
11
12
|
"tmp/#{platform}/stage/lib/expressir/express/#{minor_ver}/express_parser.#{dll_ext}"
|
12
13
|
end
|
13
14
|
|
14
|
-
def
|
15
|
-
!!(platform =~
|
15
|
+
def darwin?
|
16
|
+
!!(platform =~ DARWIN_PLATFORM_REGEX)
|
16
17
|
end
|
17
18
|
|
18
19
|
def linux_gnu?
|
19
20
|
!!(platform =~ LINUX_GNU_PLATFORM_REGEX)
|
20
21
|
end
|
21
22
|
|
22
|
-
def
|
23
|
-
!!(platform =~
|
23
|
+
def linux_musl?
|
24
|
+
!!(platform =~ LINUX_MUSL_PLATFORM_REGEX)
|
25
|
+
end
|
26
|
+
|
27
|
+
def windows?
|
28
|
+
!!(platform =~ WINDOWS_PLATFORM_REGEX)
|
24
29
|
end
|
25
30
|
|
26
31
|
def ver
|
@@ -63,6 +68,10 @@ CrossRuby = Struct.new(:version, :host) do
|
|
63
68
|
"x86_64-linux-gnu"
|
64
69
|
when "aarch64-linux-gnu"
|
65
70
|
"aarch64-linux-gnu"
|
71
|
+
when "x86_64-linux-musl"
|
72
|
+
"x86_64-linux-musl"
|
73
|
+
when "aarch64-linux-musl"
|
74
|
+
"aarch64-linux-musl"
|
66
75
|
when /\Ax86_64-darwin/
|
67
76
|
"x86_64-darwin"
|
68
77
|
when /\Aarm64-darwin/
|
@@ -89,7 +98,7 @@ CrossRuby = Struct.new(:version, :host) do
|
|
89
98
|
case platform
|
90
99
|
when /x64-mingw(32|-ucrt)/
|
91
100
|
"x86_64-w64-mingw32-"
|
92
|
-
when /(x86_64|aarch64)-linux-gnu/
|
101
|
+
when /(x86_64|aarch64)-linux-(gnu|musl)/
|
93
102
|
# We do believe that we are on Linux and can use native tools
|
94
103
|
""
|
95
104
|
when /x86_64.*darwin/
|
@@ -105,9 +114,9 @@ CrossRuby = Struct.new(:version, :host) do
|
|
105
114
|
case platform
|
106
115
|
when /64-mingw(32|-ucrt)/
|
107
116
|
"pei-x86-64"
|
108
|
-
when
|
117
|
+
when /x86_64-linux-(gnu|musl)/
|
109
118
|
"elf64-x86-64"
|
110
|
-
when
|
119
|
+
when /aarch64-linux-(gnu|musl)/
|
111
120
|
"elf64-little"
|
112
121
|
when "x86_64-darwin"
|
113
122
|
"Mach-O 64-bit x86-64"
|
@@ -154,7 +163,7 @@ CrossRuby = Struct.new(:version, :host) do
|
|
154
163
|
case platform
|
155
164
|
when WINDOWS_PLATFORM_REGEX
|
156
165
|
verify_entry_windows(dump, dll)
|
157
|
-
when LINUX_GNU_PLATFORM_REGEX
|
166
|
+
when LINUX_GNU_PLATFORM_REGEX, LINUX_MUSL_PLATFORM_REGEX
|
158
167
|
verify_entry_linux(dll)
|
159
168
|
when DARWIN_PLATFORM_REGEX
|
160
169
|
verify_entry_darwin(dll)
|
@@ -199,7 +208,7 @@ CrossRuby = Struct.new(:version, :host) do
|
|
199
208
|
end
|
200
209
|
end
|
201
210
|
|
202
|
-
def
|
211
|
+
def allowed_dlls_linux_gnu
|
203
212
|
suffix = (platform == "x86_64-linux-gnu" ? "x86-64" : "aarch64")
|
204
213
|
[
|
205
214
|
"ld-linux-#{suffix}.so",
|
@@ -211,6 +220,16 @@ CrossRuby = Struct.new(:version, :host) do
|
|
211
220
|
]
|
212
221
|
end
|
213
222
|
|
223
|
+
def allowed_dlls_linux_musl
|
224
|
+
suffix = (platform == "x86_64-linux-gnu" ? "x86-64" : "aarch64")
|
225
|
+
[
|
226
|
+
"ld-linux-#{suffix}.so",
|
227
|
+
"libstdc++.so",
|
228
|
+
"libc.so",
|
229
|
+
"libgcc_s.so",
|
230
|
+
]
|
231
|
+
end
|
232
|
+
|
214
233
|
def allowed_dlls_darwin
|
215
234
|
[
|
216
235
|
"/usr/lib/libSystem.B.dylib",
|
@@ -218,12 +237,14 @@ CrossRuby = Struct.new(:version, :host) do
|
|
218
237
|
]
|
219
238
|
end
|
220
239
|
|
221
|
-
def allowed_dlls
|
240
|
+
def allowed_dlls # rubocop:disable Metrics/MethodLength
|
222
241
|
case platform
|
223
242
|
when WINDOWS_PLATFORM_REGEX
|
224
243
|
allowed_dlls_windows
|
225
244
|
when LINUX_GNU_PLATFORM_REGEX
|
226
|
-
|
245
|
+
allowed_dlls_linux_gnu
|
246
|
+
when LINUX_MUSL_PLATFORM_REGEX
|
247
|
+
allowed_dlls_linux_musl
|
227
248
|
when DARWIN_PLATFORM_REGEX
|
228
249
|
allowed_dlls_darwin
|
229
250
|
else
|
@@ -248,7 +269,7 @@ CrossRuby = Struct.new(:version, :host) do
|
|
248
269
|
case platform
|
249
270
|
when DARWIN_PLATFORM_REGEX
|
250
271
|
actual_dlls_darwin(dll)
|
251
|
-
when LINUX_GNU_PLATFORM_REGEX
|
272
|
+
when LINUX_GNU_PLATFORM_REGEX, LINUX_MUSL_PLATFORM_REGEX
|
252
273
|
actual_dlls_linux(dump)
|
253
274
|
when WINDOWS_PLATFORM_REGEX
|
254
275
|
actual_dlls_windows(dump)
|
@@ -335,15 +356,10 @@ def pre_req(plat)
|
|
335
356
|
end
|
336
357
|
|
337
358
|
namespace "gem" do
|
338
|
-
CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux_gnu? || cr.darwin? }
|
339
|
-
.map { |cr| { platform: cr.platform, tag: cr.tag } }
|
340
|
-
.uniq { |hash| hash[:platform] }.each do |hash|
|
341
|
-
plat = hash[:platform]
|
342
|
-
tag = hash[:tag]
|
343
|
-
|
359
|
+
CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux_gnu? || cr.linux_musl? || cr.darwin? }.map(&:platform).uniq.each do |plat|
|
344
360
|
desc "build native gem for #{plat} platform"
|
345
361
|
task plat do
|
346
|
-
RakeCompilerDock.sh <<~RCD, platform:
|
362
|
+
RakeCompilerDock.sh <<~RCD, platform: plat
|
347
363
|
#{pre_req(plat)} && gem install bundler --no-document &&
|
348
364
|
bundle && bundle exec rake gem:#{plat}:builder MAKE="nice make -j`nproc`"
|
349
365
|
RCD
|
@@ -360,9 +376,12 @@ namespace "gem" do
|
|
360
376
|
desc "build native gems for windows"
|
361
377
|
multitask "windows" => CROSS_RUBIES.find_all(&:windows?).map(&:platform).uniq
|
362
378
|
|
363
|
-
desc "build native gems for linux"
|
379
|
+
desc "build native gems for linux-gnu"
|
364
380
|
multitask "linux-gnu" => CROSS_RUBIES.find_all(&:linux_gnu?).map(&:platform).uniq
|
365
381
|
|
382
|
+
desc "build native gems for linux-musl"
|
383
|
+
multitask "linux-musl" => CROSS_RUBIES.find_all(&:linux_musl?).map(&:platform).uniq
|
384
|
+
|
366
385
|
desc "build native gems for darwin"
|
367
386
|
multitask "darwin" => CROSS_RUBIES.find_all(&:darwin?).map(&:platform).uniq
|
368
387
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expressir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rice
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '1.
|
145
|
+
version: '1.5'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '1.
|
152
|
+
version: '1.5'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rspec
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|