Browse Source

Improved setup performance by using multiple bundle jobs to install dependencies.

Thorsten Eckel 7 years ago
parent
commit
507439e12f
6 changed files with 8 additions and 7 deletions
  1. 3 3
      .gitlab-ci.yml
  2. 1 0
      .travis.yml
  3. 1 1
      bin/setup
  4. 1 1
      script/bootstrap.sh
  5. 1 1
      script/install.sh
  6. 1 1
      script/local_browser_tests.sh

+ 3 - 3
.gitlab-ci.yml

@@ -3,7 +3,7 @@ before_script:
   - which ruby
   - env
   - test -n "$RNAME" && script/build/test_db_config.sh
-  - test -n "$RNAME" && bundle install
+  - test -n "$RNAME" && bundle install --jobs 8
 
 stages:
   - pre
@@ -229,7 +229,7 @@ test:integration:slack:
     - rake db:create
     - rake db:migrate
     - echo "gem 'slack-api'" >> Gemfile.local
-    - bundle install
+    - bundle install --jobs 8
     - ruby -I test test/integration/slack_test.rb
     - rake db:drop
 
@@ -427,7 +427,7 @@ test:browser:integration:api_client_ruby:
     - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
     - git clone git@github.com:zammad/zammad-api-client-ruby.git || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 1
     - cd zammad-api-client-ruby
-    - bundle install
+    - bundle install --jobs 8
     - export TEST_URL=http://$IP:$BROWSER_PORT
     - rspec || (cd .. && script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 1)
     - cd .. && script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 0 1

+ 1 - 0
.travis.yml

@@ -7,6 +7,7 @@ notifications:
 env:
   - DB=mysql
   - DB=postgresql
+  - BUNDLE_JOBS=8
 addons:
   postgresql: "9.4"
   apt:

+ 1 - 1
bin/setup

@@ -10,7 +10,7 @@ Dir.chdir APP_ROOT do
 
   puts '== Installing dependencies =='
   system 'gem install bundler --conservative'
-  system 'bundle check || bundle install'
+  system 'bundle check || bundle install --jobs 8'
 
   # puts "\n== Copying sample files =="
   # unless File.exist?("config/database.yml")

+ 1 - 1
script/bootstrap.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-bundle install
+bundle install --jobs 8
 
 rm -rf tmp/cache*
 

+ 1 - 1
script/install.sh

@@ -79,7 +79,7 @@ sudo -u "${USER}" -H bash -l -c 'rvm alias create default 2.1.2'
 
 
 sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && gem install rails --no-ri --no-rdoc'
-sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && bundle install'
+sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && bundle install --jobs 8'
 
 DBPASS=$(apg -x8|head -1)
 echo Password $DBPASS 

+ 1 - 1
script/local_browser_tests.sh

@@ -15,7 +15,7 @@ export RAILS_SERVE_STATIC_FILES=true
 export ZAMMAD_SETTING_TTL=15
 export Z_LOCALES=en-us:de-de
 
-bundle install
+bundle install --jobs 8
 
 rm -rf tmp/screenshot*
 rm -rf tmp/cache*