diff --git a/.travis.yml b/.travis.yml index 4eba2f3a2..13f6a3c4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,16 +3,7 @@ rvm: - ree - 1.9.2 -before_script: - - ruby -e "system('rm Gemfile.lock') if RUBY_VERSION.include?('1.9')" - - ruby -e "system('bundle install') if RUBY_VERSION.include?('1.9')" - - "sudo aptitude -q -y install firefox" - - "sudo cp config/ci/xvfb /etc/init.d/xvfb" - - "sh -e /etc/init.d/xvfb start" - - "sass --update public/stylesheets/sass/:public/stylesheets/" - - "cp config/database.yml.example config/database.yml" - - "rake db:create" - - "rake db:schema:load" +before_script: "./config/ci/before-travis.sh" script: "bundle exec rake travis" diff --git a/config/ci/before-travis.sh b/config/ci/before-travis.sh new file mode 100644 index 000000000..b28d1f746 --- /dev/null +++ b/config/ci/before-travis.sh @@ -0,0 +1,23 @@ +# Remove Gemfile.lock and rebundle on Ruby 1.9 +ruby -e "system('rm Gemfile.lock') if RUBY_VERSION.include?('1.9')" +ruby -e "system('bundle install') if RUBY_VERSION.include?('1.9')" + +# adjust GC settings for REE +export RUBY_HEAP_MIN_SLOTS=1000000 +export RUBY_HEAP_SLOTS_INCREMENT=1000000 +export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 +export RUBY_GC_MALLOC_LIMIT=1000000000 +export RUBY_HEAP_FREE_MIN=500000 + +# Install firefox and start xvfb in preparation for cucumber & jasmine +sudo aptitude -q2 -y install firefox +sudo cp config/ci/xvfb /etc/init.d/xvfb +sh -e /etc/init.d/xvfb start + +# Regenerate css files +sass --update public/stylesheets/sass/:public/stylesheets/ + +# Set up database +cp config/database.yml.example config/database.yml +rake db:create +rake db:schema:load