Skip to content

Commit 1ae479c

Browse files
committed
Updated travis build scripts (from rspec-dev)
1 parent 99b1a6c commit 1ae479c

File tree

7 files changed

+31
-50
lines changed

7 files changed

+31
-50
lines changed

.rubocop_rspec_base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-01-08T19:12:50-08:00 from the rspec-dev repo.
1+
# This file was generated on 2015-02-08T20:55:32-08:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# This file contains defaults for RSpec projects. Individual projects

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-01-08T19:12:50-08:00 from the rspec-dev repo.
1+
# This file was generated on 2015-02-08T20:55:32-08:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
version: "{build}"

script/clone_all_rspec_repos

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
#!/bin/bash
2-
# This file was generated on 2015-01-08T19:12:50-08:00 from the rspec-dev repo.
2+
# This file was generated on 2015-02-08T20:55:32-08:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e
66
source script/functions.sh
77

8-
pushd ..
9-
10-
clone_repo "rspec"
11-
clone_repo "rspec-core"
12-
clone_repo "rspec-expectations"
13-
clone_repo "rspec-mocks"
14-
158
if is_mri; then
9+
pushd ..
10+
11+
clone_repo "rspec"
12+
clone_repo "rspec-core"
13+
clone_repo "rspec-expectations"
14+
clone_repo "rspec-mocks"
1615
clone_repo "rspec-rails"
17-
fi
1816

19-
if rspec_support_compatible; then
20-
clone_repo "rspec-support"
21-
fi
17+
if rspec_support_compatible; then
18+
clone_repo "rspec-support"
19+
fi
2220

23-
popd
21+
popd
22+
else
23+
echo "Not cloning all repos since we are not on MRI and they are only needed for the MRI build"
24+
fi

script/functions.sh

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# This file was generated on 2015-01-08T19:12:50-08:00 from the rspec-dev repo.
1+
# This file was generated on 2015-02-08T20:55:32-08:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
source $SCRIPT_DIR/travis_functions.sh
66
source $SCRIPT_DIR/predicate_functions.sh
77

8-
# idea taken from: http://blog.headius.com/2010/03/jruby-startup-time-tips.html
9-
export JRUBY_OPTS="${JRUBY_OPTS} -X-C" # disable JIT since these processes are so short lived
8+
# If JRUBY_OPTS isn't set, use these.
9+
# see http://docs.travis-ci.com/user/ci-environment/
10+
export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"}
1011
SPECS_HAVE_RUN_FILE=specs.out
1112
MAINTENANCE_BRANCH=`cat maintenance-branch`
1213

@@ -58,13 +59,9 @@ function run_cukes {
5859
function run_specs_one_by_one {
5960
echo "Running each spec file, one-by-one..."
6061

61-
if is_mri; then
62-
for file in `find spec -iname '*_spec.rb'`; do
63-
bin/rspec $file -b --format progress
64-
done
65-
else
66-
echo "Skipping one-by-one specs on non-MRI rubies as they tend to have long boot times"
67-
fi
62+
for file in `find spec -iname '*_spec.rb'`; do
63+
bin/rspec $file -b --format progress
64+
done
6865
}
6966

7067
function run_spec_suite_for {
@@ -73,7 +70,7 @@ function run_spec_suite_for {
7370
pushd ../$1
7471
unset BUNDLE_GEMFILE
7572
bundle_install_flags=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"`
76-
travis_retry eval "time bundle install $bundle_install_flags"
73+
travis_retry eval "bundle install $bundle_install_flags"
7774
run_specs_and_record_done
7875
popd
7976
fi;
@@ -125,12 +122,7 @@ function run_all_spec_suites {
125122
fold "rspec-core specs" run_spec_suite_for "rspec-core"
126123
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations"
127124
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"
128-
129-
if is_mri; then
130-
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
131-
else
132-
echo "Skipping rspec-rails specs on non-MRI rubies"
133-
fi
125+
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
134126

135127
if rspec_support_compatible; then
136128
fold "rspec-support specs" run_spec_suite_for "rspec-support"

script/predicate_functions.sh

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-01-08T19:12:50-08:00 from the rspec-dev repo.
1+
# This file was generated on 2015-02-08T20:55:32-08:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
function is_mri {
@@ -11,18 +11,6 @@ function is_mri {
1111
fi;
1212
}
1313

14-
function is_jruby_20_mode {
15-
if [ -z "$JRUBY_OPTS" ]; then
16-
if ruby -e "exit(RUBY_VERSION == '2.0.0')"; then
17-
return 0
18-
else
19-
return 1
20-
fi
21-
else
22-
return 1
23-
fi
24-
}
25-
2614
function is_mri_192 {
2715
if is_mri; then
2816
if ruby -e "exit(RUBY_VERSION == '1.9.2')"; then

script/run_build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2015-01-08T19:12:50-08:00 from the rspec-dev repo.
2+
# This file was generated on 2015-02-08T20:55:32-08:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e
@@ -21,8 +21,8 @@ if style_and_lint_enforced; then
2121
fold "rubocop" check_style_and_lint
2222
fi
2323

24-
if is_jruby_20_mode; then
25-
echo "Skipping other specs suites on JRuby 2.0 mode because it is so much slower"
26-
else
24+
if is_mri; then
2725
run_all_spec_suites
26+
else
27+
echo "Skipping the rest of the build on non-MRI rubies"
2828
fi

script/travis_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-01-08T19:12:50-08:00 from the rspec-dev repo.
1+
# This file was generated on 2015-02-08T20:55:32-08:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# Taken from:

0 commit comments

Comments
 (0)