From 413c742eca5af9ce9c2b9b2d2f907202bca174e9 Mon Sep 17 00:00:00 2001 From: Igor Makarov Date: Sat, 18 Jan 2020 17:09:49 +0200 Subject: [PATCH 1/4] don't build on ruby 2.0.0 + add linux --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7b757a9b..bde78fd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ -os: osx +os: + - osx + - linux language: ruby install: true @@ -11,7 +13,8 @@ gemfile: - gemfiles/Gemfile.xcodeproj-edge rvm: - 2.5.0 - - ruby-2.0.0-p648 + - 2.6.0 + - 2.7.0 before_script: - gem install bundler -v "~> 1.17" From 3dbd8aee1ede3d3ac507720357b2a3baa3d07dd5 Mon Sep 17 00:00:00 2001 From: Igor Makarov Date: Sat, 18 Jan 2020 17:19:45 +0200 Subject: [PATCH 2/4] disable xcodebuild integration test on Linux --- spec/integration_spec.rb | 17 +++++++++++------ xcake.gemspec | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index 9086a660..7578395d 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' require 'yaml' require 'simplecov' +require 'os' SimpleCov.command_name 'test:integration' @@ -61,13 +62,17 @@ def self.list_files(directory) expect(Dir['temp/*.xcodeproj']).to eq(%w(temp/Project.xcodeproj)) end end - it 'Should build fixture with xcodebuild with no errors' do - Dir.chdir(fixture) do - Xcake.make_helper - Dir.chdir('temp') do - expect('xcodebuild clean build -sdk iphonesimulator &> xcode_output.txt').to succeed + + # this cannot be tested on any OS other than macOS + if OS.mac? + it 'Should build fixture with xcodebuild with no errors' do + Dir.chdir(fixture) do + Xcake.make_helper + Dir.chdir('temp') do + expect('xcodebuild clean build -sdk iphonesimulator &> xcode_output.txt').to succeed + end + expect(Xcake.list_files('temp')).to include(*Xcake.list_files('output')) end - expect(Xcake.list_files('temp')).to include(*Xcake.list_files('output')) end end end diff --git a/xcake.gemspec b/xcake.gemspec index 45fa4600..762e6424 100644 --- a/xcake.gemspec +++ b/xcake.gemspec @@ -31,6 +31,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength spec.add_dependency 'activesupport', '< 5' spec.add_development_dependency 'bundler', '>= 1.10' + spec.add_development_dependency 'os', '~> 1.0' spec.add_development_dependency 'pry', '~> 0.10' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' From 30eaf060aafbd727d03c4cef4eb8721fb4bf69d9 Mon Sep 17 00:00:00 2001 From: Igor Makarov Date: Sat, 18 Jan 2020 17:38:23 +0200 Subject: [PATCH 3/4] add LINT task --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index bde78fd8..37aa930c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,12 @@ rvm: - 2.6.0 - 2.7.0 +matrix: + include: + - rvm: 2.7.0 + os: linux + env: XCAKE_CI_TASKS=LINT + before_script: - gem install bundler -v "~> 1.17" - bundle install --jobs=3 From b94f208a33340e1882777e707339db662fffe0d1 Mon Sep 17 00:00:00 2001 From: Igor Makarov Date: Sat, 18 Jan 2020 17:45:51 +0200 Subject: [PATCH 4/4] pin rubocop version --- xcake.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/xcake.gemspec b/xcake.gemspec index 762e6424..14969faa 100644 --- a/xcake.gemspec +++ b/xcake.gemspec @@ -38,6 +38,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rb-readline', '~> 0.5.4' spec.add_development_dependency 'rspec', '~> 3.4.0' + spec.add_development_dependency 'rubocop', '~> 0.64.0' spec.add_development_dependency 'rubocop-git', '~> 0.1.1' spec.add_development_dependency 'simplecov' spec.add_development_dependency 'yard', '~> 0.9'