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

Add support for GitHub Actions #68

Merged
merged 1 commit into from
Sep 22, 2019
Merged

Add support for GitHub Actions #68

merged 1 commit into from
Sep 22, 2019

Conversation

olafurpg
Copy link
Member

@olafurpg olafurpg commented Sep 21, 2019

GitHub Actions (https://github.com/features/actions) offer a promising alternative to Travis CI. This PR sets up automatic CI releases for this build via GitHub Actions so that we can disable the Travis CI.

@olafurpg olafurpg force-pushed the actions branch 4 times, most recently from 5243ee8 to b69b844 Compare September 21, 2019 11:56
@alexarchambault
Copy link
Collaborator

alexarchambault commented Sep 21, 2019

@olafurpg Is it an sbt launcher generated by coursier bootstrap? Until the install command of the coursier CLI is stable, I'd recommend using the customized sbt-extras scripts instead of committing a binary launcher. It downloads the latest version of the sbt-launcher itself (I mean, the launcher version is hard-coded in the script, but the script itself gets automatically updated).

@olafurpg olafurpg changed the title Add sbt launcher Experiment with GitHub Actions Sep 21, 2019
@olafurpg
Copy link
Member Author

@alexarchambault thank you for the suggestion! The olafurpg/setup-java custom action new downloads the sbt-extras script from master on every job https://github.com/olafurpg/setup-java/blob/5fbc7abe97954a5348df0397160d921ad65d2bd6/src/install.ts#L36

The coursier sbt-launcher seems to fail on sbt 1.3.x with

[error] java.lang.NoClassDefFoundError: lmcoursier/CoursierConfiguration

Any idea if it's possible to use the launcher with sbt 1.3?

@olafurpg
Copy link
Member Author

GitHub Actions is looking super promising so far. It's a joy to write custom actions and the lack of caching doesn't seem to be a blocker, clean installing OpenJDK + launching sbt + compiling a bit of Scala code seems to complete in around one minute!

Screenshot 2019-09-22 at 12 19 30

The code for the custom action to install JDK + sbt is here https://github.com/olafurpg/setup-java/blob/5fbc7abe97954a5348df0397160d921ad65d2bd6/src/install.ts#L36 I think it might even work on Windows, although I haven't tested that yet.

@alexarchambault
Copy link
Collaborator

@olafurpg I would blame the too old sbt-coursier plugin you're relying on. But you can remove sbt-coursier altogether with sbt 1.3.x. That's unless you're using sbt-shading though, that is pulled in project/plugins.sbt here, but is unused apparently.

@olafurpg olafurpg force-pushed the actions branch 2 times, most recently from ac244a8 to 8034b75 Compare September 22, 2019 16:04
@olafurpg olafurpg changed the title Experiment with GitHub Actions Add support for GitHub Actions Sep 22, 2019
@olafurpg olafurpg force-pushed the actions branch 2 times, most recently from efc4066 to bc720c5 Compare September 22, 2019 16:41
@olafurpg
Copy link
Member Author

Thanks a lot for the help @alexarchambault ! I ended up installing the regular sbt-extras as sbt and the coursier-based one as csbt so people can choose which one they want. Let's give this a spin 💃

@olafurpg olafurpg merged commit 7a12670 into master Sep 22, 2019
@olafurpg olafurpg deleted the actions branch September 22, 2019 16:45
@alexarchambault
Copy link
Collaborator

@olafurpg You may want to add that line to remain compatible with pre-1.3 sbt versions. (Was reminded that by @eed3si9n in sbt-coursier…)

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.

2 participants