mini_portile2 2.4.0 → 2.8.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,202 @@
1
+ require File.expand_path('../helper', __FILE__)
2
+
3
+ require "mkmf" # initialize $LDFLAGS et al here, instead of in the middle of a test
4
+
5
+ class TestMkmfConfig < TestCase
6
+ attr_reader :recipe
7
+
8
+ LIBXML_PCP = File.join(__dir__, "assets", "pkgconf", "libxml2")
9
+ LIBXSLT_PCP = File.join(__dir__, "assets", "pkgconf", "libxslt")
10
+
11
+ def make_recipe(name, version)
12
+ MiniPortile.new(name, version).tap do |recipe|
13
+ recipe.logger = StringIO.new # hush output
14
+ end
15
+ end
16
+
17
+ def setup
18
+ super
19
+
20
+ @save_env = %w[PATH CPATH LIBRARY_PATH LDFLAGS PKG_CONFIG_PATH].inject({}) do |env, var|
21
+ env.update(var => ENV[var])
22
+ end
23
+ $INCFLAGS = "-I/xxx"
24
+ $LIBPATH = ["xxx"]
25
+ $CFLAGS = "-xxx"
26
+ $CXXFLAGS = "-xxx"
27
+ $libs = "-lxxx"
28
+ $MINI_PORTILE_STATIC_LIBS = {}
29
+
30
+ FileUtils.rm_rf(["tmp", "ports"]) # remove any previous test files
31
+
32
+ @recipe = make_recipe("libfoo", "1.0.0")
33
+ end
34
+
35
+ def teardown
36
+ FileUtils.rm_rf(["tmp", "ports"]) # remove any previous test files
37
+
38
+ $INCFLAGS = ""
39
+ $LIBPATH = []
40
+ $CFLAGS = ""
41
+ $CXXFLAGS = ""
42
+ $libs = ""
43
+ $MINI_PORTILE_STATIC_LIBS = {}
44
+ @save_env.each do |var, val|
45
+ ENV[var] = val
46
+ end
47
+
48
+ super
49
+ end
50
+
51
+ def test_mkmf_config_recipe_LIBPATH_global_lib_dir_does_not_exist
52
+ recipe.mkmf_config
53
+
54
+ refute_includes($LIBPATH, recipe.lib_path)
55
+ refute_includes($libs.shellsplit, "-lfoo")
56
+ end
57
+
58
+ def test_mkmf_config_recipe_LIBPATH_global_not_static
59
+ FileUtils.mkdir_p(recipe.lib_path)
60
+
61
+ recipe.mkmf_config
62
+
63
+ assert_includes($LIBPATH, recipe.lib_path)
64
+ assert_operator($LIBPATH.index(recipe.lib_path), :<, $LIBPATH.index("xxx")) # prepend
65
+
66
+ assert_includes($libs.shellsplit, "-lfoo") # note the recipe name is "libfoo"
67
+ assert_match(%r{-lfoo.*-lxxx}, $libs) # prepend
68
+ end
69
+
70
+ def test_mkmf_config_recipe_LIBPATH_global_static
71
+ FileUtils.mkdir_p(recipe.lib_path)
72
+ static_lib_path = File.join(recipe.lib_path, "libfoo.#{$LIBEXT}")
73
+
74
+ recipe.mkmf_config(static: "foo")
75
+
76
+ refute_includes($LIBPATH, recipe.lib_path)
77
+
78
+ refute_includes($libs.shellsplit, "-lfoo") # note the recipe name is "libfoo"
79
+ assert_includes($libs.shellsplit, static_lib_path)
80
+ assert_match(%r{#{static_lib_path}.*-lxxx}, $libs) # prepend
81
+ end
82
+
83
+ def test_mkmf_config_recipe_INCFLAGS_global_include_dir_does_not_exist
84
+ recipe.mkmf_config
85
+
86
+ refute_includes($INCFLAGS.shellsplit, "-I#{recipe.include_path}")
87
+ end
88
+
89
+ def test_mkmf_config_recipe_INCFLAGS_global
90
+ FileUtils.mkdir_p(recipe.include_path)
91
+
92
+ recipe.mkmf_config
93
+
94
+ assert_includes($INCFLAGS.shellsplit, "-I#{recipe.include_path}")
95
+ assert_match(%r{-I#{recipe.include_path}.*-I/xxx}, $INCFLAGS) # prepend
96
+ end
97
+
98
+ def test_mkmf_config_pkgconf_does_not_exist
99
+ assert_raises(ArgumentError) do
100
+ recipe.mkmf_config(pkg: "foo")
101
+ end
102
+ end
103
+
104
+ def test_mkmf_config_pkgconf_LIBPATH_global_not_static
105
+ # can't get the pkgconf utility to install on windows with ruby 2.3 in CI
106
+ skip if MiniPortile.windows? && RUBY_VERSION < "2.4"
107
+
108
+ recipe.mkmf_config(pkg: "libxml-2.0", dir: LIBXML_PCP)
109
+
110
+ assert_includes($LIBPATH, "/foo/libxml2/2.11.5/lib")
111
+ assert_operator($LIBPATH.index("/foo/libxml2/2.11.5/lib"), :<, $LIBPATH.index("xxx")) # prepend
112
+ refute_includes($LIBPATH, "/foo/zlib/1.3/lib")
113
+
114
+ assert_includes($libs.shellsplit, "-lxml2")
115
+ assert_match(%r{-lxml2.*-lxxx}, $libs) # prepend
116
+ refute_includes($libs.shellsplit, "-lz")
117
+ end
118
+
119
+ def test_mkmf_config_pkgconf_LIBPATH_global_static
120
+ # can't get the pkgconf utility to install on windows with ruby 2.3 in CI
121
+ skip if MiniPortile.windows? && RUBY_VERSION < "2.4"
122
+
123
+ static_lib_path = "/foo/libxml2/2.11.5/lib/libxml2.#{$LIBEXT}"
124
+
125
+ recipe.mkmf_config(pkg: "libxml-2.0", dir: LIBXML_PCP, static: "xml2")
126
+
127
+ refute_includes($LIBPATH, "/foo/libxml2/2.11.5/lib")
128
+ refute_includes($libs.shellsplit, "-lxml2")
129
+ assert_includes($libs.shellsplit, static_lib_path)
130
+ assert_match(%r{#{static_lib_path}.*-lxxx}, $libs) # prepend
131
+
132
+ assert_includes($LIBPATH, "/foo/zlib/1.3/lib") # from --static
133
+ assert_includes($libs.shellsplit, "-lz") # from --static
134
+ end
135
+
136
+ def test_mkmf_config_pkgconf_CFLAGS_global
137
+ # can't get the pkgconf utility to install on windows with ruby 2.3 in CI
138
+ skip if MiniPortile.windows? && RUBY_VERSION < "2.4"
139
+
140
+ recipe.mkmf_config(pkg: "libxml-2.0", dir: LIBXML_PCP)
141
+
142
+ assert_includes($INCFLAGS.shellsplit, "-I/foo/libxml2/2.11.5/include/libxml2")
143
+ assert_match(%r{-I/foo/libxml2/2.11.5/include/libxml2.*-I/xxx}, $INCFLAGS) # prepend
144
+
145
+ assert_includes($CFLAGS.shellsplit, "-ggdb3")
146
+ assert_match(%r{-xxx.*-ggdb3}, $CFLAGS) # append
147
+
148
+ assert_includes($CXXFLAGS.shellsplit, "-ggdb3")
149
+ assert_match(%r{-xxx.*-ggdb3}, $CXXFLAGS) # append
150
+ end
151
+
152
+ def test_mkmf_config_pkgconf_path_accumulation
153
+ # can't get the pkgconf utility to install on windows with ruby 2.3 in CI
154
+ skip if MiniPortile.windows? && RUBY_VERSION < "2.4"
155
+
156
+ (ENV["PKG_CONFIG_PATH"] || "").split(File::PATH_SEPARATOR).tap do |pcpaths|
157
+ refute_includes(pcpaths, LIBXML_PCP)
158
+ refute_includes(pcpaths, LIBXSLT_PCP)
159
+ end
160
+
161
+ make_recipe("libxml2", "2.11.5").tap do |recipe|
162
+ recipe.mkmf_config(pkg: "libxml-2.0", dir: LIBXML_PCP, static: "xml2")
163
+
164
+ ENV["PKG_CONFIG_PATH"].split(File::PATH_SEPARATOR).tap do |pcpaths|
165
+ assert_includes(pcpaths, LIBXML_PCP)
166
+ refute_includes(pcpaths, LIBXSLT_PCP)
167
+ end
168
+ end
169
+
170
+ make_recipe("libxslt", "1.13.8").tap do |recipe|
171
+ recipe.mkmf_config(pkg: "libxslt", dir: LIBXSLT_PCP, static: "xslt")
172
+
173
+ ENV["PKG_CONFIG_PATH"].split(File::PATH_SEPARATOR).tap do |pcpaths|
174
+ assert_includes(pcpaths, LIBXML_PCP)
175
+ assert_includes(pcpaths, LIBXSLT_PCP)
176
+ end
177
+
178
+ recipe.mkmf_config(pkg: "libexslt", dir: LIBXSLT_PCP, static: "exslt")
179
+ end
180
+
181
+ $INCFLAGS.shellsplit.tap do |incflags|
182
+ assert_includes(incflags, "-I/foo/libxml2/2.11.5/include/libxml2")
183
+ assert_includes(incflags, "-I/foo/libxslt/1.1.38/include")
184
+ end
185
+ $CFLAGS.shellsplit.tap do |cflags|
186
+ assert_includes(cflags, "-ggdb3")
187
+ assert_includes(cflags, "-Wno-deprecated-enum-enum-conversion")
188
+ end
189
+ refute_includes($LIBPATH, "/foo/libxml2/2.11.5/lib")
190
+ refute_includes($LIBPATH, "/foo/libxslt/1.1.38/lib")
191
+ assert_includes($LIBPATH, "/foo/zlib/1.3/lib") # from `--static`
192
+ $libs.shellsplit.tap do |libflags|
193
+ refute_includes(libflags, "-lxml2")
194
+ assert_includes(libflags, "/foo/libxml2/2.11.5/lib/libxml2.#{$LIBEXT}")
195
+ refute_includes(libflags, "-lxslt")
196
+ assert_includes(libflags, "/foo/libxslt/1.1.38/lib/libxslt.#{$LIBEXT}")
197
+ refute_includes(libflags, "-lexslt")
198
+ assert_includes(libflags, "/foo/libxslt/1.1.38/lib/libexslt.#{$LIBEXT}")
199
+ assert_includes(libflags, "-lz") # from `--static`
200
+ end
201
+ end
202
+ end
@@ -0,0 +1,18 @@
1
+ require File.expand_path('../helper', __FILE__)
2
+
3
+ class TestRecipe < TestCase
4
+ def test_path
5
+ recipe = MiniPortile.new("libfoo", "1.0.0")
6
+ assert_equal(File.expand_path(File.join(recipe.target, recipe.host, recipe.name, recipe.version)), recipe.path)
7
+ end
8
+
9
+ def test_lib_path
10
+ recipe = MiniPortile.new("libfoo", "1.0.0")
11
+ assert_equal(File.join(recipe.path, "lib"), recipe.lib_path)
12
+ end
13
+
14
+ def test_include_path
15
+ recipe = MiniPortile.new("libfoo", "1.0.0")
16
+ assert_equal(File.join(recipe.path, "include"), recipe.include_path)
17
+ end
18
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_portile2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Lavena
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-12-02 00:00:00.000000000 Z
13
+ date: 2023-10-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -18,104 +18,102 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '1.17'
21
+ version: '2.2'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '1.17'
28
+ version: '2.2'
29
29
  - !ruby/object:Gem::Dependency
30
- name: rake
30
+ name: minitar
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '12.0'
35
+ version: '0.9'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '12.0'
42
+ version: '0.9'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: minitest
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '5.11'
49
+ version: '5.15'
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: '5.11'
56
+ version: '5.15'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: minitest-hooks
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: 1.5.0
63
+ version: '1.5'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: 1.5.0
70
+ version: '1.5'
71
71
  - !ruby/object:Gem::Dependency
72
- name: minitar
72
+ name: rake
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '0.7'
77
+ version: '13.0'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: '0.7'
84
+ version: '13.0'
85
85
  - !ruby/object:Gem::Dependency
86
- name: concourse
86
+ name: webrick
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: '0.16'
91
+ version: '1.7'
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: '0.16'
99
- description: Simplistic port-like solution for developers. It provides a standard
100
- and simplified way to compile against dependency libraries without messing up your
101
- system.
98
+ version: '1.7'
99
+ description: |
100
+ Simple autoconf and cmake builder for developers. It provides a standard way to compile against
101
+ dependency libraries without requiring system-wide installation. It also simplifies
102
+ vendoring and cross-compilation by providing a consistent build interface.
102
103
  email: mike.dalessio@gmail.com
103
104
  executables: []
104
105
  extensions: []
105
106
  extra_rdoc_files: []
106
107
  files:
107
- - ".concourse.yml"
108
+ - ".github/FUNDING.yml"
109
+ - ".github/workflows/ci.yml"
108
110
  - ".gitignore"
109
- - ".travis.yml"
110
111
  - CHANGELOG.md
111
112
  - Gemfile
112
113
  - LICENSE.txt
113
114
  - README.md
114
115
  - Rakefile
115
- - appveyor.yml
116
- - concourse/mini_portile.yml
117
- - concourse/tasks/rake-test/task.ps1
118
- - concourse/tasks/rake-test/task.sh
116
+ - SECURITY.md
119
117
  - lib/mini_portile2.rb
120
118
  - lib/mini_portile2/mini_portile.rb
121
119
  - lib/mini_portile2/mini_portile_cmake.rb
@@ -126,17 +124,24 @@ files:
126
124
  - test/assets/gpg-fixtures/data.asc
127
125
  - test/assets/gpg-fixtures/data.invalid.asc
128
126
  - test/assets/patch 1.diff
127
+ - test/assets/pkgconf/libxml2/libxml-2.0.pc
128
+ - test/assets/pkgconf/libxslt/libexslt.pc
129
+ - test/assets/pkgconf/libxslt/libxslt.pc
129
130
  - test/assets/test mini portile-1.0.0/configure
130
131
  - test/assets/test-cmake-1.0/CMakeLists.txt
131
132
  - test/assets/test-cmake-1.0/hello.c
132
133
  - test/assets/test-download-archive.tar.gz
133
134
  - test/helper.rb
135
+ - test/test_activate.rb
134
136
  - test/test_cmake.rb
135
137
  - test/test_cook.rb
136
138
  - test/test_digest.rb
137
139
  - test/test_download.rb
140
+ - test/test_execute.rb
141
+ - test/test_mkmf_config.rb
138
142
  - test/test_proxy.rb
139
- homepage: http://github.com/flavorjones/mini_portile
143
+ - test/test_recipe.rb
144
+ homepage: https://github.com/flavorjones/mini_portile
140
145
  licenses:
141
146
  - MIT
142
147
  metadata: {}
@@ -148,31 +153,37 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
153
  requirements:
149
154
  - - ">="
150
155
  - !ruby/object:Gem::Version
151
- version: 1.9.2
156
+ version: 2.3.0
152
157
  required_rubygems_version: !ruby/object:Gem::Requirement
153
158
  requirements:
154
159
  - - ">="
155
160
  - !ruby/object:Gem::Version
156
161
  version: '0'
157
162
  requirements: []
158
- rubyforge_project:
159
- rubygems_version: 3.0.0.beta2
163
+ rubygems_version: 3.4.19
160
164
  signing_key:
161
165
  specification_version: 4
162
- summary: Simplistic port-like solution for developers
166
+ summary: Simple autoconf and cmake builder for developers
163
167
  test_files:
164
168
  - test/assets/git/config
165
169
  - test/assets/gpg-fixtures/data
166
170
  - test/assets/gpg-fixtures/data.asc
167
171
  - test/assets/gpg-fixtures/data.invalid.asc
168
172
  - test/assets/patch 1.diff
173
+ - test/assets/pkgconf/libxml2/libxml-2.0.pc
174
+ - test/assets/pkgconf/libxslt/libexslt.pc
175
+ - test/assets/pkgconf/libxslt/libxslt.pc
169
176
  - test/assets/test mini portile-1.0.0/configure
170
177
  - test/assets/test-cmake-1.0/CMakeLists.txt
171
178
  - test/assets/test-cmake-1.0/hello.c
172
179
  - test/assets/test-download-archive.tar.gz
173
180
  - test/helper.rb
181
+ - test/test_activate.rb
174
182
  - test/test_cmake.rb
175
183
  - test/test_cook.rb
176
184
  - test/test_digest.rb
177
185
  - test/test_download.rb
186
+ - test/test_execute.rb
187
+ - test/test_mkmf_config.rb
178
188
  - test/test_proxy.rb
189
+ - test/test_recipe.rb
data/.concourse.yml DELETED
@@ -1,83 +0,0 @@
1
- ---
2
- resources:
3
- - name: mini_portile
4
- type: git
5
- source:
6
- uri: https://github.com/flavorjones/mini_portile
7
- branch: master
8
- jobs:
9
- - name: "Minitest"
10
- plan:
11
- - get: mini_portile
12
- - task: With version 1.9.3
13
- config:
14
- platform: linux
15
- image: docker:///ruby#1.9.3
16
- inputs:
17
- - name: mini_portile
18
- run:
19
- path: bash
20
- args:
21
- - "-c"
22
- - cd mini_portile && bundle install && rake
23
- privileged: false
24
- - task: With version 2.0
25
- config:
26
- platform: linux
27
- image: docker:///ruby#2.0
28
- inputs:
29
- - name: mini_portile
30
- run:
31
- path: bash
32
- args:
33
- - "-c"
34
- - cd mini_portile && bundle install && rake
35
- privileged: false
36
- - task: With version 2.1
37
- config:
38
- platform: linux
39
- image: docker:///ruby#2.1
40
- inputs:
41
- - name: mini_portile
42
- run:
43
- path: bash
44
- args:
45
- - "-c"
46
- - cd mini_portile && bundle install && rake
47
- privileged: false
48
- - task: With version 2.2
49
- config:
50
- platform: linux
51
- image: docker:///ruby#2.2
52
- inputs:
53
- - name: mini_portile
54
- run:
55
- path: bash
56
- args:
57
- - "-c"
58
- - cd mini_portile && bundle install && rake
59
- privileged: false
60
- - task: With version jruby-1.7.23
61
- config:
62
- platform: linux
63
- image: docker:///jruby#1.7.23
64
- inputs:
65
- - name: mini_portile
66
- run:
67
- path: bash
68
- args:
69
- - "-c"
70
- - cd mini_portile && bundle install && rake
71
- privileged: false
72
- - task: With version jruby-9.0.4.0
73
- config:
74
- platform: linux
75
- image: docker:///jruby#9.0.4.0
76
- inputs:
77
- - name: mini_portile
78
- run:
79
- path: bash
80
- args:
81
- - "-c"
82
- - cd mini_portile && bundle install && rake
83
- privileged: false
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- language: ruby
3
- sudo: false
4
- matrix:
5
- include:
6
- - rvm: 1.9.3
7
- - rvm: 2.0
8
- - rvm: 2.1
9
- - rvm: 2.2.5
10
- - rvm: 2.3.1
11
- - rvm: 2.4.0
12
- env:
13
- - RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
14
- - rvm: jruby-1.7
15
- - rvm: jruby-9.1.5.0
data/appveyor.yml DELETED
@@ -1,25 +0,0 @@
1
- ---
2
- install:
3
- - ps: ((New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt', "$env:TMP\ca-bundle.crt"))
4
- - SET SSL_CERT_FILE=%TMP%\ca-bundle.crt
5
- - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
6
- - SET RAKEOPT=-rdevkit
7
- - ruby --version
8
- - gem --version
9
- - bundle install
10
- - gpg --version
11
-
12
- build: off
13
-
14
- test_script:
15
- - bundle exec rake
16
-
17
- environment:
18
- matrix:
19
- - ruby_version: "22-x64"
20
- - ruby_version: "22"
21
- - ruby_version: "21-x64"
22
- - ruby_version: "21"
23
- - ruby_version: "200-x64"
24
- - ruby_version: "200"
25
- - ruby_version: "193"
@@ -1,141 +0,0 @@
1
- groups:
2
- - name: master
3
- jobs:
4
- <% RUBIES[:mri].last(2).each do |ruby_version| %>
5
- - ruby-<%= ruby_version %>
6
- <% end %>
7
- <% RUBIES[:windows].last(2).each do |ruby_version| %>
8
- - win-ruby-<%= ruby_version %>-devkit
9
- <% end %>
10
-
11
- - name: PRs
12
- jobs:
13
- - pr-pending
14
- - ruby-<%= RUBIES[:mri].last %>-pr
15
- - pr-success
16
-
17
- resource_types:
18
- - name: pull-request
19
- type: docker-image
20
- source:
21
- repository: jtarchie/pr
22
-
23
- resources:
24
- - name: ci
25
- type: git
26
- source:
27
- uri: https://github.com/flavorjones/mini_portile/
28
- branch: master
29
- disable_ci_skip: true # always get the latest pipeline configuration
30
-
31
- - name: mini_portile
32
- type: git
33
- source:
34
- uri: https://github.com/flavorjones/mini_portile/
35
- branch: master
36
- ignore_paths:
37
- - concourse/**
38
-
39
- - name: mini_portile-pr
40
- type: pull-request
41
- source:
42
- repo: flavorjones/mini_portile
43
- access_token: {{github-repo-status-access-token}}
44
- ignore_paths:
45
- - concourse/**
46
-
47
- jobs:
48
- #
49
- # master
50
- #
51
- <% RUBIES[:mri].last(2).each do |ruby_version| %>
52
- - name: ruby-<%= ruby_version %>
53
- public: true
54
- plan:
55
- - get: ci
56
- - get: mini_portile
57
- trigger: true
58
- - task: rake-test
59
- config:
60
- platform: linux
61
- image_resource:
62
- type: docker-image
63
- source: {repository: ruby, tag: "<%= ruby_version %>"}
64
- inputs:
65
- - name: ci
66
- - name: mini_portile
67
- run:
68
- path: ci/concourse/tasks/rake-test/task.sh
69
- <% end %>
70
-
71
- <% RUBIES[:windows].last(2).each do |ruby_version| %>
72
- - name: win-ruby-<%= ruby_version %>-devkit
73
- public: true
74
- plan:
75
- - get: ci
76
- - get: mini_portile
77
- trigger: true
78
- - task: rake-test
79
- config:
80
- platform: windows
81
- inputs:
82
- - name: ci
83
- - name: mini_portile
84
- params:
85
- WIN_RUBY_VERSION: "<%= ruby_version %>"
86
- run:
87
- path: powershell
88
- args: ["-File", "ci/concourse/tasks/rake-test/task.ps1"]
89
- <% end %>
90
-
91
- #
92
- # PRs
93
- #
94
- - name: pr-pending
95
- public: true
96
- plan:
97
- - get: ci
98
- - get: mini_portile-pr
99
- trigger: true
100
- version: every
101
- - put: mini_portile-pr
102
- params: {path: mini_portile-pr, status: pending}
103
-
104
- % ruby_version = RUBIES[:mri].last
105
- - name: ruby-<%= ruby_version %>-pr
106
- public: true
107
- serial_groups: [pr]
108
- plan:
109
- - get: ci
110
- - get: mini_portile-pr
111
- trigger: true
112
- version: every
113
- passed: [pr-pending]
114
- - task: rake-test
115
- config:
116
- platform: linux
117
- image_resource:
118
- type: docker-image
119
- source: {repository: ruby, tag: "<%= ruby_version %>"}
120
- inputs:
121
- - name: ci
122
- - name: mini_portile-pr
123
- path: mini_portile
124
- run:
125
- path: ci/concourse/tasks/rake-test/task.sh
126
- on_failure:
127
- put: mini_portile-pr
128
- params: {path: mini_portile-pr, status: failure}
129
-
130
- - name: pr-success
131
- public: true
132
- serial_groups: [pr]
133
- disable_manual_trigger: true
134
- plan:
135
- - get: mini_portile-pr
136
- trigger: true
137
- version: every
138
- passed:
139
- - ruby-<%= ruby_version %>-pr
140
- - put: mini_portile-pr
141
- params: {path: mini_portile-pr, status: success}