emf2svg 1.2.1-x86_64-darwin → 1.4.0-x86_64-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: af65c5fd222c98aa77d4954923605615ea1a25638ee53ffff61064f8098d5939
4
- data.tar.gz: ae66af8f11e553c6d0279aa8c66e5c9562429f23980d43726b57ee70a37686cd
3
+ metadata.gz: 7d6aef7d3b38378da721516ed04964f29704848dff6a5b8c4ad3874de99192ab
4
+ data.tar.gz: '018b4fd896e429ed836eaae6282dcc7f66a8f4dac3aeed813169f3bbb98867ff'
5
5
  SHA512:
6
- metadata.gz: a5fe1ae5a46381b43606dd91381bdade1295bfcbd2c7da8d90fd04efda360ea85908091f7a706245acb300b02bb12e12f4b2254910d8c5e8dd9519ea17f46593
7
- data.tar.gz: 8450071a100eec2f888bed7f4d7846438d4bd97efad997c161e1de5deae812e0e327164a73d6104b0bd09782085082a201f02549227bbb0c6a9f234eaf767517
6
+ metadata.gz: 5398c6033cc91d4f5e010298de5d332791bdf0688f3c9717d21a592f797593af74b050a28d05ead793ef2024d30e37636fb16bde5b5e6d3e6231b55eb596ae2d
7
+ data.tar.gz: 137af5ee5023efca8938b6c760c897dd024cd43f2356e7a87def288eac22c9711ad0755f335a6bd759fc68f409cc088e01a63b1be0117a073498d24a0b25029e
@@ -0,0 +1,184 @@
1
+ name: build
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ paths-ignore:
7
+ - '*.adoc'
8
+ pull_request:
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ${{ matrix.os }}
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ os: [ ubuntu-18.04, ubuntu-latest, windows-latest, macos-latest ]
18
+ ruby-version: [ '2.7' ]
19
+ include:
20
+ - os: windows-latest
21
+ ruby-version: '3.1'
22
+ steps:
23
+ - uses: actions/checkout@v3
24
+
25
+ - uses: ruby/setup-ruby@v1
26
+ with:
27
+ bundler-cache: true
28
+ ruby-version: ${{ matrix.ruby-version }}
29
+
30
+ # https://github.com/microsoft/vcpkg/issues/15931
31
+ # no good solution :(
32
+ - name: Workaround for vcpkg
33
+ if: startsWith(matrix.os, 'ubuntu')
34
+ run: |
35
+ sudo apt-get update
36
+ sudo apt-get install gperf
37
+
38
+ - run: bundle exec rake
39
+
40
+ build:
41
+ runs-on: ${{ matrix.os }}
42
+ strategy:
43
+ fail-fast: false
44
+ matrix:
45
+ include:
46
+ - os: ubuntu-18.04
47
+ platform: any
48
+ ruby-version: '2.7'
49
+ - os: ubuntu-18.04
50
+ platform: x86_64-linux
51
+ ruby-version: '2.7'
52
+ - os: windows-latest
53
+ platform: x64-mingw32
54
+ ruby-version: '2.7'
55
+ - os: windows-latest
56
+ platform: x64-mingw-ucrt
57
+ ruby-version: '3.1'
58
+ - os: macos-latest
59
+ platform: x86_64-darwin
60
+ ruby-version: '2.7'
61
+ steps:
62
+ - uses: actions/checkout@v3
63
+
64
+ - uses: ruby/setup-ruby@v1
65
+ with:
66
+ ruby-version: ${{ matrix.ruby-version }}
67
+ bundler-cache: true
68
+
69
+ - name: Workaround for vcpkg
70
+ if: startsWith(matrix.os, 'ubuntu')
71
+ run: |
72
+ sudo apt-get update
73
+ sudo apt-get install gperf
74
+
75
+ - run: bundle exec rake gem:native:${{ matrix.platform }}
76
+
77
+ - uses: actions/upload-artifact@v2
78
+ with:
79
+ name: pkg
80
+ path: pkg/*.gem
81
+
82
+ - name: Install gem
83
+ run: gem install -b pkg/emf2svg-*.gem
84
+
85
+ - name: Test conversion
86
+ run: |
87
+ ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
88
+
89
+ test-build:
90
+ needs: build
91
+ runs-on: ${{ matrix.os }}
92
+ strategy:
93
+ fail-fast: false
94
+ matrix:
95
+ include:
96
+ - os: ubuntu-latest
97
+ platform: any
98
+ ruby-version: '2.7'
99
+ - os: windows-latest
100
+ platform: any
101
+ ruby-version: '2.7'
102
+ - os: macos-latest
103
+ platform: any
104
+ ruby-version: '2.7'
105
+ - os: ubuntu-18.04
106
+ platform: x86_64-linux
107
+ ruby-version: '2.7'
108
+ - os: ubuntu-latest
109
+ platform: x86_64-linux
110
+ ruby-version: '2.7'
111
+ - os: windows-latest
112
+ platform: x64-mingw32
113
+ ruby-version: '2.7'
114
+ - os: windows-latest
115
+ platform: x64-mingw-ucrt
116
+ ruby-version: '3.1'
117
+ - os: macos-latest
118
+ platform: x86_64-darwin
119
+ ruby-version: '2.7'
120
+
121
+ steps:
122
+ - uses: actions/checkout@v2
123
+
124
+ - uses: ruby/setup-ruby@v1
125
+ with:
126
+ ruby-version: ${{ matrix.ruby-version }}
127
+
128
+ - uses: actions/download-artifact@v2
129
+ with:
130
+ name: pkg
131
+ path: pkg
132
+
133
+ - name: Workaround for vcpkg
134
+ if: startsWith(matrix.os, 'ubuntu')
135
+ run: |
136
+ sudo apt-get update
137
+ sudo apt-get install gperf
138
+
139
+ - name: Install native gem
140
+ if: matrix.platform == 'any'
141
+ run: gem install -b pkg/emf2svg-$(ruby -I lib -r emf2svg/version -e "puts Emf2svg::VERSION").gem
142
+
143
+ - name: Install binary gem
144
+ if: matrix.platform != 'any'
145
+ run: gem install -b pkg/emf2svg-*-${{ matrix.platform }}.gem
146
+
147
+ - name: Test conversion
148
+ run: |
149
+ ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
150
+
151
+ cross:
152
+ runs-on: ${{ matrix.os }}
153
+ strategy:
154
+ matrix:
155
+ include:
156
+ - os: ubuntu-latest
157
+ platform: aarch64-linux
158
+ ruby-version: '2.7'
159
+ - os: macos-latest
160
+ platform: arm64-darwin
161
+ ruby-version: '2.7'
162
+ steps:
163
+ - uses: actions/checkout@v3
164
+
165
+ - name: Install packages
166
+ if: matrix.os == 'ubuntu-latest'
167
+ run: |
168
+ sudo apt-get update
169
+ sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
170
+
171
+ - uses: ruby/setup-ruby@v1
172
+ with:
173
+ ruby-version: ${{ matrix.ruby-version }}
174
+ bundler-cache: true
175
+
176
+ - run: bundle exec rake gem:native:${{ matrix.platform }}
177
+
178
+ - uses: actions/upload-artifact@v2
179
+ with:
180
+ name: pkg
181
+ path: pkg/*.gem
182
+
183
+ - name: Install gem
184
+ run: gem install -b pkg/emf2svg-*.gem
@@ -9,7 +9,6 @@ jobs:
9
9
  build:
10
10
  runs-on: ${{ matrix.os }}
11
11
  strategy:
12
- max-parallel: 3
13
12
  fail-fast: false
14
13
  matrix:
15
14
  include:
@@ -29,87 +28,97 @@ jobs:
29
28
  platform: x86_64-darwin
30
29
  ruby-version: '2.7'
31
30
  steps:
32
- - uses: actions/checkout@v2
31
+ - uses: actions/checkout@v3
33
32
 
34
- - uses: ruby/setup-ruby@v1
35
- with:
36
- ruby-version: ${{ matrix.ruby-version }}
37
- bundler-cache: true
33
+ - uses: ruby/setup-ruby@v1
34
+ with:
35
+ ruby-version: ${{ matrix.ruby-version }}
36
+ bundler-cache: true
38
37
 
39
- - run: bundle exec rake gem:native:${{ matrix.platform }}
38
+ # https://github.com/microsoft/vcpkg/issues/15931
39
+ # no good solution :(
40
+ - name: Workaround for vcpkg
41
+ if: startsWith(matrix.os, 'ubuntu')
42
+ run: |
43
+ sudo apt-get update
44
+ sudo apt-get install gperf
40
45
 
41
- - uses: actions/upload-artifact@v2
42
- with:
43
- name: pkg
44
- path: pkg/*.gem
46
+ - run: bundle exec rake gem:native:${{ matrix.platform }}
45
47
 
46
- - name: Install gem
47
- run: gem install -b pkg/emf2svg-*.gem
48
+ - uses: actions/upload-artifact@v3
49
+ with:
50
+ name: pkg
51
+ path: pkg/*.gem
48
52
 
49
- - name: Test conversion
50
- run: |
51
- ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
53
+ - name: Install gem
54
+ run: gem install -b pkg/emf2svg-*.gem
55
+
56
+ - name: Test conversion
57
+ run: |
58
+ ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
52
59
 
53
60
  cross:
54
61
  runs-on: ${{ matrix.os }}
55
62
  strategy:
56
- max-parallel: 3
57
63
  fail-fast: false
58
64
  matrix:
59
65
  include:
60
- - os: ubuntu-18.04
61
- platform: arm64-linux
66
+ - os: ubuntu-latest
67
+ platform: aarch64-linux
68
+ ruby-version: '2.7'
69
+ - os: macos-latest
70
+ platform: arm64-darwin
62
71
  ruby-version: '2.7'
63
72
  steps:
64
- - uses: actions/checkout@v2
73
+ - uses: actions/checkout@v2
74
+
75
+ - name: Install packages
76
+ if: matrix.os == 'ubuntu-latest'
77
+ run: |
78
+ sudo apt-get update
79
+ sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
65
80
 
66
- - name: Install packages
67
- run: |
68
- sudo apt-get update
69
- sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
70
-
71
- - uses: ruby/setup-ruby@v1
72
- with:
73
- ruby-version: ${{ matrix.ruby-version }}
74
- bundler-cache: true
81
+ - uses: ruby/setup-ruby@v1
82
+ with:
83
+ ruby-version: ${{ matrix.ruby-version }}
84
+ bundler-cache: true
75
85
 
76
- - run: bundle exec rake gem:native:${{ matrix.platform }}
86
+ - run: bundle exec rake gem:native:${{ matrix.platform }}
77
87
 
78
- - uses: actions/upload-artifact@v2
79
- with:
80
- name: pkg
81
- path: pkg/*.gem
88
+ - uses: actions/upload-artifact@v2
89
+ with:
90
+ name: pkg
91
+ path: pkg/*.gem
82
92
 
83
- - name: Install gem
84
- run: gem install -b pkg/emf2svg-*.gem
93
+ - name: Install gem
94
+ run: gem install -b pkg/emf2svg-*.gem
85
95
 
86
96
  publish:
87
97
  needs: [ build, cross ]
88
98
  runs-on: ubuntu-latest
89
99
  steps:
90
- - uses: actions/checkout@v2
91
-
92
- - uses: ruby/setup-ruby@v1
93
- with:
94
- ruby-version: '2.7'
95
- bundler-cache: true
96
-
97
- - uses: actions/download-artifact@v2
98
- with:
99
- name: pkg
100
- path: pkg
101
-
102
- - name: Publish to rubygems.org
103
- env:
104
- RUBYGEMS_API_KEY: ${{secrets.METANORMA_CI_RUBYGEMS_API_KEY}}
105
- run: |
106
- mkdir -p ~/.gem
107
- touch ~/.gem/credentials
108
- cat > ~/.gem/credentials << EOF
109
- ---
110
- :rubygems_api_key: ${RUBYGEMS_API_KEY}
111
- EOF
112
- chmod 0600 ~/.gem/credentials
113
- gem signin
114
- ls -l pkg/
115
- for gem in pkg/*.gem; do gem push -V $gem; done
100
+ - uses: actions/checkout@v2
101
+
102
+ - uses: ruby/setup-ruby@v1
103
+ with:
104
+ ruby-version: '2.7'
105
+ bundler-cache: true
106
+
107
+ - uses: actions/download-artifact@v2
108
+ with:
109
+ name: pkg
110
+ path: pkg
111
+
112
+ - name: Publish to rubygems.org
113
+ env:
114
+ RUBYGEMS_API_KEY: ${{secrets.METANORMA_CI_RUBYGEMS_API_KEY}}
115
+ run: |
116
+ mkdir -p ~/.gem
117
+ touch ~/.gem/credentials
118
+ cat > ~/.gem/credentials << EOF
119
+ ---
120
+ :rubygems_api_key: ${RUBYGEMS_API_KEY}
121
+ EOF
122
+ chmod 0600 ~/.gem/credentials
123
+ gem signin
124
+ for gem in pkg/*.gem; do gem push -V $gem; done
data/.rubocop.yml CHANGED
@@ -2,7 +2,7 @@ inherit_from:
2
2
  - 'https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml'
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.7
5
+ TargetRubyVersion: 2.6
6
6
  SuggestExtensions: false
7
7
 
8
8
  Gemspec/RequireMFA:
data/README.adoc CHANGED
@@ -1,13 +1,18 @@
1
- = emf2svg
1
+ image:https://github.com/metanorma/emf2svg-ruby/actions/workflows/build.yml/badge.svg["Build", link="https://github.com/metanorma/emf2svg-ruby/actions/workflows/build.yml"]
2
+ image:https://badge.fury.io/rb/emf2svg.svg["Gem Version", link="https://badge.fury.io/rb/emf2svg"]
3
+
2
4
 
3
- == Purpose
5
+ = emf2svg
4
6
 
5
- Provides Ruby access to https://github.com/kakwa/libemf2svg (temporarily using
7
+ == Overview
8
+ emf2svg-ruby provides Ruby front-end to emf to svg converter https://github.com/kakwa/libemf2svg (temporarily using
6
9
  the https://github.com/metanorma/libemf2svg[Metanorma fork] until upstreaming
7
10
  is complete).
8
11
 
9
- == Installation
12
+ == Requirements:
13
+ Ruby >= 2.6
10
14
 
15
+ == Installation
11
16
  Install the gem directly:
12
17
 
13
18
  [source,sh]
@@ -22,19 +27,28 @@ Or add it to your `Gemfile`:
22
27
  gem 'emf2svg'
23
28
  ----
24
29
 
25
- === Dependencies
30
+ === Packaging
31
+ We distribute pre-compiled libraries for a set of machine architecture. On supported platforms, this removes the need
32
+ for compiling the C extension and installation of system dependencies. This results in much faster and more reliable installation.
33
+
34
+ ==== Native extensions
35
+ * x86_64-linux (GNU and musl flavors)
36
+ * aarch64-linux (GNU and musl flavors)
37
+ * x86_64-darwin
38
+ * arm64-darwin
39
+ * x64-mingw32
40
+ * x64-mingw-ucrt
26
41
 
27
- * libiconv
28
- * libpng
29
- * libfontconfig
30
- * libfreetype
42
+ === Building GEM from source
43
+ emf2svg build script maintaince and installs all required libraries and other dependencies using vcpkg package manager
44
+ You still need to install appropriate build system (like gcc, clang or Visual Studio) and cmake
45
+ On Debian systems there is vcpkg bug [https://github.com/microsoft/vcpkg/issues/15931] that needs to be addressed by installing gperf package:
31
46
 
32
47
  ==== Windows
33
48
 
34
49
  On Windows all necessary libraries are precompiled but you'll need Visual
35
50
  Studio 2019 with C++ Build Tools, which can be downloaded
36
- https://visualstudio.microsoft.com/downloads/[here], or installed with
37
- Chocolatey:
51
+ https://visualstudio.microsoft.com/downloads/[here], or installed with Chocolatey:
38
52
 
39
53
  [source,sh]
40
54
  ----
@@ -55,22 +69,16 @@ brew install cmake
55
69
  [source,sh]
56
70
  ----
57
71
  # compiler
58
- apt-get install gcc g++
72
+ apt-get install gcc g++ gperf cmake pkg-config
59
73
  # or
60
- apt-get install clang
61
-
62
- # build deps
63
- apt-get install cmake pkg-config
64
-
65
- # library deps with their headers
66
- apt-get install libpng-dev libc6-dev libfontconfig1-dev libfreetype6-dev zlib1g-dev
74
+ apt-get install clang gperf cmake pkg-config
67
75
  ----
68
76
 
69
77
  ===== Fedora
70
78
 
71
79
  [source,sh]
72
80
  ----
73
- yum install cmake libpng-devel freetype-devel fontconfig-devel gcc-c++ gcc
81
+ yum install cmake gcc-c++ gcc
74
82
  ----
75
83
 
76
84
  == Usage
data/Rakefile CHANGED
@@ -34,8 +34,9 @@ platforms = [
34
34
  "x64-mingw32",
35
35
  "x64-mingw-ucrt",
36
36
  "x86_64-linux",
37
- "arm64-linux",
37
+ "aarch64-linux",
38
38
  "x86_64-darwin",
39
+ "arm64-darwin",
39
40
  ]
40
41
 
41
42
  platforms.each do |platform|
data/emf2svg.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = "Ruby interface to libemf2svg."
12
12
  spec.homepage = "https://github.com/metanorma/emf2svg-ruby"
13
13
  spec.license = "BSD-2-Clause"
14
- spec.required_ruby_version = ">= 2.7.0"
14
+ spec.required_ruby_version = ">= 2.6.0"
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
17
  spec.metadata["source_code_uri"] = "https://github.com/metanorma/emf2svg-ruby"
Binary file
@@ -8,11 +8,11 @@ module Emf2svg
8
8
  ROOT = Pathname.new(File.expand_path("../..", __dir__))
9
9
 
10
10
  def initialize
11
- super("libemf2svg", "1.4.0")
11
+ super("libemf2svg", "1.7.0")
12
12
 
13
13
  @files << {
14
- url: "https://github.com/metanorma/libemf2svg/releases/download/v1.4.0/libemf2svg.tar.gz",
15
- sha256: "e05081986a0ec6c5bd494068825c7b55dd21fa1814942a61293b225af2d957d2", # rubocop:disable Layout/LineLength
14
+ url: "https://github.com/metanorma/libemf2svg/releases/download/v1.7.0/libemf2svg.tar.gz",
15
+ sha256: "a87a02510f87ed4510a3426fa8636b340e26d96f25edf63c3ba465e7e9d7e2eb", # rubocop:disable Layout/LineLength
16
16
  }
17
17
 
18
18
  @target = ROOT.join(@target).to_s
@@ -25,7 +25,6 @@ module Emf2svg
25
25
 
26
26
  def cook
27
27
  super
28
-
29
28
  FileUtils.touch(checkpoint)
30
29
  end
31
30
 
@@ -36,31 +35,57 @@ module Emf2svg
36
35
  case @host
37
36
  when /\Ax86_64.*mingw32/
38
37
  "x64-mingw32"
39
- when /\Ai[3-6]86.*mingw32/
40
- "x86-mingw32"
41
38
  when /\Ax86_64.*linux/
42
39
  "x86_64-linux"
43
40
  when /\A(arm64|aarch64).*linux/
44
41
  "arm64-linux"
45
- when /\Ai[3-6]86.*linux/
46
- "x86-linux"
47
- when /\Ax86_64.*darwin/
42
+ when /\Ax86_64.*(darwin|macos|osx)/
48
43
  "x86_64-darwin"
49
- when /\Aarm64.*darwin/
44
+ when /\A(arm64|aarch64).*(darwin|macos|osx)/
50
45
  "arm64-darwin"
51
46
  else
52
47
  @host
53
48
  end
54
49
  end
50
+
51
+ def target_platform
52
+ @target_platform ||=
53
+ case ENV["target_platform"]
54
+ when /\A(arm64|aarch64).*(darwin|macos|osx)/
55
+ "arm64-darwin"
56
+ when /\Ax86_64.*(darwin|macos|osx)/
57
+ "x86_64-darwin"
58
+ when /\A(arm64|aarch64).*linux/
59
+ "aarch64-linux"
60
+ else
61
+ ENV["target_platform"] || host_platform
62
+ end
63
+ end
64
+
65
+ def target_triplet
66
+ @target_triplet ||=
67
+ case target_platform
68
+ when "arm64-darwin"
69
+ "arm64-osx"
70
+ when "x86_64-darwin"
71
+ "x64-osx"
72
+ when "aarch64-linux"
73
+ "arm64-linux"
74
+ when "x86_64-linux"
75
+ "x64-linux"
76
+ when /\Ax64-mingw(32|-ucrt)/
77
+ "x64-mingw-static"
78
+ end
79
+ end
55
80
  # rubocop:enable Metrics/CyclomaticComplexity
56
81
  # rubocop:enable Metrics/MethodLength
57
82
 
58
- def target_platform
59
- @target_platform = ENV["target_platform"] || host_platform
83
+ def windows_native?
84
+ MiniPortile.windows? && target_triplet.eql?("x64-mingw-static")
60
85
  end
61
86
 
62
- def cross_compiling?
63
- not host_platform.eql? target_platform
87
+ def drop_target_triplet?
88
+ windows_native? || host_platform.eql?(target_platform)
64
89
  end
65
90
 
66
91
  def checkpoint
@@ -71,15 +96,13 @@ module Emf2svg
71
96
  opts = []
72
97
 
73
98
  opts << "-DCMAKE_BUILD_TYPE=Release"
99
+ opts << "-DLONLY=ON"
74
100
 
75
- if MiniPortile.windows? || cross_compiling?
76
- opts << "-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
101
+ unless target_triplet.nil? || drop_target_triplet?
102
+ opts << " -DVCPKG_TARGET_TRIPLET=#{target_triplet}"
77
103
  end
78
104
 
79
- if cross_compiling? && (not MiniPortile.windows?)
80
- message("Cross-compiling on #{host_platform} for #{target_platform}\n")
81
- opts << "-DVCPKG_TARGET_TRIPLET=#{target_platform}"
82
- end
105
+ opts << "-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
83
106
 
84
107
  opts
85
108
  end
@@ -93,6 +116,7 @@ module Emf2svg
93
116
  end
94
117
 
95
118
  def install
119
+ message("Called install\n")
96
120
  libs = if MiniPortile.windows?
97
121
  Dir.glob(File.join(work_path, "Release", "*.dll"))
98
122
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Emf2svg
4
- VERSION = "1.2.1"
4
+ VERSION = "1.4.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emf2svg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.4.0
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-22 00:00:00.000000000 Z
11
+ date: 2022-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -74,7 +74,7 @@ executables:
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - ".github/workflows/main.yml"
77
+ - ".github/workflows/build.yml"
78
78
  - ".github/workflows/release.yml"
79
79
  - ".gitignore"
80
80
  - ".rspec"
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
- version: 2.7.0
112
+ version: 2.6.0
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -1,163 +0,0 @@
1
- name: main
2
-
3
- on:
4
- push:
5
- branches: [ main ]
6
- pull_request:
7
- workflow_dispatch:
8
-
9
- jobs:
10
- test:
11
- runs-on: ${{ matrix.os }}
12
- strategy:
13
- max-parallel: 3
14
- fail-fast: false
15
- matrix:
16
- os: [ ubuntu-18.04, ubuntu-latest, windows-latest, macos-latest ]
17
- ruby-version: [ '2.7' ]
18
- include:
19
- - os: windows-latest
20
- ruby-version: '3.1'
21
- steps:
22
- - uses: actions/checkout@v2
23
-
24
- - uses: ruby/setup-ruby@v1
25
- with:
26
- bundler-cache: true
27
- ruby-version: ${{ matrix.ruby-version }}
28
-
29
- - run: bundle exec rake
30
-
31
- build:
32
- runs-on: ${{ matrix.os }}
33
- strategy:
34
- max-parallel: 3
35
- fail-fast: false
36
- matrix:
37
- include:
38
- - os: ubuntu-18.04
39
- platform: any
40
- ruby-version: '2.7'
41
- - os: ubuntu-18.04
42
- platform: x86_64-linux
43
- ruby-version: '2.7'
44
- - os: windows-latest
45
- platform: x64-mingw32
46
- ruby-version: '2.7'
47
- - os: windows-latest
48
- platform: x64-mingw-ucrt
49
- ruby-version: '3.1'
50
- - os: macos-latest
51
- platform: x86_64-darwin
52
- ruby-version: '2.7'
53
- steps:
54
- - uses: actions/checkout@v2
55
-
56
- - uses: ruby/setup-ruby@v1
57
- with:
58
- ruby-version: ${{ matrix.ruby-version }}
59
- bundler-cache: true
60
-
61
- - run: bundle exec rake gem:native:${{ matrix.platform }}
62
-
63
- - uses: actions/upload-artifact@v2
64
- with:
65
- name: pkg
66
- path: pkg/*.gem
67
-
68
- - name: Install gem
69
- run: gem install -b pkg/emf2svg-*.gem
70
-
71
- - name: Test conversion
72
- run: |
73
- ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
74
-
75
- test-build:
76
- needs: build
77
- runs-on: ${{ matrix.os }}
78
- strategy:
79
- max-parallel: 3
80
- fail-fast: false
81
- matrix:
82
- include:
83
- - os: ubuntu-latest
84
- platform: any
85
- ruby-version: '2.7'
86
- - os: windows-latest
87
- platform: any
88
- ruby-version: '2.7'
89
- - os: macos-latest
90
- platform: any
91
- ruby-version: '2.7'
92
- - os: ubuntu-18.04
93
- platform: x86_64-linux
94
- ruby-version: '2.7'
95
- - os: ubuntu-latest
96
- platform: x86_64-linux
97
- ruby-version: '2.7'
98
- - os: windows-latest
99
- platform: x64-mingw32
100
- ruby-version: '2.7'
101
- - os: windows-latest
102
- platform: x64-mingw-ucrt
103
- ruby-version: '3.1'
104
- - os: macos-latest
105
- platform: x86_64-darwin
106
- ruby-version: '2.7'
107
-
108
- steps:
109
- - uses: actions/checkout@v2
110
-
111
- - uses: ruby/setup-ruby@v1
112
- with:
113
- ruby-version: ${{ matrix.ruby-version }}
114
-
115
- - uses: actions/download-artifact@v2
116
- with:
117
- name: pkg
118
- path: pkg
119
-
120
- - name: Install native gem
121
- if: matrix.platform == 'any'
122
- run: gem install -b pkg/emf2svg-$(ruby -I lib -r emf2svg/version -e "puts Emf2svg::VERSION").gem
123
-
124
- - name: Install binary gem
125
- if: matrix.platform != 'any'
126
- run: gem install -b pkg/emf2svg-*-${{ matrix.platform }}.gem
127
-
128
- - name: Test conversion
129
- run: |
130
- ruby -remf2svg -e "puts File.write('output.svg', Emf2svg.from_file('spec/examples/image1.emf'), mode: 'wb')"
131
-
132
- cross:
133
- runs-on: ${{ matrix.os }}
134
- strategy:
135
- max-parallel: 3
136
- fail-fast: false
137
- matrix:
138
- include:
139
- - os: ubuntu-18.04
140
- platform: arm64-linux
141
- ruby-version: '2.7'
142
- steps:
143
- - uses: actions/checkout@v2
144
-
145
- - name: Install packages
146
- run: |
147
- sudo apt-get update
148
- sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
149
-
150
- - uses: ruby/setup-ruby@v1
151
- with:
152
- ruby-version: ${{ matrix.ruby-version }}
153
- bundler-cache: true
154
-
155
- - run: bundle exec rake gem:native:${{ matrix.platform }}
156
-
157
- - uses: actions/upload-artifact@v2
158
- with:
159
- name: pkg
160
- path: pkg/*.gem
161
-
162
- - name: Install gem
163
- run: gem install -b pkg/emf2svg-*.gem