Skip to content

Commit

Permalink
Increasing JVM params to hopefully speed up tests
Browse files Browse the repository at this point in the history
 * and fixing a dump error
  • Loading branch information
Konstantin Gredeskoul committed Dec 23, 2019
1 parent 3ff7d63 commit 2eca351
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
13 changes: 6 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
environment:
PATH: "/usr/local/bin:/usr/bin:/sbin:/opt/bin:/home/circleci/repo/bin:/bin:/sbin:/usr/sbin"
BUNDLE_PATH: /home/circleci/.bundle_cache
BAZEL_OPTS: "--host_jvm_args=-Xmx400m --host_jvm_args=-Xms400m"
BAZEL_OPTS: "--max_idle_secs=1 --host_jvm_args=-Xmx500m --host_jvm_args=-Xms500m"
BAZEL_BUILD_OPTS: "--curses=no --verbose_failures --jobs 10"
BAZEL_TEST_OPTS: "--verbose_failures --test_output=streamed --test_verbose_timeout_warnings "

Expand All @@ -34,7 +34,6 @@ jobs:

bazel_build_workspace:
<<: *bazel_defaults

steps:
- checkout

Expand All @@ -44,11 +43,6 @@ jobs:
cp .circleci/.bazelrc ${HOME}
/usr/bin/env bash bin/setup
- run:
name: "Show Bazel Info"
command: |
/usr/bin/env bash bin/test-suite bazel-info
- run:
name: "Bazel Build & Test Workspace"
command: |
Expand All @@ -66,6 +60,11 @@ jobs:
cp .circleci/.bazelrc ${HOME}
/usr/bin/env bash bin/setup
- run:
name: "Show Bazel Info"
command: |
/usr/bin/env bash bin/test-suite bazel-info
- run:
name: "Bazel Simple Script Example Build"
command: |
Expand Down
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jdk: openjdk11

cache:
directories:
${HOME}/.rbenv
${HOME}/.bundle/gems
- ${HOME}/.rbenv
- ${HOME}/.bundle/gems

addons:
apt:
Expand All @@ -28,6 +28,6 @@ env:
- CI=true
- BUNDLE_PATH="${HOME}/.bundle/gems"
- PATH="${HOME}/.rbenv/bin:${HOME}/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/opt/local/bin:${PATH}"
- BAZEL_OPTS="--host_jvm_args=-Xmx700m --host_jvm_args=-Xms700m"
- BAZEL_BUILD_OPTS="--curses=no --verbose_failures -j 20 --show_progress_rate_limit 0.5"
- BAZEL_OPTS="--max_idle_secs=1 --host_jvm_args=-Xmx1200m --host_jvm_args=-Xms1200m"
- BAZEL_BUILD_OPTS="--curses=no --verbose_failures -j 30 --show_progress_rate_limit 0.5"
- BAZEL_TEST_OPTS="--verbose_failures --test_output=streamed --test_verbose_timeout_warnings"
24 changes: 11 additions & 13 deletions bin/test-suite
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ export BashMatic__Expr="
[[ -f ${HOME}/.bashmatic/init.sh ]] && source ${HOME}/.bashmatic/init.sh
set -e
"

export Bazel__BuildSteps="
bazel ${BAZEL_OPTS} info; echo; echo
bazel ${BAZEL_OPTS} build ${BAZEL_BUILD_OPTS} -- //... ; echo; echo
bazel ${BAZEL_OPTS} test ${BAZEL_BUILD_OPTS} ${BAZEL_TEST_OPTS} -- //... ; echo; echo
"
deps::start-clock

run::set-all abort-on-error
Expand Down Expand Up @@ -121,7 +125,7 @@ $(help-example bin/test-suite simple-example)
etc.
"
exit 0
exit 0
}

# Runs Rubocop Tests
Expand All @@ -143,25 +147,20 @@ test::buildifier() {
test::simple-script() {
__test::exec simple-script "
cd examples/simple_script
bazel ${BAZEL_OPTS} info
bazel ${BAZEL_OPTS} build ${BAZEL_BUILD_OPTS} -- //...
bazel ${BAZEL_OPTS} test ${BAZEL_BUILD_OPTS} ${BAZEL_TEST_OPTS} -- //...
bazel ${BAZEL_OPTS} run ${BAZEL_BUILD_OPTS} -- :rubocop
${Bazel__BuildSteps}
bazel ${BAZEL_OPTS} run ${BAZEL_BUILD_OPTS} -- :rubocop ;
"
}

test::workspace() {
__test::exec workspace "
bazel ${BAZEL_OPTS} build ${BAZEL_BUILD_OPTS} -- //...
bazel ${BAZEL_OPTS} test ${BAZEL_BUILD_OPTS} ${BAZEL_TEST_OPTS} -- //...
"
__test::exec workspace "${Bazel__BuildSteps}"
}

# Private
test::bazel-info() {
__test::exec bazel-info "
bazel ${BAZEL_OPTS} version
bazel ${BAZEL_OPTS} info
bazel ${BAZEL_OPTS} version; echo; echo
bazel ${BAZEL_OPTS} info; echo; echo
bazel ${BAZEL_OPTS} fetch --curses=no -- '//ruby/...'
"
}
Expand All @@ -175,7 +174,6 @@ test::rspec() {
"
}


test::all() {
test::bazel-info
test::workspace
Expand Down

0 comments on commit 2eca351

Please sign in to comment.