Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit c163ccf

Browse files
committed
Updated ci build scripts (from rspec-dev)
1 parent dd0492e commit c163ccf

File tree

9 files changed

+20
-133
lines changed

9 files changed

+20
-133
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-11-22T07:41:13+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-12-07T01:07:10+03: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
name: RSpec CI
@@ -26,8 +26,6 @@ jobs:
2626
- 2.5
2727
- 2.4
2828
- 2.3
29-
- 2.2
30-
- 2.1.9
3129
- ruby-head
3230
env:
3331
-
@@ -74,8 +72,6 @@ jobs:
7472
- 2.5
7573
- 2.4
7674
- 2.3
77-
- 2.2
78-
- 2.1.9
7975
fail-fast: false
8076
steps:
8177
- uses: actions/checkout@v2

.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 2020-11-22T07:41:13+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-12-07T01:07:10+03: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

.travis.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

script/ci_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 2020-11-22T07:41:13+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-12-07T01:07:10+03: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:

script/clone_all_rspec_repos

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2020-11-22T07:41:13+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-12-07T01:07:10+03: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
@@ -13,10 +13,7 @@ if is_mri; then
1313
clone_repo "rspec-expectations"
1414
clone_repo "rspec-mocks"
1515
clone_repo "rspec-rails" "main"
16-
17-
if rspec_support_compatible; then
18-
clone_repo "rspec-support"
19-
fi
16+
clone_repo "rspec-support"
2017

2118
popd
2219
else

script/functions.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This file was generated on 2020-11-22T07:41:13+00:00 from the rspec-dev repo.
2-
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
3-
41
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
52
source $SCRIPT_DIR/ci_functions.sh
63
source $SCRIPT_DIR/predicate_functions.sh
@@ -12,8 +9,8 @@ SPECS_HAVE_RUN_FILE=specs.out
129
MAINTENANCE_BRANCH=`cat maintenance-branch`
1310

1411
# Don't allow rubygems to pollute what's loaded. Also, things boot faster
15-
# without the extra load time of rubygems. Only works on MRI Ruby 1.9+
16-
if is_mri_192_plus; then
12+
# without the extra load time of rubygems. Only works on MRI.
13+
if is_mri; then
1714
export RUBYOPT="--disable=gem"
1815
fi
1916

@@ -53,12 +50,7 @@ function run_cukes {
5350

5451
echo "${PWD}/bin/cucumber"
5552

56-
if is_mri_192; then
57-
# For some reason we get SystemStackError on 1.9.2 when using
58-
# the bin/cucumber approach below. That approach is faster
59-
# (as it avoids the bundler tax), so we use it on rubies where we can.
60-
bundle exec cucumber --strict
61-
elif is_jruby; then
53+
if is_jruby; then
6254
# For some reason JRuby doesn't like our improved bundler setup
6355
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
6456
PATH="${PWD}/bin:$PATH" \
@@ -88,7 +80,7 @@ function run_spec_suite_for {
8880
echo "Running specs for $1"
8981
pushd ../$1
9082
unset BUNDLE_GEMFILE
91-
bundle_install_flags=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"`
83+
bundle_install_flags="--binstubs --standalone --without documentation --path ../bundle"
9284
travis_retry eval "(unset RUBYOPT; exec bundle install $bundle_install_flags)"
9385
run_specs_and_record_done
9486
popd
@@ -193,11 +185,8 @@ function run_all_spec_suites {
193185
fold "rspec-core specs" run_spec_suite_for "rspec-core"
194186
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations"
195187
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"
188+
fold "rspec-support specs" run_spec_suite_for "rspec-support"
196189
if rspec_rails_compatible; then
197190
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
198191
fi
199-
200-
if rspec_support_compatible; then
201-
fold "rspec-support specs" run_spec_suite_for "rspec-support"
202-
fi
203192
}

script/predicate_functions.sh

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,24 @@
1-
# This file was generated on 2020-11-22T07:41:13+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-12-07T01:07:10+03: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 {
5-
if ruby -e "exit(!defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby')"; then
6-
# RUBY_ENGINE only returns 'ruby' on MRI.
7-
# MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode)
5+
# RUBY_ENGINE only returns 'ruby' on MRI.
6+
if ruby -e "exit(RUBY_ENGINE == 'ruby')"; then
87
return 0
98
else
109
return 1
1110
fi;
1211
}
1312

1413
function is_jruby {
15-
if ruby -e "exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')"; then
16-
# RUBY_ENGINE only returns 'ruby' on MRI.
17-
# MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode)
14+
# RUBY_PLATFORM only returns 'java' on JRuby.
15+
if ruby -e "exit(RUBY_PLATFORM == 'java')"; then
1816
return 0
1917
else
2018
return 1
2119
fi;
2220
}
2321

24-
function is_mri_192 {
25-
if is_mri; then
26-
if ruby -e "exit(RUBY_VERSION == '1.9.2')"; then
27-
return 0
28-
else
29-
return 1
30-
fi
31-
else
32-
return 1
33-
fi
34-
}
35-
36-
function is_mri_192_plus {
37-
if is_mri; then
38-
if ruby -e "exit(RUBY_VERSION.to_f > 1.8)"; then
39-
return 0
40-
else
41-
return 1
42-
fi
43-
else
44-
return 1
45-
fi
46-
}
47-
48-
function is_mri_2plus {
49-
if is_mri; then
50-
if ruby -e "exit(RUBY_VERSION.to_f > 2.0)"; then
51-
return 0
52-
else
53-
return 1
54-
fi
55-
else
56-
return 1
57-
fi
58-
}
59-
60-
function is_ruby_23_plus {
61-
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
62-
return 0
63-
else
64-
return 1
65-
fi
66-
}
67-
6822
function is_ruby_25_plus {
6923
if ruby -e "exit(RUBY_VERSION.to_f >= 2.5)"; then
7024
return 0
@@ -81,22 +35,14 @@ function rspec_rails_compatible {
8135
fi
8236
}
8337

84-
function rspec_support_compatible {
85-
if [ "$MAINTENANCE_BRANCH" != "2-99-maintenance" ] && [ "$MAINTENANCE_BRANCH" != "2-14-maintenance" ]; then
86-
return 0
87-
else
88-
return 1
89-
fi
90-
}
91-
9238
function additional_specs_available {
9339
type run_additional_specs > /dev/null 2>&1
9440
return $?
9541
}
9642

9743
function documentation_enforced {
9844
if [ -x ./bin/yard ]; then
99-
if is_mri_2plus; then
45+
if is_mri; then
10046
return 0
10147
else
10248
return 1

script/run_build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2020-11-22T07:41:13+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-12-07T01:07:10+03: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
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
#!/bin/bash
2-
# This file was generated on 2020-11-22T07:41:13+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-12-07T01:07:10+03: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-
if is_ruby_23_plus; then
9-
yes | gem update --system
10-
yes | gem install bundler
11-
else
12-
echo "Warning installing older versions of Rubygems / Bundler"
13-
gem update --system '2.7.8'
14-
gem install bundler -v '1.17.3'
15-
fi
8+
yes | gem update --system
9+
yes | gem install bundler

0 commit comments

Comments
 (0)