Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Travis Configuration #476

Merged
merged 1 commit into from
Sep 6, 2017

Conversation

maxmeyer
Copy link
Member

Summary

This is a follow up to #470. It cleans up the travis configuration.

Details

  • Remove jruby-variants
  • Add Mac OS builds

Motivation and Context

See issue #470.

How Has This Been Tested?

Travis Build

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (cleanup of codebase withouth changing any existing functionality)
  • Update documentation

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

There's a small typo sterr -> stderr in the comment block for JRuby's option variables. REALLY good to have those explanations here, as comments. They teach.

.travis.yml Outdated
# JRUBY_OPTS, but JRuby 9 does not support C extensions at all
# so it issues warning that will mess up the sterr checks.
- JRUBY_OPTS="--server -Xcompile.invokedynamic=false"
# Somehow a "ASCII-8BIT to UTF-8 conversion error" appears for
Copy link
Contributor

Choose a reason for hiding this comment

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

This would also need to be fixed. I'll open a ticket so we don't forget.

Copy link
Contributor

Choose a reason for hiding this comment

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

Done: #477

.travis.yml Outdated
# Travis by default also have "-Dcext.enabled=false" set in
# JRUBY_OPTS, but JRuby 9 does not support C extensions at all
# so it issues warning that will mess up the sterr checks.
- JRUBY_OPTS="--server -Xcompile.invokedynamic=false"
Copy link
Contributor

Choose a reason for hiding this comment

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

The --server option increases startup time, which is very relevant for Aruba's cucumber tests since they start up Aruba a lot. Let's try --client and see if that makes any of the JRuby targets finish in time.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've done some experiments locally, and the following combination of environment variables greatly improves test time:

export JRUBY_OPTS="--client -Xcompile.invokedynamic=false"
export JAVA_OPTS='-Djruby.compile.mode=OFF -XX:+TieredCompilation -XX:TieredStopAtLevel=1'

I've tried this with just bundle exec cucumber features/01_getting_started_with_aruba/run_commands.feature, and it improved clock runtime from 1m11s to 34s, while reducing system load.

I found these options at https://gist.github.com/lucasallan/2f9b5c945280d226916c and https://github.com/jruby/jruby/wiki/Improving-startup-time.

.travis.yml Outdated
# Travis by default also have "-Dcext.enabled=false" set in
# JRUBY_OPTS, but JRuby 9 does not support C extensions at all
# so it issues warning that will mess up the sterr checks.
- JRUBY_OPTS="--server -Xcompile.invokedynamic=false"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move setting of these variables to a global section to avoid duplication?

@maxmeyer
Copy link
Member Author

maxmeyer commented Aug 1, 2017

Yes. That makes sense. Thanks a lot for your feedback. I will try to push a new version tomorrow evening taking into account your findings.

.travis.yml Outdated
- rvm: ruby-head
os: linux
- rvm: ruby-head
os: osx
Copy link
Contributor

Choose a reason for hiding this comment

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

Seeing the result of Travis, ruby-head (osx) environment in Travis server has problem right now.
You may be able to remove the ruby-head (osx) if you do not like to get the error every time.
https://travis-ci.org/cucumber/aruba/jobs/259520443

@mvz
Copy link
Contributor

mvz commented Aug 3, 2017

The java variants still don't finish in time 😞

@maxmeyer maxmeyer force-pushed the feature/update-travis-config branch from 1db3bff to 93e5b24 Compare August 3, 2017 05:46
@maxmeyer
Copy link
Member Author

maxmeyer commented Aug 3, 2017

I pushed two commits taking the tip from @junaruga into account by reducing the number of jobs per build:

  • jruby only
  • jruby + mri ruby

@maxmeyer
Copy link
Member Author

maxmeyer commented Aug 3, 2017

https://travis-ci.org/cucumber/aruba/jobs/260478099 is with jruby only, but it doesn't matter how many parallel tests we're running. jruby also complains about a missing --debug option

@maxmeyer
Copy link
Member Author

According to https://github.com/jruby/jruby/wiki/Improving-startup-time#use-the---dev-flag

Those flags are set by --dev

  • client mode where applicable (generally older 32-bit JVMs)
  • TieredCompilation and TieredStopAtLevel=1, equivalent to client mode on newer Hotspot-based JVMs
  • compile.mode=OFF to disable JRuby's JVM bytecode compiler
  • jruby.compile.invokedynamic=false to disable the slow-to-warmup invokedynamic features of JRuby

@mvz
Copy link
Contributor

mvz commented Aug 11, 2017

Those flags are set by --dev

That makes things a lot simpler! 👍

@maxmeyer
Copy link
Member Author

maxmeyer commented Aug 11, 2017

Times for build:

00:00 min - start build
06:00 min - setup project to run tests
07:00 min - run licence finder
07:30 min - run rspec
08:30 min - run cucumber
[TBC]

@mvz
Copy link
Contributor

mvz commented Sep 2, 2017

I'd like to make the following suggestions to get things moving and to avoid dealing with endless backward-compatibility problems:

  • Drop support for old rubies now, before the 1.0.0 release. We can discuss what is a good definition of 'old'.
  • Move the JRuby variants to the allow_failures section.

@maxmeyer
Copy link
Member Author

maxmeyer commented Sep 3, 2017 via email

@mvz
Copy link
Contributor

mvz commented Sep 3, 2017

Currently we're not facing any backward compatible problems with any of the MRI rubies, correct?

I should have explained more. Yes, there are no problems right now, but if we do not drop official support for those old rubies right now, Aruba could be stuck with them for the entire 1.x cycle, meaning we cannot use modern Ruby syntax even if we want to, and/or we have to keep version checks lying around. Finally, debugging any issues on those older Rubies may require actually installing them which will become harder and harder.

A counter-argument is the desire for RSpec to use Aruba 1.0 voiced in #363 (comment).

@mvz
Copy link
Contributor

mvz commented Sep 3, 2017

Moving JRuby to allowed_failures is definitely more urgent :-).

@maxmeyer
Copy link
Member Author

maxmeyer commented Sep 3, 2017

@mvz you're right. personally I think we could release 2.0.0 right after 1.0.0 which drops support for those rubies. Not sure how to handle support best.

@mvz
Copy link
Contributor

mvz commented Sep 3, 2017

Well, right after may be a little too soon, if we agree that releasing 2.0.0 in 2018 is fine then I'm fine with keeping support for Ruby 1.9.3 in 1.x.

@mvz
Copy link
Contributor

mvz commented Sep 4, 2017

@maxmeyer are you going to update this PR or would you like me to do it?

@maxmeyer
Copy link
Member Author

maxmeyer commented Sep 4, 2017

Feel free to fix it!

@mvz mvz force-pushed the feature/update-travis-config branch from c444a25 to 4a1b473 Compare September 5, 2017 06:49
@mvz
Copy link
Contributor

mvz commented Sep 5, 2017

I'm going to open a new PR for this to rebase and clean up the branch.

@mvz mvz force-pushed the feature/update-travis-config branch from 4a1b473 to 1d9e679 Compare September 5, 2017 06:55
This moves jruby to the "allowed_failures" group. Credits go to @mvz.
@maxmeyer maxmeyer requested a review from mvz September 5, 2017 19:43
@maxmeyer
Copy link
Member Author

maxmeyer commented Sep 5, 2017

I found some time hacking on aruba. So I rebased the PR based on your work and squashed everything into a single commit. Feel free to merge if you're happy with this PR.

@mvz mvz merged commit 36103d8 into cucumber:master Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants