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

Commit 69f04f6

Browse files
committed
Updated ci build scripts (from rspec-dev)
1 parent 6c65773 commit 69f04f6

File tree

9 files changed

+43
-104
lines changed

9 files changed

+43
-104
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-11-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-29T14:01:14+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
@@ -11,8 +11,6 @@ on:
1111
pull_request:
1212
branches:
1313
- '*'
14-
env:
15-
RSPEC_CI: true
1614
jobs:
1715
test:
1816
name: Ruby ${{ matrix.ruby }}
@@ -26,8 +24,6 @@ jobs:
2624
- 2.5
2725
- 2.4
2826
- 2.3
29-
- 2.2
30-
- 2.1.9
3127
- ruby-head
3228
fail-fast: false
3329
continue-on-error: ${{ matrix.ruby == 'jruby-9.2.13.0' || endsWith(matrix.ruby, 'head') }}
@@ -42,3 +38,25 @@ jobs:
4238
- run: script/clone_all_rspec_repos
4339
- run: bundle install --binstubs --standalone
4440
- run: script/run_build
41+
42+
windows:
43+
name: Ruby ${{ matrix.ruby }} (Windows)
44+
runs-on: windows-latest
45+
strategy:
46+
matrix:
47+
ruby:
48+
- 2.7
49+
- 2.6
50+
- 2.5
51+
- 2.4
52+
- 2.3
53+
fail-fast: false
54+
steps:
55+
- uses: actions/checkout@v2
56+
- uses: ruby/setup-ruby@v1
57+
with:
58+
bundler: 2
59+
ruby-version: ${{ matrix.ruby }}
60+
bundler-cache: true
61+
- run: cinst ansicon
62+
- run: bundle exec rspec --backtrace

.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-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-29T14:01:14+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: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-11-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-29T14:01:14+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
# In order to install old Rubies, we need to use old Ubuntu distibution.
@@ -15,21 +15,13 @@ before_install:
1515
bundler_args: "--binstubs --standalone --without documentation --path ../bundle"
1616
script: "script/run_build"
1717
rvm:
18-
- 1.8.7
19-
- 1.9.2
20-
- 1.9.3
21-
- 2.0.0
22-
- ree
2318
- rbx-3
2419
- jruby-9.1.7.0 # pin JRuby to this until travis/rvm can install later versions
2520
- jruby-head
26-
- jruby-1.7
2721
env:
2822
- JRUBY_OPTS='--dev'
2923
matrix:
3024
include:
31-
- rvm: jruby-1.7
32-
env: JRUBY_OPTS='--dev --1.8'
3325
- rvm: 2.7.1
3426
env: DIFF_LCS_VERSION="~> 1.3.0"
3527
- rvm: 2.7.1

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-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-29T14:01:14+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-16T22:10:29+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-11-29T14:01:14+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 & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-11-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-29T14:01:14+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
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -12,8 +12,8 @@ SPECS_HAVE_RUN_FILE=specs.out
1212
MAINTENANCE_BRANCH=`cat maintenance-branch`
1313

1414
# 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
15+
# without the extra load time of rubygems. Only works on MRI.
16+
if is_mri; then
1717
export RUBYOPT="--disable=gem"
1818
fi
1919

@@ -53,12 +53,7 @@ function run_cukes {
5353

5454
echo "${PWD}/bin/cucumber"
5555

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
56+
if is_jruby; then
6257
# For some reason JRuby doesn't like our improved bundler setup
6358
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
6459
PATH="${PWD}/bin:$PATH" \
@@ -193,11 +188,8 @@ function run_all_spec_suites {
193188
fold "rspec-core specs" run_spec_suite_for "rspec-core"
194189
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations"
195190
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"
191+
fold "rspec-support specs" run_spec_suite_for "rspec-support"
196192
if rspec_rails_compatible; then
197193
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
198194
fi
199-
200-
if rspec_support_compatible; then
201-
fold "rspec-support specs" run_spec_suite_for "rspec-support"
202-
fi
203195
}

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-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-29T14:01:14+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-16T22:10:29+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-11-29T14:01:14+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-16T22:10:29+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-11-29T14:01:14+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)