Skip to content

Commit cc2415f

Browse files
committed
Fixing merge conflict + some additional fixes (see below)
Also: * removing `max_idle_sec` to keep Bazel running persistently * adding `example_gem` to CircleCI and Travis CI * removing `bundler/setup.rb` rubyopt, because it's responsible for loading the entire bundle when we want individual gems.
1 parent ad2850b commit cc2415f

File tree

6 files changed

+30
-21
lines changed

6 files changed

+30
-21
lines changed

.circleci/.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Common options
22
common --color=yes
3-
common --verbose_failures
43
common --show_progress
54
common --show_progress_rate_limit=0.5
65

@@ -15,3 +14,4 @@ build --jobs=10
1514
test --spawn_strategy=standalone
1615
test --test_output=all
1716
test --test_verbose_timeout_warnings
17+
test --verbose_failures

.circleci/config.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
environment:
1010
PATH: "/usr/local/bin:/usr/bin:/sbin:/opt/bin:/home/circleci/repo/bin:/bin:/sbin:/usr/sbin"
1111
BUNDLE_PATH: /home/circleci/.bundle_cache
12-
BAZEL_OPTS: "--max_idle_secs=1 --host_jvm_args=-Xmx500m --host_jvm_args=-Xms500m"
12+
BAZEL_OPTS: "--host_jvm_args=-Xmx500m --host_jvm_args=-Xms500m"
1313
BAZEL_BUILD_OPTS: "--curses=no --verbose_failures --jobs 10"
1414
BAZEL_TEST_OPTS: "--verbose_failures --test_output=streamed --test_verbose_timeout_warnings "
1515

@@ -48,7 +48,7 @@ jobs:
4848
command: |
4949
/usr/bin/env bash bin/test-suite workspace
5050
51-
bazel_build_examples:
51+
bazel_example_script:
5252
<<: *bazel_defaults
5353

5454
steps:
@@ -65,6 +65,23 @@ jobs:
6565
command: |
6666
/usr/bin/env bash bin/test-suite simple-script
6767
68+
bazel_example_gem:
69+
<<: *bazel_defaults
70+
71+
steps:
72+
- checkout
73+
74+
- run:
75+
name: "Install ~/.bazelrc and run setup"
76+
command: |
77+
cp .circleci/.bazelrc ${HOME}
78+
/usr/bin/env bash bin/setup
79+
80+
- run:
81+
name: "Bazel Build & Test Example"
82+
command: |
83+
/usr/bin/env bash bin/test-suite example-gem
84+
6885
buildifier:
6986
<<: *bazel_defaults
7087

@@ -91,5 +108,6 @@ workflows:
91108
rules_ruby:
92109
jobs:
93110
- bazel_build_workspace
94-
- bazel_build_examples
111+
- bazel_example_gem
112+
- bazel_example_script
95113
- buildifier

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ env:
2828
- CI=true
2929
- BUNDLE_PATH="${HOME}/.bundle/gems"
3030
- PATH="${HOME}/.rbenv/bin:${HOME}/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/opt/local/bin:${PATH}"
31-
- BAZEL_OPTS="--max_idle_secs=1 --host_jvm_args=-Xmx1200m --host_jvm_args=-Xms1200m"
32-
- BAZEL_BUILD_OPTS="--curses=no --verbose_failures -j 30 --show_progress_rate_limit 0.5"
31+
- BAZEL_OPTS="--host_jvm_args=-Xmx1200m --host_jvm_args=-Xms1200m"
32+
- BAZEL_BUILD_OPTS="--curses=no --verbose_failures -j 10 --show_progress_rate_limit 0.5"
3333
- BAZEL_TEST_OPTS="--verbose_failures --test_output=streamed --test_verbose_timeout_warnings"

bin/linter

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ lint::all() {
104104
hr
105105
echo
106106
info "ACTION: ${bldylw}Please add any respective files to the commit and retry."
107-
retrn 1
107+
return 1
108108
else
109109
echo
110110
success "No changes detected, changes passed linter inspection."

bin/test-suite

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
2+
# vim: ft=bash
33
set -e
44

55
# shellcheck disable=SC1091
@@ -10,8 +10,8 @@ export BUNDLE_PATH="${BUNDLE_PATH:-${HOME}/.bundle/gems}"
1010
export PATH="${HOME}/.rbenv/bin:${HOME}/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/opt/local/bin"
1111

1212
export BAZEL_OPTS="--host_jvm_args=-Xmx500m --host_jvm_args=-Xms500m"
13-
export BAZEL_BUILD_OPTS="--curses=no --verbose_failures -j 15 --show_progress_rate_limit 0 "
14-
export BAZEL_TEST_OPTS="--verbose_failures --test_output=streamed --test_verbose_timeout_warnings "
13+
export BAZEL_BUILD_OPTS="--curses=no --verbose_failures -j 30 --progress_report_interval=2"
14+
export BAZEL_TEST_OPTS="--verbose_failures --test_verbose_timeout_warnings --verbose_explanations"
1515
export RUBY_VERSION=2.7.0
1616

1717
export BashMatic__Expr="
@@ -187,9 +187,10 @@ test::all() {
187187
test::bazel-info
188188
test::workspace
189189
test::simple-script
190-
test::buildifier
190+
test::example-gem
191191
test::rubocop
192192
test::rspec
193+
test::buildifier
193194
}
194195

195196
test-suite::setup() {

ruby/private/bundle/create_bundle_build_file.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"bundler/**/*",
2323
],
2424
),
25-
rubyopt = ["{bundler_setup}"],
2625
)
2726
2827
# PULL EACH GEM INDIVIDUALLY
@@ -33,21 +32,13 @@
3332
name = "{name}",
3433
srcs = glob(
3534
include = [
36-
<<<<<<< HEAD
3735
".bundle/config",
3836
"{gem_lib_files}",
3937
"lib/ruby/{ruby_version}/specifications/{name}-{version}.gemspec",
4038
{gem_binaries}
41-
=======
42-
"lib/ruby/{ruby_version}/gems/{name}-{version}*/**",
43-
"lib/ruby/{ruby_version}/specifications/{name}-{version}*.gemspec",
44-
"lib/ruby/{ruby_version}/cache/{name}-{version}*.gem",
45-
"bin/*"
46-
>>>>>>> eeab881... Add force_gem_pristine attr to rb_binary (#11)
4739
],
4840
exclude = {exclude},
4941
),
50-
rubyopt = ["{bundler_setup}"],
5142
deps = {deps},
5243
includes = ["lib/ruby/{ruby_version}/gems/{name}-{version}/lib"],
5344
)
@@ -58,7 +49,6 @@
5849
name = "gems",
5950
srcs = glob([{bundle_lib_files}]) + glob(["bin/*"]),
6051
includes = {bundle_lib_paths},
61-
rubyopt = ["{bundler_setup}"],
6252
)
6353
6454
ruby_library(

0 commit comments

Comments
 (0)