From ef23f6ac65e51eb94df2dc574b7d8cbc86e85c06 Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 21:08:38 -0500 Subject: [PATCH 01/17] only run C spec compiled with Clang In order to make sure we have valid failures on this branch, and not just a bunch of false negatives, we're only running the C specs, and building with clang. Eventually, we'll merge in support for gcc and more of the test suite. For now, we want to only include the specs we things should be passing --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 68d731a..b396e9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,12 @@ rvm: - 1.9.2 - 1.8.7 - rbx-2.2.3 +env: CXX=clang++ notifications: recipients: - cowboyd@thefrontside.net before_install: - gem update --system 2.1.11 -script: bundle exec rake compile spec +script: + - bundle exec rake compile + - bundle exec rspec spec/c From bc6668a8a3a04850bf20a9c688709cc8f642dd58 Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 21:13:09 -0500 Subject: [PATCH 02/17] allow failures on older versions of ruby. We can decide whether to backport later --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index b396e9b..9e0ad5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,11 @@ rvm: - 1.8.7 - rbx-2.2.3 env: CXX=clang++ +matrix: + allow_failures: + - rvm: 1.9.3 + - rvm: 1.9.2 + - rvm: 1.8.7 notifications: recipients: - cowboyd@thefrontside.net From e82006e900f59a471dfc289b92bd159196fa1692 Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 21:23:58 -0500 Subject: [PATCH 03/17] use clang for CC too? --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9e0ad5d..694fb51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,9 @@ rvm: - 1.9.2 - 1.8.7 - rbx-2.2.3 -env: CXX=clang++ +env: + - CC=clang + - CXX=clang++ matrix: allow_failures: - rvm: 1.9.3 From bd88a6c831a9c2e31fb98d35d99fe6603248b1f7 Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 22:28:29 -0500 Subject: [PATCH 04/17] install modern g++ and clang befondhand --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.travis.yml b/.travis.yml index 694fb51..6cdc394 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,3 +22,17 @@ before_install: script: - bundle exec rake compile - bundle exec rspec spec/c +sudo: false +compiler: + - gcc + - clang +install: +- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.8 + - g++-4.8 + - clang From e58b7aabecbe35c1a082e7047f2d92da11d0fbaa Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 22:33:06 -0500 Subject: [PATCH 05/17] let travis set the compiler, don't override the install --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6cdc394..12c2b27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,6 @@ rvm: - 1.9.2 - 1.8.7 - rbx-2.2.3 -env: - - CC=clang - - CXX=clang++ matrix: allow_failures: - rvm: 1.9.3 @@ -27,7 +24,8 @@ compiler: - gcc - clang install: -- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi + - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi + - bundle install addons: apt: sources: From c4b6a5c7d89acccb1189aa72d07a91977ffd9d2a Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 22:47:58 -0500 Subject: [PATCH 06/17] attempt with just gcc-4.8 --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 12c2b27..fa48ea3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ rvm: - 1.9.2 - 1.8.7 - rbx-2.2.3 +env: CXX=g++-4.8 matrix: allow_failures: - rvm: 1.9.3 @@ -20,12 +21,6 @@ script: - bundle exec rake compile - bundle exec rspec spec/c sudo: false -compiler: - - gcc - - clang -install: - - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi - - bundle install addons: apt: sources: From ea4cd3baab7becba5ab2822b1ef2098cdc51e78d Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 22:52:33 -0500 Subject: [PATCH 07/17] still have some command lines to debug, so lets try clang --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fa48ea3..6ea4c56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ rvm: - 1.9.2 - 1.8.7 - rbx-2.2.3 -env: CXX=g++-4.8 +env: CXX=clang++ matrix: allow_failures: - rvm: 1.9.3 From 2a5bf751ac7214ad4cbb580ac4d8a514ea8994ff Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 22:57:14 -0500 Subject: [PATCH 08/17] what versions do we have anyhow? --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6ea4c56..e886843 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,8 @@ notifications: before_install: - gem update --system 2.1.11 script: + - g++ --version + - clang++ --version - bundle exec rake compile - bundle exec rspec spec/c sudo: false From 73dce99124d29b753f67ca7dbec7b0a60a6a9256 Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 23:06:03 -0500 Subject: [PATCH 09/17] print some docs --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e886843..5e692a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ rvm: - 1.9.2 - 1.8.7 - rbx-2.2.3 -env: CXX=clang++ +env: CXX=g++-4.8 matrix: allow_failures: - rvm: 1.9.3 @@ -19,7 +19,9 @@ before_install: - gem update --system 2.1.11 script: - g++ --version + - g++-4.8 --version - clang++ --version + - ls /usr/bin/clang* - bundle exec rake compile - bundle exec rspec spec/c sudo: false From f13b23bff0beb03ac87ec6d8d000792a5ffaa9cd Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 23:12:45 -0500 Subject: [PATCH 10/17] print out contents of CXX and CC --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e692a5..b10e230 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,9 @@ rvm: - 1.9.2 - 1.8.7 - rbx-2.2.3 -env: CXX=g++-4.8 +env: + - CXX=g++-4.8 + - CC=gcc-4.8 matrix: allow_failures: - rvm: 1.9.3 @@ -18,10 +20,8 @@ notifications: before_install: - gem update --system 2.1.11 script: - - g++ --version - - g++-4.8 --version - - clang++ --version - - ls /usr/bin/clang* + - $(CXX) --version + - $(CC) --version - bundle exec rake compile - bundle exec rspec spec/c sudo: false From 31043be8a2829e3e722b4265c2adef587ea580d2 Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 23:14:36 -0500 Subject: [PATCH 11/17] properly use shell variables --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b10e230..3acc8d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,8 +20,8 @@ notifications: before_install: - gem update --system 2.1.11 script: - - $(CXX) --version - - $(CC) --version + - $CXX --version + - $CC --version - bundle exec rake compile - bundle exec rspec spec/c sudo: false From 78f507aa9502fedcc81e6e1a2f5a6bd952c19111 Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sat, 11 Jul 2015 23:43:27 -0500 Subject: [PATCH 12/17] environment variables are not being set, hardcode for now --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3acc8d3..e02df34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,6 @@ rvm: - 1.9.2 - 1.8.7 - rbx-2.2.3 -env: - - CXX=g++-4.8 - - CC=gcc-4.8 matrix: allow_failures: - rvm: 1.9.3 @@ -20,9 +17,7 @@ notifications: before_install: - gem update --system 2.1.11 script: - - $CXX --version - - $CC --version - - bundle exec rake compile + - CXX=g++-4.8 bundle exec rake compile - bundle exec rspec spec/c sudo: false addons: From e1fbdb4162361d5ff6769864dbfd70bcb2c5c7df Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sun, 12 Jul 2015 14:05:26 -0500 Subject: [PATCH 13/17] allow using a custom compiler --- .travis.yml | 3 +++ ext/v8/extconf.rb | 1 + 2 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index e02df34..692cbb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,9 @@ matrix: - rvm: 1.9.3 - rvm: 1.9.2 - rvm: 1.8.7 +env: + - CXX=g++-4.8 + - CXX=clang++ notifications: recipients: - cowboyd@thefrontside.net diff --git a/ext/v8/extconf.rb b/ext/v8/extconf.rb index 5ec06bf..9896721 100644 --- a/ext/v8/extconf.rb +++ b/ext/v8/extconf.rb @@ -1,4 +1,5 @@ require 'mkmf' +RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX'] have_library('pthread') have_library('objc') if RUBY_PLATFORM =~ /darwin/ From d18f479967c4d2d8ac22c7aa49f1df8dd6db1116 Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sun, 12 Jul 2015 14:12:50 -0500 Subject: [PATCH 14/17] Don't hardcode g++ into build --- .travis.yml | 2 +- ext/v8/extconf.rb | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 692cbb8..ff3ec2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ notifications: before_install: - gem update --system 2.1.11 script: - - CXX=g++-4.8 bundle exec rake compile + - bundle exec rake compile - bundle exec rspec spec/c sudo: false addons: diff --git a/ext/v8/extconf.rb b/ext/v8/extconf.rb index 9896721..17bbbd7 100644 --- a/ext/v8/extconf.rb +++ b/ext/v8/extconf.rb @@ -1,5 +1,5 @@ require 'mkmf' -RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX'] +cxx = RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX'] have_library('pthread') have_library('objc') if RUBY_PLATFORM =~ /darwin/ @@ -10,7 +10,10 @@ $CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic" unless RUB $CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or RUBY_PLATFORM =~ /darwin/ $CPPFLAGS += " -std=c++11" -$LDFLAGS += " -stdlib=libstdc++" + +if cxx =~ /clang/ + $LDFLAGS += " -stdlib=libstdc++" +end CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/ if CONFIG['warnflags'] From 51c13d1bff0c95b749146c0a59afe891802aae49 Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sun, 12 Jul 2015 14:26:37 -0500 Subject: [PATCH 15/17] disable bundler cache that contains yanked gems --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ff3ec2b..943d0d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -cache: bundler +#cache: bundler rvm: - 2.1.0 - 2.0.0 From 6f55073ce8ebe0c6cf26d46d299c6bccdf7495ad Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Sun, 12 Jul 2015 15:01:22 -0500 Subject: [PATCH 16/17] remove extra space --- ext/v8/extconf.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/v8/extconf.rb b/ext/v8/extconf.rb index 17bbbd7..67ff23c 100644 --- a/ext/v8/extconf.rb +++ b/ext/v8/extconf.rb @@ -10,7 +10,6 @@ $CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic" unless RUB $CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or RUBY_PLATFORM =~ /darwin/ $CPPFLAGS += " -std=c++11" - if cxx =~ /clang/ $LDFLAGS += " -stdlib=libstdc++" end From 3f1bde04cc01a1eb5af106dae4f69c8c272a4b4e Mon Sep 17 00:00:00 2001 From: Charles Lowell <cowboyd@frontside.io> Date: Mon, 13 Jul 2015 13:57:10 -0500 Subject: [PATCH 17/17] rbx: not to big to fail. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 943d0d3..d27e5e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ matrix: - rvm: 1.9.3 - rvm: 1.9.2 - rvm: 1.8.7 + - rvm: rbx-2.2.3 env: - CXX=g++-4.8 - CXX=clang++