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

GitHub Actions CI #2628

Merged
merged 6 commits into from Jul 8, 2022
Merged

GitHub Actions CI #2628

merged 6 commits into from Jul 8, 2022

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Jul 7, 2022

Now that the repo is trivially buildable using Maven under common JDK versions, this PR adds GitHub CI runs under JDK 8 and 11 on all three OS platforms.

Any build issues or outright failures in a job will cause it to fail. If it does not fail, the final BiglyBT.jar file is published as a build artifact (actually, as 6 build artifacts) which can be retrieved from the job summary view under the Actions tab for any run.

The workflow is configured to run a CI job for all pushes to and pull requests targeting the master branch. It is also defined with a workflow_dispatch trigger, which means committers can manually trigger a run against any branch via the repo 'Actions' tab.

A JDK 17 build job is also defined, running on Ubuntu only, but currently allowed to fail because it is failing due to some issues the tests are raising regarding supposedly-missing translations. Those failures will still be logged as failures, but (unlike normally) those failures will not cause the other jobs in the workflow to immediately abort.

An example of a complete run with the submitted configuration:
https://github.com/ferdnyc/BiglyBT/actions/runs/2632563481

Other changes

  • Deleted the ancient, vestigial Travis CI config file.

  • Removed the <prerequisites> section of the parent POM, which was producing a warning as <prerequisites> is only for Maven plugin projects. For other project types the recommendation is to use the enforcer plugin, which we already are.

  • Manually bumped the project version to 3.1.0.1-SNAPSHOT in all three POM files as a one-time adjustment, since previously it was still 2.5.0.1-SNAPSHOT. Keeping that up to date with every subsequent release isn't necessary, fortunately, because it sure would be annoying having to change it in three places every time.

    Since Maven 3.5.0, a feature is available called CI Friendly Versions which allows that information to be centralized and even made configurable at build time. However, it requires use of the flatten-maven-plugin to expand the version variables for export, and the flatten plugin interacts badly with the Shade plugin, making it more trouble than it's worth at present.

@parg
Copy link
Contributor

parg commented Jul 8, 2022

Nice, one day I'll have to figure out what maven is (joking, slightly)

@parg parg merged commit 7886cf3 into BiglySoftware:master Jul 8, 2022
@parg
Copy link
Contributor

parg commented Jul 9, 2022

Hmm, I don't like all these red X I'm getting in https://github.com/BiglySoftware/BiglyBT/commits/master etc...

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Jul 11, 2022

@parg

Yeah, we can get rid of the red Xs one of two... no, three ways:

  1. Figure out why the tests are failing under JDK 17, and fix it.1
  2. Disable the JDK 17 test entirely (though, that'll pretty much guarantee nobody ever remembers to attempt item 1).
  3. Tweak the JDK 17 test to always pass even though it's failing. (Which still has a high probability of causing item 1 to be ignored, but slightly less so than the previous option.)

Notes

  1. (WTF is its hangup about Hebrew translations!? ...Though, at the same time, why don't we have Hebrew translations? Seems like a language that would attract translator contributions.)

@ferdnyc ferdnyc deleted the github-ci branch July 11, 2022 02:03
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Jul 11, 2022

  1. (WTF is its hangup about Hebrew translations!? ...Though, at the same time, why don't we have Hebrew translations? Seems like a language that would attract translator contributions.)

Ohhhhh! Seems the language code for Hebrew was changed in JDK 17. Previously the obsolete iw was used, even if the code requested he, but now that's been reversed. So, MessagesBundle_iw_IL.properties holds the Hebrew translations. It's just that under JDK 17 that file should be named MessagesBundle_he_IL.properties.

Hm. That seems... probably fixable. Somehow.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Jul 11, 2022

Hm. That seems... probably fixable. Somehow.

It were! And #2634 fixes it.

TuxPaper pushed a commit that referenced this pull request Oct 24, 2022
* Add GitHub Actions CI

Configured to attempt builds with Java 8 and 11, plus a Java 17
build that is allowed to fail (since it currently is).

* Maven: remove prerequisite config

* Remove TravisCI config

* Maven: Update project version to 3.1.0.1-SNAPSHOT

* CI: add Windows and MacOS (JDK 8 and 11 only)

* CI: Make artifact names unique
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.

None yet

2 participants