expressir 1.3.1-x64-mingw-ucrt → 1.3.2-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de36196da3136ab1090c8640b778fc7fef3a2b23acd2462833cb3a2b31b67fc4
4
- data.tar.gz: 3c2ff15308efee60bcf57ad263c2c63249e11fadddda143867a05f4769befc5e
3
+ metadata.gz: 3aed88572ade42a5255aa602ac69f8ce3d7d17f761c3f339682560e42b217cff
4
+ data.tar.gz: 3c941a67749f3afd43d4ae018aa8165058bb1bbaf926fdd873b78880d20686c3
5
5
  SHA512:
6
- metadata.gz: c85175161ab81c6256c2e35ffe74c4936814f0b700f15383a1efa55d769893b94c1e5831e662ed3993705253f40465b038a216be315f47f77390696ba6965cc0
7
- data.tar.gz: ebde4f1cd1a69c3b88ff0a33cd0298de691f1cc0626b4b6e4e7d56ad2d627be6b22579a25e2407be05e5f39ce68a1a4ef7811aa2db5959dfb22cb680d7b384d3
6
+ metadata.gz: d8e0cd8f12ebab86cad1abf347c6f403a4b49f689eb7970162aefa3e0d615dd77c1f43bce039959a5ccd3766751903d6d683b1889a6e59d7d3a7982f5385fca3
7
+ data.tar.gz: 64c444e53ddf77fe6c8ece5075f623c38d45c5c0f50f61f2d46143e4031ec0618fb0e7f5a95a764e87f9b5de86d5509c3478c029a61c2a7170ea704a469baba7
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
@@ -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 RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
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 RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
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 RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
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 RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
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"
@@ -133,7 +133,7 @@ jobs:
133
133
  chmod 0600 ~/.gem/credentials
134
134
  gem signin
135
135
  for gem in pkg/*.gem; do gem push $gem -V; done
136
- sleep 5
136
+ sleep 15
137
137
 
138
138
  verify:
139
139
  name: Verify published gem on ${{ matrix.os }}
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.3"
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"
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "1.3.1".freeze
2
+ VERSION = "1.3.2".freeze
3
3
  end
@@ -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 windows?
15
- !!(platform =~ WINDOWS_PLATFORM_REGEX)
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 darwin?
23
- !!(platform =~ DARWIN_PLATFORM_REGEX)
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 "x86_64-linux-gnu"
117
+ when /x86_64-linux-(gnu|musl)/
109
118
  "elf64-x86-64"
110
- when "aarch64-linux-gnu"
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 allowed_dlls_linux
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
- allowed_dlls_linux
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: tag
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.1
4
+ version: 1.3.2
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-27 00:00:00.000000000 Z
11
+ date: 2024-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.3'
131
+ version: '1.5'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.3'
138
+ version: '1.5'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement