Skip to content

Commit b95f61b

Browse files
authored
Merge pull request #52 from rspec/legacy-builds
Add legacy CI
2 parents 91d213f + 7da825a commit b95f61b

File tree

4 files changed

+60
-2
lines changed

4 files changed

+60
-2
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,42 @@ jobs:
157157
- run: script/run_build
158158
continue-on-error: ${{ matrix.allow_failure || false }}
159159

160+
legacy:
161+
name: Legacy Ruby Builds (${{ matrix.container.version }})
162+
runs-on: ubuntu-20.04
163+
container:
164+
image: ${{ matrix.container.tag }}
165+
options: ${{ matrix.container.options || '--add-host github-complains-if-this-is-empty.com:127.0.0.1' }}
166+
strategy:
167+
fail-fast: false
168+
matrix:
169+
include:
170+
# Rails 4.2 Builds >= 1.9.3
171+
- container:
172+
version: "2.1.9"
173+
tag: ghcr.io/rspec/docker-ci:2.1.9
174+
post: git config --global --add safe.directory `pwd`
175+
env:
176+
RAILS_VERSION: '~> 4.2.0'
177+
- container:
178+
version: "2.0"
179+
tag: ghcr.io/rspec/docker-ci:2.0.0
180+
env:
181+
RAILS_VERSION: '~> 4.2.0'
182+
- container:
183+
version: "1.9.3"
184+
tag: ghcr.io/rspec/docker-ci:1.9.3
185+
env:
186+
RAILS_VERSION: '~> 4.2.0'
187+
188+
env:
189+
LEGACY_CI: true
190+
JRUBY_OPTS: ${{ matrix.container.jruby_opts || '--dev' }}
191+
RAILS_VERSION: ${{ matrix.env.RAILS_VERSION }}
192+
steps:
193+
- uses: actions/checkout@v3
194+
- run: apt-get install libsqlite3-dev
195+
- run: ${{ matrix.container.pre }}
196+
- run: script/legacy_setup.sh
197+
- run: ${{ matrix.container.post }}
198+
- run: script/run_build

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gemspec
77
if File.exist?(library_path) && !ENV['USE_GIT_REPOS']
88
gem lib, :path => library_path
99
else
10-
gem lib, :git => "https://github.com/rspec/#{lib}.git"
10+
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => ENV.fetch('RSPEC_BRANCH', 'main')
1111
end
1212
end
1313

script/legacy_setup.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
# This file was generated on 2023-06-26T13:27:27+01:00 from the rspec-dev repo.
3+
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
4+
5+
set -e
6+
7+
bundle install --standalone --binstubs --without coverage documentation
8+
9+
if [ -x ./bin/rspec ]; then
10+
echo "RSpec bin detected"
11+
else
12+
if [ -x ./exe/rspec ]; then
13+
cp ./exe/rspec ./bin/rspec
14+
echo "RSpec restored from exe"
15+
else
16+
echo "No RSpec bin available"
17+
exit 1
18+
fi
19+
fi

script/run_build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export JRUBY_OPTS='-X-C' # disable JIT since these processes are so short lived
1010
export JAVA_OPTS='-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1'
1111

1212
echo "Running rspec specs"
13-
bin/rspec spec --format progress --profile
13+
bundle exec rspec spec --format progress --profile
1414

1515
echo "Running cucumber specs"
1616
# TODO: it would be nice to figure out how to run the cukes w/o the overhead of

0 commit comments

Comments
 (0)