From 507439e12f7fe15eed566835834d940cc7733bb2 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Tue, 27 Jun 2017 16:58:43 +0200 Subject: [PATCH] Improved setup performance by using multiple bundle jobs to install dependencies. --- .gitlab-ci.yml | 6 +++--- .travis.yml | 1 + bin/setup | 2 +- script/bootstrap.sh | 2 +- script/install.sh | 2 +- script/local_browser_tests.sh | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0fe78e959..07bfbcd42 100644 --- a/.gitlab-ci.yml +++ b/.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 diff --git a/.travis.yml b/.travis.yml index c8153f76e..510217e74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ notifications: env: - DB=mysql - DB=postgresql + - BUNDLE_JOBS=8 addons: postgresql: "9.4" apt: diff --git a/bin/setup b/bin/setup index 00ce4d30a..016034e94 100755 --- a/bin/setup +++ b/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") diff --git a/script/bootstrap.sh b/script/bootstrap.sh index ac34cdc3d..f8bcb41ae 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -1,6 +1,6 @@ #!/bin/bash -bundle install +bundle install --jobs 8 rm -rf tmp/cache* diff --git a/script/install.sh b/script/install.sh index 67da70b27..b5a44c868 100644 --- a/script/install.sh +++ b/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 diff --git a/script/local_browser_tests.sh b/script/local_browser_tests.sh index 13a6bede2..6c3ada269 100755 --- a/script/local_browser_tests.sh +++ b/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*