Skip to content

Commit

Permalink
ci: build and test native linux gem
Browse files Browse the repository at this point in the history
test it against all supported ruby versions, plus musl (alpine)

related to #1984
  • Loading branch information
flavorjones committed Mar 30, 2020
1 parent 18c151d commit c6ba5c3
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 0 deletions.
3 changes: 3 additions & 0 deletions concourse/common_prelude.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
"suppressions/**",
".github/**",
].to_json

cross_rubies_path = File.join(File.dirname(__FILE__), "..", ".cross_rubies")
$native_ruby_versions = File.read(cross_rubies_path).split("\n").map { |line| line.split(":").first.split(".").take(2).join(".") }.uniq.sort
56 changes: 56 additions & 0 deletions concourse/nokogiri-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,62 @@ jobs:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh


- name: native-gem-test
public: true
on_failure: { in_parallel: [*notify_failure_to_irc, *notify_failure_to_pr] }
plan:
- get: ci
- get: nokogiri-pr
trigger: true
version: every
passed: ["gate-2"]
- task: build
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "larskanis/rake-compiler-dock-mri-x86_64-linux", tag: "<%= RakeCompilerDock::IMAGE_VERSION %>"}
inputs:
- name: ci
- name: nokogiri-pr
path: nokogiri
outputs:
- name: gems
params:
BUILD_NATIVE_GEM: t
run:
path: ci/concourse/tasks/gem-test/gem-build.sh
- in_parallel:
% $native_ruby_versions.each do |ruby_version|
- task: install-and-test-<%= ruby_version %>
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-<%= ruby_version %>"}
inputs:
- name: ci
- name: nokogiri-pr
path: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
% end
- task: install-and-test-on-musl
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "alpine"}
inputs:
- name: ci
- name: nokogiri-pr
path: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh


- name: gem-test-java
public: true
on_failure: { in_parallel: [*notify_failure_to_irc, *notify_failure_to_pr] }
Expand Down
93 changes: 93 additions & 0 deletions concourse/nokogiri-pr.yml.generated
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,99 @@ jobs:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh


- name: native-gem-test
public: true
on_failure: { in_parallel: [*notify_failure_to_irc, *notify_failure_to_pr] }
plan:
- get: ci
- get: nokogiri-pr
trigger: true
version: every
passed: ["gate-2"]
- task: build
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "larskanis/rake-compiler-dock-mri-x86_64-linux", tag: "1.0.0"}
inputs:
- name: ci
- name: nokogiri-pr
path: nokogiri
outputs:
- name: gems
params:
BUILD_NATIVE_GEM: t
run:
path: ci/concourse/tasks/gem-test/gem-build.sh
- in_parallel:
- task: install-and-test-2.4
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-2.4"}
inputs:
- name: ci
- name: nokogiri-pr
path: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
- task: install-and-test-2.5
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-2.5"}
inputs:
- name: ci
- name: nokogiri-pr
path: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
- task: install-and-test-2.6
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-2.6"}
inputs:
- name: ci
- name: nokogiri-pr
path: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
- task: install-and-test-2.7
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-2.7"}
inputs:
- name: ci
- name: nokogiri-pr
path: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
- task: install-and-test-on-musl
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "alpine"}
inputs:
- name: ci
- name: nokogiri-pr
path: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh


- name: gem-test-java
public: true
on_failure: { in_parallel: [*notify_failure_to_irc, *notify_failure_to_pr] }
Expand Down
53 changes: 53 additions & 0 deletions concourse/nokogiri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,59 @@ jobs:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh


- name: native-gem-test
public: true
on_failure: *notify_failure_to_irc
plan:
- get: ci
- get: nokogiri
trigger: true
version: every
passed: ["gate-2"]
- task: build
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "larskanis/rake-compiler-dock-mri-x86_64-linux", tag: "<%= RakeCompilerDock::IMAGE_VERSION %>"}
inputs:
- name: ci
- name: nokogiri
outputs:
- name: gems
params:
BUILD_NATIVE_GEM: t
run:
path: ci/concourse/tasks/gem-test/gem-build.sh
- in_parallel:
% $native_ruby_versions.each do |ruby_version|
- task: install-and-test-<%= ruby_version %>
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-<%= ruby_version %>"}
inputs:
- name: ci
- name: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
% end
- task: install-and-test-on-musl
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "alpine"}
inputs:
- name: ci
- name: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh


- name: gem-test-java
public: true
on_failure: *notify_failure_to_irc
Expand Down
87 changes: 87 additions & 0 deletions concourse/nokogiri.yml.generated
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,93 @@ jobs:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh


- name: native-gem-test
public: true
on_failure: *notify_failure_to_irc
plan:
- get: ci
- get: nokogiri
trigger: true
version: every
passed: ["gate-2"]
- task: build
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "larskanis/rake-compiler-dock-mri-x86_64-linux", tag: "1.0.0"}
inputs:
- name: ci
- name: nokogiri
outputs:
- name: gems
params:
BUILD_NATIVE_GEM: t
run:
path: ci/concourse/tasks/gem-test/gem-build.sh
- in_parallel:
- task: install-and-test-2.4
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-2.4"}
inputs:
- name: ci
- name: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
- task: install-and-test-2.5
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-2.5"}
inputs:
- name: ci
- name: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
- task: install-and-test-2.6
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-2.6"}
inputs:
- name: ci
- name: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
- task: install-and-test-2.7
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "mri-2.7"}
inputs:
- name: ci
- name: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh
- task: install-and-test-on-musl
config:
platform: linux
image_resource:
type: registry-image
source: {repository: "flavorjones/nokogiri-test", tag: "alpine"}
inputs:
- name: ci
- name: nokogiri
- name: gems
run:
path: ci/concourse/tasks/gem-test/gem-install-and-test.sh


- name: gem-test-java
public: true
on_failure: *notify_failure_to_irc
Expand Down

0 comments on commit c6ba5c3

Please sign in to comment.