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

Updated ci build scripts (from rspec-dev) #2790

Closed
wants to merge 6 commits into from

Conversation

pirj
Copy link
Member

@pirj pirj commented Dec 6, 2020

@pirj pirj self-assigned this Dec 6, 2020
@pirj pirj force-pushed the update-ci-build-scripts-2020-12-07-for-4-0-dev branch 5 times, most recently from 23184b2 to 202f253 Compare December 7, 2020 00:00
@pirj pirj force-pushed the update-ci-build-scripts-2020-12-07-for-4-0-dev branch 2 times, most recently from c163ccf to dd0492e Compare December 7, 2020 19:40
@pirj pirj force-pushed the update-ci-build-scripts-2020-12-07-for-4-0-dev branch from b8201ff to 688132c Compare December 7, 2020 22:17
@pirj pirj force-pushed the update-ci-build-scripts-2020-12-07-for-4-0-dev branch from 688132c to 3b1980b Compare December 7, 2020 22:27
unset BUNDLE_GEMFILE
unset RUBYOPT
travis_retry eval "(unset RUBYOPT; exec bundle install)"
bundle exec rspec spec --backtrace --format progress --profile --format progress --out $SPECS_HAVE_RUN_FILE
Copy link
Member Author

@pirj pirj Dec 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonRowe I've tried many options, and this one, the most straightforward, is the only one that worked.

Without unset RUBYOPT Rails is complaining that uninitialized constant Gem.
With --binstubs --standalone --path=../bundle and subsequent bin/rspec the binstub apparently ceases to find ../bundle:

# Gem::MissingSpecError:
#   Could not find 'sqlite3' (~> 1.4) among 30 total gem(s)
#   Checked in 'GEM_PATH=/home/runner/.gem/ruby/2.5.0:/opt/hostedtoolcache/Ruby/2.5.8/x64/lib/ruby/gems/2.5.0', execute `gem env` for more information

Would you agree for such a change?

  • Yes, surely we're shaving some fractions of a second by using standalone, but is it worth such a complication?
  • SPECS_HAVE_RUN_FILE is quite an odd flag to prevent duplicate runs, I can't think of a scenario where specs are started twice for the same repo
  • [ -d ../$1 ] is useless - we do clone it, and if we don't - we don't run_spec_suite_for for this dir

To my huge surprise, the problem with uninitialized constant Gem can be reproduced with a small single commit comparing to the green 4-0-dev. That very commit that drops .travis.yml and barely does anything else.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its the ffi version, I had to fix rspec-core for main too, I've applied that patch to 4-0-dev and opened simplified PRs to see how they go

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!
I'll close this series for now, we can address the removal of .travis.yml later.

@pirj pirj closed this Dec 8, 2020
@pirj pirj deleted the update-ci-build-scripts-2020-12-07-for-4-0-dev branch December 8, 2020 10:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants