expressir 1.2.11-arm64-darwin → 1.3.0-arm64-darwin

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: ce94690d93c4aa512c6ad1c0e1693fef8ef52eb225fc4e4c51efc78ac29da9aa
4
- data.tar.gz: ee673300d828a9be5f02653b9f267a3abee1bf1504267f184dd6a1c3b819baaf
3
+ metadata.gz: 1402e85f9059b98f174d0b514c481b8fecee13b8552f9d9cfa64badfe970313a
4
+ data.tar.gz: 38edd7d8ca9818a8647c57d2fd6f11730b6f3bb338499b6dbaa2747152f3b343
5
5
  SHA512:
6
- metadata.gz: d9179aabf5e9f19fb44456e434435c06fa46207ed019f827e2d3436425a364a2ea2f3398542b6f908767b374e27d212e2c7c5319f9d82ca8ac16768456c5c80d
7
- data.tar.gz: 242658d764b5ae710ebd2bc88bb87f8b675776e09e0e65643bd4da594d2cbe28d03bd3f42287ba5719440903099de4b8befe4afe585bdd505add508b160ac44f
6
+ metadata.gz: 93396c2e359baaf690e5e2ab36638fd95754bf9ee958b0729ec9c33b3d188933247d9bdc827cc6d155127631a23ba5349119afd529fb6a72c0639913372a15ac
7
+ data.tar.gz: ea53a316f2c54309dd3b4347ac24ff292e1017957267773ab56b4e39aeb367984351f84ea4a0574221c88a9e78dd33c2893fd2dc82fcd14e659f928e9e9687b7
@@ -2,8 +2,14 @@ name: rake
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master, main ]
5
+ branches: [ main ]
6
+ paths-ignore:
7
+ - 'docs/**'
8
+ - '**.adoc'
9
+ - '**.md'
10
+ - .github/workflows/release.yml
6
11
  pull_request:
12
+ workflow_dispatch:
7
13
 
8
14
  concurrency:
9
15
  group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
@@ -62,7 +68,13 @@ jobs:
62
68
  with:
63
69
  ruby-version: ${{ matrix.ruby }}
64
70
  bundler: ${{ env.BUNDLER_VER }}
65
- bundler-cache: true
71
+ # Rice gem has issues with bundler cache
72
+ # more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
73
+ # but it is not the only issue
74
+ bundler-cache: false
75
+
76
+ - name: Bundle
77
+ run: bundle install --jobs 4 --retry 3
66
78
 
67
79
  - name: Process cache
68
80
  uses: actions/cache@v3
@@ -92,10 +104,9 @@ jobs:
92
104
  - name: Setup Ruby
93
105
  uses: ruby/setup-ruby@master
94
106
  with:
95
- ruby-version: '3.0'
96
- # bundler-cache: true important to not use cache because it leads to "cannot find -lrice"
97
- # more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
107
+ ruby-version: '3.1'
98
108
  bundler: ${{ env.BUNDLER_VER }}
109
+ bundler-cache: false
99
110
 
100
111
  - name: Bundle
101
112
  run: bundle install --jobs 4 --retry 3
@@ -114,7 +125,7 @@ jobs:
114
125
  strategy:
115
126
  fail-fast: false
116
127
  matrix:
117
- host: [ linux, windows, darwin ]
128
+ platform: [ linux-gnu, windows, darwin ]
118
129
  steps:
119
130
  - name: Checkout
120
131
  uses: actions/checkout@v4
@@ -124,9 +135,8 @@ jobs:
124
135
  - name: Setup Ruby
125
136
  uses: ruby/setup-ruby@master
126
137
  with:
127
- ruby-version: '3.0'
128
- # bundler-cache: true important to not use cache because it leads to "cannot find -lrice"
129
- # more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
138
+ ruby-version: '3.1'
139
+ bundler-cache: false
130
140
  bundler: ${{ env.BUNDLER_VER }}
131
141
 
132
142
  - name: Bundle
@@ -141,12 +151,12 @@ jobs:
141
151
  sudo swapon --all --verbose
142
152
 
143
153
  - name: Build gem with native extension
144
- run: bundle exec rake gem:${{ matrix.host }}
154
+ run: bundle exec rake gem:${{ matrix.platform }}
145
155
 
146
156
  - name: Package gem with native extension
147
157
  uses: actions/upload-artifact@v3
148
158
  with:
149
- name: pkg-${{ matrix.host }}
159
+ name: pkg-${{ matrix.platform }}
150
160
  path: pkg/*.gem
151
161
 
152
162
  verify-ruby:
@@ -163,7 +173,7 @@ jobs:
163
173
  uses: ruby/setup-ruby@master
164
174
  with:
165
175
  ruby-version: ${{ matrix.ruby }}
166
- bundler-cache: true
176
+ bundler-cache: false
167
177
  bundler: ${{ env.BUNDLER_VER }}
168
178
 
169
179
  - name: Checkout
@@ -202,7 +212,7 @@ jobs:
202
212
  uses: ruby/setup-ruby@master
203
213
  with:
204
214
  ruby-version: ${{ matrix.ruby }}
205
- bundler-cache: true
215
+ bundler-cache: false
206
216
  bundler: ${{ env.BUNDLER_VER }}
207
217
 
208
218
  - name: Checkout
@@ -227,8 +237,8 @@ jobs:
227
237
  ruby bin/rspec
228
238
  cat .rspec_status || echo ".rspec_status was not found"
229
239
 
230
- verify-linux:
231
- name: verify Linux binary gem on ruby-${{ matrix.ruby }}
240
+ verify-linux-gnu:
241
+ name: verify Linux (gnu) binary gem on ruby-${{ matrix.ruby }}
232
242
  needs: pack
233
243
  runs-on: ubuntu-latest
234
244
  strategy:
@@ -240,7 +250,7 @@ jobs:
240
250
  uses: ruby/setup-ruby@master
241
251
  with:
242
252
  ruby-version: ${{ matrix.ruby }}
243
- bundler-cache: true
253
+ bundler-cache: false
244
254
  bundler: ${{ env.BUNDLER_VER }}
245
255
 
246
256
  - name: Checkout
@@ -252,11 +262,11 @@ jobs:
252
262
  - name: Download packaged gem
253
263
  uses: actions/download-artifact@v3
254
264
  with:
255
- name: pkg-linux
265
+ name: pkg-linux-gnu
256
266
  path: pkg
257
267
 
258
268
  - name: Install binary gem
259
- run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM").gem
269
+ run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM")-gnu.gem
260
270
 
261
271
  - name: Verify
262
272
  run: |
@@ -271,8 +281,6 @@ jobs:
271
281
  runs-on: windows-latest
272
282
  strategy:
273
283
  fail-fast: false
274
- # Ruby 3.1 fails
275
- # https://github.com/lutaml/expressir/issues/103
276
284
  matrix:
277
285
  ruby: [ '3.2', '3.1', '3.0', '2.7' ]
278
286
  steps:
@@ -280,7 +288,7 @@ jobs:
280
288
  uses: ruby/setup-ruby@master
281
289
  with:
282
290
  ruby-version: ${{ matrix.ruby }}
283
- bundler-cache: true
291
+ bundler-cache: false
284
292
  bundler: ${{ env.BUNDLER_VER }}
285
293
 
286
294
  - name: Checkout
@@ -30,8 +30,8 @@ jobs:
30
30
 
31
31
  - if: ${{ github.event_name == 'workflow_dispatch' }} # unfortunatelly cannot keep this condition on job level
32
32
  run: |
33
- git config user.name github-actions
34
- git config user.email github-actions@github.com
33
+ git config --global user.name github-actions
34
+ git config --global user.email github-actions@github.com
35
35
  gem install gem-release
36
36
  gem bump --version ${{ github.event.inputs.next_version }} --tag --push
37
37
 
@@ -41,7 +41,7 @@ jobs:
41
41
  strategy:
42
42
  fail-fast: false
43
43
  matrix:
44
- host: [ linux, windows, darwin ]
44
+ platform: [ linux-gnu, windows, darwin ]
45
45
  steps:
46
46
  - uses: actions/checkout@v4
47
47
  with:
@@ -56,15 +56,23 @@ jobs:
56
56
 
57
57
  - run: bundle install --jobs 4 --retry 3
58
58
 
59
- # build gem WITHOUT pre-built native extension
60
- - run: gem build expressir.gemspec
59
+ - name: Build gem and save version
60
+ if: matrix.platform == 'linux-gnu'
61
+ run: |
62
+ gem build expressir.gemspec | grep -o 'Version: .*' | awk '{print $2}' > version
61
63
 
62
- - if: matrix.host == 'linux'
64
+ - if: matrix.platform == 'linux-gnu'
63
65
  uses: actions/upload-artifact@v3
64
66
  with:
65
67
  name: pkg-ruby
66
68
  path: expressir-*.gem
67
69
 
70
+ - if: matrix.platform == 'linux-gnu'
71
+ uses: actions/upload-artifact@v3
72
+ with:
73
+ name: version
74
+ path: version
75
+
68
76
  - name: Enable swap
69
77
  run: |
70
78
  sudo fallocate -l 15g /compile.swap
@@ -74,11 +82,11 @@ jobs:
74
82
  sudo swapon --all --verbose
75
83
 
76
84
  # build gem WITH pre-built native extension
77
- - run: bundle exec rake gem:${{ matrix.host }}
85
+ - run: bundle exec rake gem:${{ matrix.platform }}
78
86
 
79
87
  - uses: actions/upload-artifact@v3
80
88
  with:
81
- name: pkg-${{ matrix.host }}
89
+ name: pkg-${{ matrix.platform }}
82
90
  path: pkg/*.gem
83
91
 
84
92
  publish:
@@ -92,7 +100,7 @@ jobs:
92
100
 
93
101
  - uses: actions/download-artifact@v3
94
102
  with:
95
- name: pkg-linux
103
+ name: pkg-linux-gnu
96
104
  path: pkg
97
105
 
98
106
  - uses: actions/download-artifact@v3
@@ -109,12 +117,11 @@ jobs:
109
117
  with:
110
118
  ruby-version: '3.1'
111
119
 
112
- - run: ls -l pkg/
113
-
114
120
  - name: Publish to rubygems.org
115
121
  env:
116
122
  RUBYGEMS_API_KEY: ${{ secrets.LUTAML_CI_RUBYGEMS_API_KEY }}
117
123
  run: |
124
+ ls -l pkg/
118
125
  mkdir -p ~/.gem
119
126
  cat > ~/.gem/credentials << EOF
120
127
  ---
@@ -123,3 +130,52 @@ jobs:
123
130
  chmod 0600 ~/.gem/credentials
124
131
  gem signin
125
132
  for gem in pkg/*.gem; do gem push $gem -V; done
133
+ sleep(5)
134
+
135
+ verify:
136
+ name: Verify published gem on ${{ matrix.os }}
137
+ needs: publish
138
+ runs-on: ${{ matrix.os }}
139
+ strategy:
140
+ fail-fast: false
141
+ matrix:
142
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
143
+ steps:
144
+ - name: Install Ruby
145
+ uses: ruby/setup-ruby@master
146
+ with:
147
+ ruby-version: 3.1
148
+ bundler-cache: true
149
+ bundler: ${{ env.BUNDLER_VER }}
150
+
151
+ - name: Download version
152
+ uses: actions/download-artifact@v3
153
+ with:
154
+ name: version
155
+
156
+ - name: Install gem
157
+ run: gem install expressir -v $(cat version)
158
+
159
+ - name: Verify
160
+ run: expressir version
161
+
162
+ verify-alpine:
163
+ name: Verify published gem on alpine
164
+ needs: publish
165
+ runs-on: ubuntu-latest
166
+ container:
167
+ image: alpine:3.17
168
+ steps:
169
+ - name: Install packages
170
+ run: apk --no-cache add bash build-base git ruby-dev gcc g++ automake
171
+
172
+ - name: Download version
173
+ uses: actions/download-artifact@v3
174
+ with:
175
+ name: version
176
+
177
+ - name: Install gem
178
+ run: gem install expressir -v $(cat version)
179
+
180
+ - name: Verify
181
+ run: expressir version
data/expressir.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  spec.name = "expressir"
7
7
  spec.version = Expressir::VERSION
8
8
  spec.authors = ["Ribose Inc."]
9
- spec.email = ["open.source@ribose.com'"]
9
+ spec.email = ["open.source@ribose.com"]
10
10
 
11
11
  spec.summary = "ISO EXPRESS parser and tools in Ruby."
12
12
  spec.description = "Expressir (“EXPRESS in Ruby”) is a Ruby parser for EXPRESS and a set of Ruby tools for accessing ISO EXPRESS data models."
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "1.2.11".freeze
2
+ VERSION = "1.3.0".freeze
3
3
  end
@@ -2,7 +2,7 @@ require "rbconfig"
2
2
  require "shellwords"
3
3
 
4
4
  WINDOWS_PLATFORM_REGEX = /mingw|mswin/.freeze
5
- LINUX_PLATFORM_REGEX = /linux/.freeze
5
+ LINUX_GNU_PLATFORM_REGEX = /linux-gnu/.freeze
6
6
  DARWIN_PLATFORM_REGEX = /darwin/.freeze
7
7
  GLIBC_MIN_VERSION = "2.17".freeze
8
8
 
@@ -15,8 +15,8 @@ CrossRuby = Struct.new(:version, :host) do
15
15
  !!(platform =~ WINDOWS_PLATFORM_REGEX)
16
16
  end
17
17
 
18
- def linux?
19
- !!(platform =~ LINUX_PLATFORM_REGEX)
18
+ def linux_gnu?
19
+ !!(platform =~ LINUX_GNU_PLATFORM_REGEX)
20
20
  end
21
21
 
22
22
  def darwin?
@@ -59,10 +59,10 @@ CrossRuby = Struct.new(:version, :host) do
59
59
  else
60
60
  "x64-mingw32"
61
61
  end
62
- when /\Ax86_64.*linux/
63
- "x86_64-linux"
64
- when /\A(arm64|aarch64).*linux/
65
- "aarch64-linux"
62
+ when "x86_64-linux-gnu"
63
+ "x86_64-linux-gnu"
64
+ when "aarch64-linux-gnu"
65
+ "aarch64-linux-gnu"
66
66
  when /\Ax86_64-darwin/
67
67
  "x86_64-darwin"
68
68
  when /\Aarm64-darwin/
@@ -72,12 +72,24 @@ CrossRuby = Struct.new(:version, :host) do
72
72
  end
73
73
  end
74
74
 
75
+ def tag
76
+ @tag ||=
77
+ case platform
78
+ when "x86_64-linux-gnu"
79
+ "x86_64-linux"
80
+ when "aarch64-linux-gnu"
81
+ "aarch64-linux"
82
+ else
83
+ platform
84
+ end
85
+ end
86
+
75
87
  def tool(name)
76
88
  (@binutils_prefix ||=
77
89
  case platform
78
90
  when /x64-mingw(32|-ucrt)/
79
91
  "x86_64-w64-mingw32-"
80
- when /(x86_64|aarch64)-linux/
92
+ when /(x86_64|aarch64)-linux-gnu/
81
93
  # We do believe that we are on Linux and can use native tools
82
94
  ""
83
95
  when /x86_64.*darwin/
@@ -93,9 +105,9 @@ CrossRuby = Struct.new(:version, :host) do
93
105
  case platform
94
106
  when /64-mingw(32|-ucrt)/
95
107
  "pei-x86-64"
96
- when "x86_64-linux"
108
+ when "x86_64-linux-gnu"
97
109
  "elf64-x86-64"
98
- when "aarch64-linux"
110
+ when "aarch64-linux-gnu"
99
111
  "elf64-little"
100
112
  when "x86_64-darwin"
101
113
  "Mach-O 64-bit x86-64"
@@ -142,7 +154,7 @@ CrossRuby = Struct.new(:version, :host) do
142
154
  case platform
143
155
  when WINDOWS_PLATFORM_REGEX
144
156
  verify_entry_windows(dump, dll)
145
- when LINUX_PLATFORM_REGEX
157
+ when LINUX_GNU_PLATFORM_REGEX
146
158
  verify_entry_linux(dll)
147
159
  when DARWIN_PLATFORM_REGEX
148
160
  verify_entry_darwin(dll)
@@ -188,7 +200,7 @@ CrossRuby = Struct.new(:version, :host) do
188
200
  end
189
201
 
190
202
  def allowed_dlls_linux
191
- suffix = (platform == "x86_64-linux" ? "x86-64" : "aarch64")
203
+ suffix = (platform == "x86_64-linux-gnu" ? "x86-64" : "aarch64")
192
204
  [
193
205
  "ld-linux-#{suffix}.so",
194
206
  "libc.so",
@@ -210,7 +222,7 @@ CrossRuby = Struct.new(:version, :host) do
210
222
  case platform
211
223
  when WINDOWS_PLATFORM_REGEX
212
224
  allowed_dlls_windows
213
- when LINUX_PLATFORM_REGEX
225
+ when LINUX_GNU_PLATFORM_REGEX
214
226
  allowed_dlls_linux
215
227
  when DARWIN_PLATFORM_REGEX
216
228
  allowed_dlls_darwin
@@ -236,7 +248,7 @@ CrossRuby = Struct.new(:version, :host) do
236
248
  case platform
237
249
  when DARWIN_PLATFORM_REGEX
238
250
  actual_dlls_darwin(dll)
239
- when LINUX_PLATFORM_REGEX
251
+ when LINUX_GNU_PLATFORM_REGEX
240
252
  actual_dlls_linux(dump)
241
253
  when WINDOWS_PLATFORM_REGEX
242
254
  actual_dlls_windows(dump)
@@ -291,7 +303,7 @@ def verify_dll(dll, cross_ruby)
291
303
  cross_ruby.verify_imports(dump, dll)
292
304
  # Not sure if it is required, probably not
293
305
  # I am keeping related code as a reference for future advances
294
- # cross_ruby.verify_glibc_version(dump, dll) if cross_ruby.linux?
306
+ # cross_ruby.verify_glibc_version(dump, dll) if cross_ruby.linux_gnu?
295
307
 
296
308
  puts "#{dll}: passed shared library sanity checks"
297
309
  end
@@ -315,7 +327,7 @@ UBUNTU_PREREQ = "sudo apt-get update -y && sudo apt-get install -y automake auto
315
327
 
316
328
  def pre_req(plat)
317
329
  case plat
318
- when /\linux/
330
+ when /linux/
319
331
  "if [[ $(awk -F= '/^NAME/{print $2}' /etc/os-release) == '\"Ubuntu\"' ]]; then #{UBUNTU_PREREQ}; else #{REDHAT_PREREQ}; fi"
320
332
  else
321
333
  UBUNTU_PREREQ.to_s
@@ -323,14 +335,17 @@ def pre_req(plat)
323
335
  end
324
336
 
325
337
  namespace "gem" do
326
- CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux? || cr.darwin? }.map(&:platform).uniq.each do |plat|
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
+
327
344
  desc "build native gem for #{plat} platform"
328
345
  task plat do
329
- RakeCompilerDock.sh <<~RCD, platform: plat
330
- #{pre_req(plat)} &&
331
- gem install bundler --no-document &&
332
- bundle &&
333
- bundle exec rake gem:#{plat}:builder MAKE="nice make -j`nproc`"
346
+ RakeCompilerDock.sh <<~RCD, platform: tag
347
+ #{pre_req(plat)} && gem install bundler --no-document &&
348
+ bundle && bundle exec rake gem:#{plat}:builder MAKE="nice make -j`nproc`"
334
349
  RCD
335
350
  end
336
351
 
@@ -346,7 +361,7 @@ namespace "gem" do
346
361
  multitask "windows" => CROSS_RUBIES.find_all(&:windows?).map(&:platform).uniq
347
362
 
348
363
  desc "build native gems for linux"
349
- multitask "linux" => CROSS_RUBIES.find_all(&:linux?).map(&:platform).uniq
364
+ multitask "linux-gnu" => CROSS_RUBIES.find_all(&:linux_gnu?).map(&:platform).uniq
350
365
 
351
366
  desc "build native gems for darwin"
352
367
  multitask "darwin" => CROSS_RUBIES.find_all(&:darwin?).map(&:platform).uniq
@@ -361,6 +376,7 @@ Rake::ExtensionTask.new("express_parser", GEMSPEC) do |ext|
361
376
  ext.cross_compile = true
362
377
  ext.cross_platform = CROSS_RUBIES.map(&:platform).uniq
363
378
  ext.cross_config_options << "--enable-cross-build"
379
+
364
380
  ext.cross_compiling do |spec|
365
381
  spec.files.reject! { |path| File.fnmatch?("ext/*", path) }
366
382
  spec.dependencies.reject! { |dep| dep.name == "rice" }
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.2.11
4
+ version: 1.3.0
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-12 00:00:00.000000000 Z
11
+ date: 2023-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -209,7 +209,7 @@ dependencies:
209
209
  description: Expressir (“EXPRESS in Ruby”) is a Ruby parser for EXPRESS and a set
210
210
  of Ruby tools for accessing ISO EXPRESS data models.
211
211
  email:
212
- - open.source@ribose.com'
212
+ - open.source@ribose.com
213
213
  executables:
214
214
  - expressir
215
215
  extensions: []