From aec6e976a11728ec2fc78946f308b28d9b2522a3 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:02:39 +0900 Subject: [PATCH 01/10] Set up CI with Azure Pipelines --- azure-pipelines.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..6cd30e84d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,23 @@ +# Ruby +# Package your Ruby project. +# Add steps that install rails, analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/ruby + +trigger: +- master + +pool: + vmImage: 'Ubuntu-16.04' + +steps: +- task: UseRubyVersion@0 + inputs: + versionSpec: '>= 2.5' + +- script: | + gem install bundler + bundle install --retry=3 --jobs=4 + displayName: 'bundle install' + +- script: bundle exec rake + displayName: 'bundle exec rake' From 48a5f2e9b888dd5eb1aa9c7aa624c4191a4c2bae Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:12:04 +0900 Subject: [PATCH 02/10] Applied matrix build for the multiple platforms. --- azure-pipelines.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6cd30e84d..d109c2fca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,21 +3,24 @@ # Add steps that install rails, analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/ruby -trigger: -- master - -pool: - vmImage: 'Ubuntu-16.04' +strategy: + matrix: + linux: + imageName: 'ubuntu-16.04' + mac: + imageName: 'macos-10.13' + windows: + imageName: 'vs2017-win2016' steps: - task: UseRubyVersion@0 inputs: - versionSpec: '>= 2.5' + versionSpec: '>= 2.0' - script: | gem install bundler bundle install --retry=3 --jobs=4 displayName: 'bundle install' -- script: bundle exec rake - displayName: 'bundle exec rake' +- script: ruby -Ilib exe/rake + displayName: 'ruby -Ilib exe/rake' From 4b89261e210a7b12c33c3ef07f54f51e98a2ae70 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:24:03 +0900 Subject: [PATCH 03/10] Added missing vmImage --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d109c2fca..4130122d7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,6 +12,9 @@ strategy: windows: imageName: 'vs2017-win2016' +pool: + vmImage: $(imageName) + steps: - task: UseRubyVersion@0 inputs: From c4d03c365b8d9ad3e69cc1c3abcceb8149de7f05 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:46:04 +0900 Subject: [PATCH 04/10] Extracted ruby versions for matrix --- azure-pipelines.yml | 91 +++++++++++++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 27 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4130122d7..2962b9468 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,29 +1,66 @@ -# Ruby -# Package your Ruby project. -# Add steps that install rails, analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/ruby +jobs: +- job: Linux + pool: + vmImage: 'ubuntu-16.04' + strategy: + matrix: + ruby 2.3: + ruby_version: '2.3.7' + ruby 2.4: + ruby_version: '2.4.4' + ruby 2.5: + ruby_version: '2.5.1' + steps: + - task: UseRubyVersion@0 + inputs: + versionSpec: $(ruby_version) + - script: | + gem install bundler + bundle install --retry=3 --jobs=4 + displayName: 'bundle install' + - script: ruby -Ilib exe/rake + displayName: 'ruby -Ilib exe/rake' -strategy: - matrix: - linux: - imageName: 'ubuntu-16.04' - mac: - imageName: 'macos-10.13' - windows: - imageName: 'vs2017-win2016' +- job: macOS + pool: + vmImage: 'macos-10.13' + strategy: + matrix: + ruby 2.3: + ruby_version: '2.3.7' + ruby 2.4: + ruby_version: '2.4.4' + ruby 2.5: + ruby_version: '2.5.1' + steps: + - task: UseRubyVersion@0 + inputs: + versionSpec: $(ruby_version) + - script: | + gem install bundler + bundle install --retry=3 --jobs=4 + displayName: 'bundle install' + - script: ruby -Ilib exe/rake + displayName: 'ruby -Ilib exe/rake' -pool: - vmImage: $(imageName) - -steps: -- task: UseRubyVersion@0 - inputs: - versionSpec: '>= 2.0' - -- script: | - gem install bundler - bundle install --retry=3 --jobs=4 - displayName: 'bundle install' - -- script: ruby -Ilib exe/rake - displayName: 'ruby -Ilib exe/rake' +- job: Windows + pool: + vmImage: 'vs2017-win2016' + strategy: + matrix: + ruby 2.3: + ruby_version: '2.3.7' + ruby 2.4: + ruby_version: '2.4.4' + ruby 2.5: + ruby_version: '2.5.1' + steps: + - task: UseRubyVersion@0 + inputs: + versionSpec: $(ruby_version) + - script: | + gem install bundler + bundle install --retry=3 --jobs=4 + displayName: 'bundle install' + - script: ruby -Ilib exe/rake + displayName: 'ruby -Ilib exe/rake' From b29bae23b67993e41a710ad80f7de643edfed04d Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 20:50:38 +0900 Subject: [PATCH 05/10] Removed non supported versions. --- azure-pipelines.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2962b9468..04ab270ee 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,12 +26,8 @@ jobs: vmImage: 'macos-10.13' strategy: matrix: - ruby 2.3: - ruby_version: '2.3.7' - ruby 2.4: - ruby_version: '2.4.4' - ruby 2.5: - ruby_version: '2.5.1' + ruby 2.6: + ruby_version: '2.6.1' steps: - task: UseRubyVersion@0 inputs: @@ -48,12 +44,10 @@ jobs: vmImage: 'vs2017-win2016' strategy: matrix: - ruby 2.3: - ruby_version: '2.3.7' ruby 2.4: - ruby_version: '2.4.4' + ruby_version: '2.4.3' ruby 2.5: - ruby_version: '2.5.1' + ruby_version: '2.5.0' steps: - task: UseRubyVersion@0 inputs: From 54861dc265434cc24ed7baa59c22322613d68a02 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 21:02:09 +0900 Subject: [PATCH 06/10] Rename --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 04ab270ee..98c7b8809 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: ruby 2.6: - ruby_version: '2.6.1' + ruby_version: '2.6.1p33' steps: - task: UseRubyVersion@0 inputs: From a43a3b7871a47b0b5cf96cb5515ed67edae3270b Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 21:06:34 +0900 Subject: [PATCH 07/10] Ignore matrix build for macOS --- azure-pipelines.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 98c7b8809..555079d41 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,14 +24,10 @@ jobs: - job: macOS pool: vmImage: 'macos-10.13' - strategy: - matrix: - ruby 2.6: - ruby_version: '2.6.1p33' steps: - task: UseRubyVersion@0 inputs: - versionSpec: $(ruby_version) + versionSpec: '>= 2.4' - script: | gem install bundler bundle install --retry=3 --jobs=4 From 77448726bb057c8ba90a8d12ab6e20ad60dac976 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 21:09:48 +0900 Subject: [PATCH 08/10] Do not specify ruby version of macOS --- azure-pipelines.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 555079d41..d804993f3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,9 +25,6 @@ jobs: pool: vmImage: 'macos-10.13' steps: - - task: UseRubyVersion@0 - inputs: - versionSpec: '>= 2.4' - script: | gem install bundler bundle install --retry=3 --jobs=4 From 72ffa2ea89f96df2307158fa151825dbb2c28ddf Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Tue, 26 Feb 2019 21:19:01 +0900 Subject: [PATCH 09/10] use realpath --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 8e061fa45..64f7db7e2 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -28,7 +28,7 @@ class TaskManager include Rake::TaskManager end - RUBY = ENV["BUNDLE_RUBY"] || Gem.ruby + RUBY = File.realpath(ENV["BUNDLE_RUBY"] || Gem.ruby) def setup ARGV.clear From 77eb6d87cb69c2cc531f72d4aa1948054e9d077f Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Mon, 4 Mar 2019 11:52:13 +0900 Subject: [PATCH 10/10] Only enabled macOS environment --- azure-pipelines.yml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d804993f3..19cce3eeb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,26 +1,4 @@ jobs: -- job: Linux - pool: - vmImage: 'ubuntu-16.04' - strategy: - matrix: - ruby 2.3: - ruby_version: '2.3.7' - ruby 2.4: - ruby_version: '2.4.4' - ruby 2.5: - ruby_version: '2.5.1' - steps: - - task: UseRubyVersion@0 - inputs: - versionSpec: $(ruby_version) - - script: | - gem install bundler - bundle install --retry=3 --jobs=4 - displayName: 'bundle install' - - script: ruby -Ilib exe/rake - displayName: 'ruby -Ilib exe/rake' - - job: macOS pool: vmImage: 'macos-10.13' @@ -31,23 +9,3 @@ jobs: displayName: 'bundle install' - script: ruby -Ilib exe/rake displayName: 'ruby -Ilib exe/rake' - -- job: Windows - pool: - vmImage: 'vs2017-win2016' - strategy: - matrix: - ruby 2.4: - ruby_version: '2.4.3' - ruby 2.5: - ruby_version: '2.5.0' - steps: - - task: UseRubyVersion@0 - inputs: - versionSpec: $(ruby_version) - - script: | - gem install bundler - bundle install --retry=3 --jobs=4 - displayName: 'bundle install' - - script: ruby -Ilib exe/rake - displayName: 'ruby -Ilib exe/rake'