emf2svg 1.3.1-x64-mingw32 → 1.4.0-x64-mingw32

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: ea870f86411d9da5d33dee42f01599fbf4fac40d71494d9666df318a6194644c
4
- data.tar.gz: 55e5e250fba4a2ec4764ab340e76de30ea919c0687d276f2e0e884bd7c96c334
3
+ metadata.gz: f62a09ddc9929d899586dacfa0f729bddf1dc8590bbfe149f56cc10efb896ba4
4
+ data.tar.gz: 01a4f15203237e2bd9847a517ebae2a7077e20c2a6e21f322ee7066d68fd9eec
5
5
  SHA512:
6
- metadata.gz: 03d17a33f36c7f8359c4fff5eb8ccc503fefe0fcd810a40d8aafcf116c606029ceae64ae9be7e9ace589595c610b4c5b270e326a17511d5b70caeb2035124291
7
- data.tar.gz: a3d0bf572181b01c53f6a65883862e2641ae0b06b117d7a54b2d6eac41bdae1854d4948b46b14342fbc57cd9d01a9edb6e321abf0681a2832ed818f44623b252
6
+ metadata.gz: 6a650b02d9abfd0473c2d42987cfa24e198b95a342f1befacd6ace309c7b12bf24fa5ecbb528af44bf6981a2b02e25b3da33263088e5902c60f23c003657d612
7
+ data.tar.gz: ad8bb29e1a511d29345a03132c17b8ddbb3f321ab919824d2fadb8525adf2d3c58f821e247efedd4b8191a56a7d368063fda7c710f2d0c4d46100b0ee5902933
@@ -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,31 +28,38 @@ 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:
@@ -64,56 +70,55 @@ jobs:
64
70
  platform: arm64-darwin
65
71
  ruby-version: '2.7'
66
72
  steps:
67
- - 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
68
80
 
69
- - name: Install packages
70
- if: matrix.os == 'ubuntu-latest'
71
- run: |
72
- sudo apt-get update
73
- sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
74
-
75
- - uses: ruby/setup-ruby@v1
76
- with:
77
- ruby-version: ${{ matrix.ruby-version }}
78
- bundler-cache: true
81
+ - uses: ruby/setup-ruby@v1
82
+ with:
83
+ ruby-version: ${{ matrix.ruby-version }}
84
+ bundler-cache: true
79
85
 
80
- - run: bundle exec rake gem:native:${{ matrix.platform }}
86
+ - run: bundle exec rake gem:native:${{ matrix.platform }}
81
87
 
82
- - uses: actions/upload-artifact@v2
83
- with:
84
- name: pkg
85
- path: pkg/*.gem
88
+ - uses: actions/upload-artifact@v2
89
+ with:
90
+ name: pkg
91
+ path: pkg/*.gem
86
92
 
87
- - name: Install gem
88
- run: gem install -b pkg/emf2svg-*.gem
93
+ - name: Install gem
94
+ run: gem install -b pkg/emf2svg-*.gem
89
95
 
90
96
  publish:
91
97
  needs: [ build, cross ]
92
98
  runs-on: ubuntu-latest
93
99
  steps:
94
- - uses: actions/checkout@v2
95
-
96
- - uses: ruby/setup-ruby@v1
97
- with:
98
- ruby-version: '2.7'
99
- bundler-cache: true
100
-
101
- - uses: actions/download-artifact@v2
102
- with:
103
- name: pkg
104
- path: pkg
105
-
106
- - name: Publish to rubygems.org
107
- env:
108
- RUBYGEMS_API_KEY: ${{secrets.METANORMA_CI_RUBYGEMS_API_KEY}}
109
- run: |
110
- mkdir -p ~/.gem
111
- touch ~/.gem/credentials
112
- cat > ~/.gem/credentials << EOF
113
- ---
114
- :rubygems_api_key: ${RUBYGEMS_API_KEY}
115
- EOF
116
- chmod 0600 ~/.gem/credentials
117
- gem signin
118
- ls -l pkg/
119
- 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.5
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/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.5.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
Binary file
data/lib/emf2svg/bz2.dll CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
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.6.0")
11
+ super("libemf2svg", "1.7.0")
12
12
 
13
13
  @files << {
14
- url: "https://github.com/metanorma/libemf2svg/releases/download/v1.6.0/libemf2svg.tar.gz",
15
- sha256: "0f186f40b98c06acdec1278a314cEc1f093e7504d34f7a15b697ebfe6c4d3097", # 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,14 +35,10 @@ 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
42
  when /\Ax86_64.*(darwin|macos|osx)/
48
43
  "x86_64-darwin"
49
44
  when /\A(arm64|aarch64).*(darwin|macos|osx)/
@@ -58,10 +53,10 @@ module Emf2svg
58
53
  case ENV["target_platform"]
59
54
  when /\A(arm64|aarch64).*(darwin|macos|osx)/
60
55
  "arm64-darwin"
61
- when /\Ac86_64.*(darwin|macos|osx)/
56
+ when /\Ax86_64.*(darwin|macos|osx)/
62
57
  "x86_64-darwin"
63
58
  when /\A(arm64|aarch64).*linux/
64
- "arm64-linux"
59
+ "aarch64-linux"
65
60
  else
66
61
  ENV["target_platform"] || host_platform
67
62
  end
@@ -73,17 +68,24 @@ module Emf2svg
73
68
  when "arm64-darwin"
74
69
  "arm64-osx"
75
70
  when "x86_64-darwin"
76
- "x86_64-osx"
77
- else
78
- target_platform
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"
79
78
  end
80
79
  end
81
-
82
80
  # rubocop:enable Metrics/CyclomaticComplexity
83
81
  # rubocop:enable Metrics/MethodLength
84
82
 
85
- def cross_compiling?
86
- not host_platform.eql? target_platform
83
+ def windows_native?
84
+ MiniPortile.windows? && target_triplet.eql?("x64-mingw-static")
85
+ end
86
+
87
+ def drop_target_triplet?
88
+ windows_native? || host_platform.eql?(target_platform)
87
89
  end
88
90
 
89
91
  def checkpoint
@@ -94,15 +96,13 @@ module Emf2svg
94
96
  opts = []
95
97
 
96
98
  opts << "-DCMAKE_BUILD_TYPE=Release"
99
+ opts << "-DLONLY=ON"
97
100
 
98
- if MiniPortile.windows? || cross_compiling?
99
- opts << "-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
101
+ unless target_triplet.nil? || drop_target_triplet?
102
+ opts << " -DVCPKG_TARGET_TRIPLET=#{target_triplet}"
100
103
  end
101
104
 
102
- if cross_compiling? && (not MiniPortile.windows?)
103
- message("Cross-compiling on #{host_platform} for #{target_platform}\n")
104
- opts << "-DVCPKG_TARGET_TRIPLET=#{target_triplet}"
105
- end
105
+ opts << "-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
106
106
 
107
107
  opts
108
108
  end
@@ -116,6 +116,7 @@ module Emf2svg
116
116
  end
117
117
 
118
118
  def install
119
+ message("Called install\n")
119
120
  libs = if MiniPortile.windows?
120
121
  Dir.glob(File.join(work_path, "Release", "*.dll"))
121
122
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Emf2svg
4
- VERSION = "1.3.1"
4
+ VERSION = "1.4.0"
5
5
  end
Binary file
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.3.1
4
+ version: 1.4.0
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-03 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"
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
119
  - - ">="
120
120
  - !ruby/object:Gem::Version
121
- version: 2.5.0
121
+ version: 2.6.0
122
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - ">="
@@ -1,167 +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: 4
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: 4
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: 4
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: 4
136
- fail-fast: false
137
- matrix:
138
- include:
139
- - os: ubuntu-latest
140
- platform: aarch64-linux
141
- ruby-version: '2.7'
142
- - os: macos-latest
143
- platform: arm64-darwin
144
- ruby-version: '2.7'
145
- steps:
146
- - uses: actions/checkout@v2
147
-
148
- - name: Install packages
149
- if: matrix.os == 'ubuntu-latest'
150
- run: |
151
- sudo apt-get update
152
- sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu gperf
153
-
154
- - uses: ruby/setup-ruby@v1
155
- with:
156
- ruby-version: ${{ matrix.ruby-version }}
157
- bundler-cache: true
158
-
159
- - run: bundle exec rake gem:native:${{ matrix.platform }}
160
-
161
- - uses: actions/upload-artifact@v2
162
- with:
163
- name: pkg
164
- path: pkg/*.gem
165
-
166
- - name: Install gem
167
- run: gem install -b pkg/emf2svg-*.gem