Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Full build #260

Closed
wants to merge 2 commits into from

2 participants

@myronmarston

This makes it easy to build against all supported rubies. I'm having issues running things on jruby but I think it's something in my environment that's messed up. I'm getting tons of spec failures on rubinius 1.1.1 so I didn't include it in the list (but you can easily add it once we get it passing). I'm also getting one cuke failures on 1.8.6--the version of flexmock used by a cuke has invalid syntax on 1.8.6.

If you want me to add this for the other repos, let me know. I figured we can start with this, and tweak to your liking before spending the time adding it to the others.

myronmarston added some commits
@myronmarston myronmarston Update Gemfile so it can be used cleanly on lots of rubies.
It now works on:

- MRI 1.8.6
- MRI 1.8.7
- MRI 1.9.1
- MRI 1.9.2
- JRuby 1.5.6
- Rubinius 1.1.1
- REE 1.8.7
a4ee3b3
@myronmarston myronmarston Add scripts that run specs/cukes against all supported rubies.
- script/spec runs specs
- script/cucumber runs cukes
- script/full_build runs both
2456a1f
@dchelimsky
Owner

This falls apart on linecache for me when we get to 1.9.2.

@myronmarston

Weird. It definitely works for me on 1.9.2.

What error are you getting?

@dchelimsky
Owner
Installing linecache (0.43) with native extensions /Users/dchelimsky/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/Users/dchelimsky/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb 
Can't handle 1.9.x yet
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/dchelimsky/.rvm/rubies/ruby-1.9.1-p378/bin/ruby
@myronmarston

That's very, very strange. Linecache should only install on 1.8, not on 1.9. It's a dependency of ruby-debug. The Gemfile limits ruby-debug to 1.8 and has a dependency on ruby-debug19 for 1.9 (which in turn depends on linecache19).

Can you paste your Gemfile.lock as a gist? I'm wondering if you somehow have another gem listed that depends on linecache and is a dependency on 1.9. For reference, my Gemfile.lock is here.

You might try removing your Gemfile.lock (or renaming it) and re-running bundle install. Also, I'm using bundler 1.0.7--what version are you using?

@dchelimsky
Owner

bundler 1.0.7 and already deleted Gemfile.lock and bundled again. Will follow up tonight with more info.

@myronmarston

Add scripts that run specs/cukes against all supported rubies.

  • script/spec runs specs
  • script/cucumber runs cukes
  • script/full_build runs both

Also update Gemfile so it can be used cleanly on lots of rubies.

It now works on:

  • MRI 1.8.6
  • MRI 1.8.7
  • MRI 1.9.1
  • MRI 1.9.2
  • JRuby 1.5.6
  • Rubinius 1.1.1
  • REE 1.8.7

  • Closed by f76caf3

@timcharper timcharper referenced this pull request from a commit in timcharper/rspec-core
@myronmarston myronmarston Add scripts that run specs/cukes against all supported rubies.
- script/spec runs specs
- script/cucumber runs cukes
- script/full_build runs both

Also update Gemfile so it can be used cleanly on lots of rubies.

It now works on:

- MRI 1.8.6
- MRI 1.8.7
- MRI 1.9.1
- MRI 1.9.2
- JRuby 1.5.6
- Rubinius 1.1.1
- REE 1.8.7

- Closes #260
f76caf3
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 23, 2010
  1. @myronmarston

    Update Gemfile so it can be used cleanly on lots of rubies.

    myronmarston authored
    It now works on:
    
    - MRI 1.8.6
    - MRI 1.8.7
    - MRI 1.9.1
    - MRI 1.9.2
    - JRuby 1.5.6
    - Rubinius 1.1.1
    - REE 1.8.7
Commits on Dec 24, 2010
  1. @myronmarston

    Add scripts that run specs/cukes against all supported rubies.

    myronmarston authored
    - script/spec runs specs
    - script/cucumber runs cukes
    - script/full_build runs both
This page is out of date. Refresh to see the latest.
View
13 Gemfile
@@ -14,7 +14,7 @@ end
gem "rake", "0.8.7"
gem "cucumber", "0.9.4"
gem "aruba", "0.2.2"
-gem "rcov", "0.9.9"
+gem "rcov", "0.9.9", :platforms => :mri
gem "relish", "0.2.0"
gem "guard-rspec", "0.1.9"
gem "growl", "1.0.3"
@@ -26,10 +26,15 @@ if RUBY_PLATFORM =~ /darwin/
gem "autotest-growl", "~> 0.2.9"
end
-gem "ruby-debug", :platforms => :ruby_18
-gem "ruby-debug19", "~> 0.11.6", :platforms => :ruby_19
+gem "ruby-debug", :platforms => :mri_18
+gem "ruby-debug19", "~> 0.11.6", :platforms => :mri_19
-platforms :ruby_18, :ruby_19 do
+case RUBY_VERSION
+ when '1.9.1'; gem 'ruby-debug-base19', '0.11.23'
+ when '1.9.2'; gem 'ruby-debug-base19', '0.11.24'
+end
+
+platforms :mri_18, :mri_19 do
gem "rb-fsevent", "~> 0.3.9"
gem "ruby-prof", "~> 0.9.2"
end
View
63 script/FullBuildRakeFile
@@ -0,0 +1,63 @@
+# this is in a separate rakefile because our main one depends on the bundled gems
+# already being installed. This must be able to run w/o bundled gems installed.
+
+def rake(command = "")
+ sh "rake #{command}"
+end
+
+desc "Run a full build: install necessary gems with bundler, runs specs, run cukes"
+task :build => :bundle_install do
+ rake
+end
+
+desc "Install necessary gems with bundler and runs specs"
+task :spec => :bundle_install do
+ rake "spec"
+end
+
+desc "Install necessary gems with bundler and runs cukes"
+task :cucumber => :bundle_install do
+ rake "cucumber"
+end
+
+desc "Prints description of current ruby interpreter"
+task :print_ruby_description do
+ description = if defined?(RUBY_DESCRIPTION)
+ RUBY_DESCRIPTION
+ else
+ # RUBY_DESCRIPTION is undefined on 1.8.6
+ "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]"
+ end
+
+ puts
+ puts "=" * 80
+ puts "Using #{description}"
+ puts "=" * 80
+ puts
+end
+
+task :bundle_install => :ensure_bundler_installed do
+ # Unfortunately, there is no version of ruby-debug that installs cleanly on 1.9.1 and 1.9.2.
+ # Our Gemfile specifies different versions using conditionals, but we still need to bundle update
+ # to get bundler to use the different versions.
+ if RUBY_VERSION =~ /^1\.9/
+ sh "bundle update ruby-debug-base19"
+ end
+
+ sh "bundle install"
+end
+
+task :ensure_bundler_installed => :print_ruby_description do
+ installed = begin
+ require 'rubygems'
+ require 'bundler'
+ true
+ rescue LoadError
+ false
+ end
+
+ unless installed
+ sh "gem install bundler"
+ end
+end
+
View
1  script/cucumber
@@ -0,0 +1 @@
+rvm 1.8.6,1.8.7,ree,1.9.1,1.9.2,jruby rake -f script/FullBuildRakeFile cucumber | tee tmp/cucumber.out
View
1  script/full_build
@@ -0,0 +1 @@
+rvm 1.8.6,1.8.7,ree,1.9.1,1.9.2,jruby rake -f script/FullBuildRakeFile build | tee tmp/full_build.out
View
1  script/spec
@@ -0,0 +1 @@
+rvm 1.8.6,1.8.7,ree,1.9.1,1.9.2,jruby rake -f script/FullBuildRakeFile spec | tee tmp/spec.out
Something went wrong with that request. Please try again.