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

Use Github Actions for deployment #5312

Merged
merged 57 commits into from
Sep 26, 2019
Merged

Use Github Actions for deployment #5312

merged 57 commits into from
Sep 26, 2019

Conversation

tobiasdiez
Copy link
Member

@tobiasdiez tobiasdiez commented Sep 12, 2019

Use Github actions and jpackager for deployment. Rip circleci ❤️ . Rip install4j❤️

The following files are created and deployed to builds.jabref.org (and as github artifacts):

  • for Windows: JabRef-5.0.0.msi (installer) and JabRef-portable-windows.zip (unzip & run)
  • for Linux: jabRef-5.0.0-1_amd64.deb & jabRef-5.0.0-1_x64.rpm (packages) and JabRef-portable-linux.tar.gz (untar & run)
  • for MacOS: JabRef-5.0-dev.dmg & JabRef-5.0-dev.pck (packages) and JabRef-portable-macos.tar.gz (untar & run)

Thus, we can provide an installer (or package) as well as a runable version for each OS.


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@koppor
Copy link
Member

koppor commented Sep 12, 2019

The gradle.yml seems like that we can move forward with V8 for citeproc (which requires different builds on different platforms): #3180

@koppor
Copy link
Member

koppor commented Sep 12, 2019

I set Java to 13.0.3 despite the fact that Java 14 was somehow desired. (Background on Java 14: https://jaxenter.de/java-14-update-news-85230). actions/setup-java supports zulu JDK only. Current distrubtions listed at https://static.azul.com/zulu/bin/.

JDK 14 could be installed using the "local file" feature: https://github.com/actions/setup-java#usage

@koppor
Copy link
Member

koppor commented Sep 12, 2019

Currently, the setup-java action does not support JavaFX: actions/setup-java#18

@koppor
Copy link
Member

koppor commented Sep 12, 2019

This PR depends on jpackage, which is currently under development. Possibly, it can replace install4j. For the current builds, we should stick to Install4J, because

  • file association (.bib) unclear with jpackage
  • jpackage needs more effort to get it running

@koppor
Copy link
Member

koppor commented Sep 12, 2019

jlink seems to be dependend on JDK 14: https://github.com/beryx/badass-jlink-plugin#badass-jlink-plugin

@Siedlerchr
Copy link
Member

@koppor
Copy link
Member

koppor commented Sep 25, 2019

  • Regarding the file names: I like JabRef_windows-x32_5_0-dev--snapshot--2019-09-12--githubActions--92c970011.XXX better than JabRef-5.0.1.XXX. A version string (such as 5.0.1) implies that there is ONE binary for that version (meaning, there is a 1:1 mapping to a binary). In the current implementation, it is a 1 to n mapping. For one version, there exist multiple binaries. This is IMHO not a good user experience... Would it be possible to use snapshot in the filenames. It is OK for me to drop the release date from the executable (and possibly also in the info screen)

Old screen

grafik

New screen

grafik

I can accept that we do not include any release date and commit id into the executable any more. I think, in the last years, we never checked for a commit id.

I think, I cannot accept that we do not have dev or SNAPSHOT in the filename.

@koppor
Copy link
Member

koppor commented Sep 25, 2019

With build/distribution folder I mean that if I as user unzip/untar the binary, I get the folder build. In this folder, there is the folder distribution. Then, I find JabRef. On windows, I find JabRef.exe. On Linux, I find bin/jabref.

I would have exepected JabRef/JabRef.exe, without the additional nesting in build/distribution.

@tobiasdiez
Copy link
Member Author

The problem was that on Windows and Linux the version string had to be of the form 5.0.0.0 without additional "dev", "alpha" or whatever specification. I didn't bother changing the file names as I don't think its that important (we always refer the user to "build.jabref.org" with the words "please try out the development version..." so it that information is there from the context). But feel free to add "dev" to the files - shouldn't be that difficult as you can simply run any bash command you want. (I don't think we need to add the date (already present as file creation date), snapshot (duplication with dev) or the branch name & commit hash (not important for the user).)

The linux file folder structure of the tar should be fixed now.

That leaves the problem with the version string in the about dialog. I agree that it should contain all information. I didn't change anything fundamental in the script

jabref/build.gradle

Lines 511 to 542 in 701196a

/*
* Changes project.version to VERSION--DATE--GIT_HASH
*/
if (hasProperty('dev')) {
String command = "git log --pretty=format:%cd--%h -n 1 --date=short"
String commitInfo = ""
if (OperatingSystem.current().isWindows()) {
commitInfo = "cmd /c $command".execute().in.text
} else {
commitInfo = command.execute().in.text
}
// determine branch
command = "git symbolic-ref -q --short HEAD"
String branchName = ""
if (OperatingSystem.current().isWindows()) {
branchName = "cmd /c $command".execute().in.text
} else {
branchName = command.execute().in.text
}
// A newline is returned. Remove it. (trim())
// In the context of github, the branch name could be something like "pull/277"
// "/" is an illegal character. To be safe, all illegal filename characters are replaced by "_"
// https://stackoverflow.com/a/15075907/873282 describes the used pattern.
branchName = branchName.trim().replaceAll("[^a-zA-Z0-9.-]", "_")
// hack string
// first the date (%cd), then the branch name, and finally the commit id (%h)
String infoString = commitInfo.substring(0, 10) + "--" + branchName + "--" + commitInfo.substring(12)
project.version += "--" + infoString
}
but I guess it is not called before
expand(version: project.version,
. Proposal: instead of overwriting project.version (and having the additional versionThreeDots) make a function that creates a full version info and use this in the expansion of build.properties. But I don't have the gradle experience so I leave it to you to decide if that's the best approach.

@Siedlerchr
Copy link
Member

The commit hash is important, to recognize if they use the correct master version.

@tobiasdiez
Copy link
Member Author

Yes, its important in the about dialog (but not in the file name).

@koppor
Copy link
Member

koppor commented Sep 25, 2019

(Filename discussion)

Side note: In install4j, we kept the four dot version and changed the version internally only. With jpackage, however, this hack seems to stop working.

  • date (already present as file creation date) --> If I download the file, the file gets a new date on my machine
  • snapshot (duplication with dev) --> snapshot (more common in the java world) or dev (what we used until now) - both solutions are OK for me.
  • commit hash (not important for the user) -- OK for me to have that in the about dialog only. -- We then accept that two files with the same filename (on different directories) lead to different versions (is OK as other tools like java.exe also do it)

So, OK for me to go with 5.0-dev as filename. In case we need 5.0.0-dev, we should adapt our program versioning to semantic versioning, too. Otherwise, it will be confusing for users, why only one dot is communicated, but the program version itself has two dots.

@koppor
Copy link
Member

koppor commented Sep 25, 2019

(Gradle discussion)

I need to google that. No clue.

@koppor
Copy link
Member

koppor commented Sep 25, 2019

Note to self: Current file list: https://builds.jabref.org/githubActions/

@tobiasdiez
Copy link
Member Author

The version string in the about dialog is now working (in the end, the -Pdev=true switch was missing).
I'll merge this PR now to get early feedback from the users. Renaming the files can be done later.

@tobiasdiez tobiasdiez merged commit 124fadb into master Sep 26, 2019
@tobiasdiez tobiasdiez deleted the githubActions branch September 26, 2019 20:01
@koppor
Copy link
Member

koppor commented Sep 26, 2019

We seem to switch to the fail-fast pattern... OK for me, but a different philosophy. The master branch still seems to be release-ready. 😅

@koppor
Copy link
Member

koppor commented Sep 26, 2019

I checked all builds at https://github.com/JabRef/jabref/runs/237858080. We do not seem to distribute a jar file anymore. Is this intended?

So we break the Gentoo distribution (refs #3380 (comment)). -- deep link to the ebuild script: https://github.com/jonasstein/jstein-overlay/blob/master/app-text/jabref-bin/jabref-bin-4.9999.ebuild

@tobiasdiez
Copy link
Member Author

Yes, the jar file was not working - that was the main motivation for this PR in the first place. Thus, me merging quickly is more a fix-fast approach ;-)

The packages for Linux need to be changed indeed. But since we now provide rpm and deb packages, as well as a version where you only need to unpack it, the distribution should be more easy now.

@Siedlerchr
Copy link
Member

There seems to be some problem with the jdk setup now.
https://github.com/JabRef/jabref/runs/240665291

@koppor
Copy link
Member

koppor commented Sep 30, 2019

3 hours later, in the master branch, everything was OK: https://github.com/JabRef/jabref/commit/3e1195d5d551014068a1731fa77f5f96b99a3be2/checks

Temporary issue?

@Siedlerchr
Copy link
Member

The problem was in the jdk action, seems like they fixed it

Siedlerchr added a commit that referenced this pull request Mar 14, 2021
30fb68e Create BJEDIS-ABNT-Number (#5255)
aafb868 Update geochimica-et-cosmochimica-acta.csl (#5321)
60ba25f british-journal-of-anaesthesia.csl: add comma delimiter between non-sequential citations eg. 1 4 7-9 -> 1, 4, 7-9  (#5313)
67e6564 Reindent/reorder (#5318)
c0d2a39 Ruby 3.0.0 (#5309)
76d60ff Update harvard-anglia-ruskin-university.csl (#5310)
bc18ac9 Create journal-for-the-study-of-the-new-testament.csl (#5312)
aff602c Update journal-of-food-protection.csl (#5315)
4503826 Update muscle-and-nerve.csl (#5317)
3bed58e constant redefinition
4d718a0 update documentaiton link
fa99e2f add comma delimiter between succesive numbers
d396f8b Allow privileged testing of PRs (#5307)
43b22c7 Update masarykova-univerzita-pravnicka-fakulta.csl, pravnik.csl, iso690-full-note-cs.csl (#5308)
8a31c1e Update copernicus-publications.csl (#5303)
96760bb Update anabases.csl (#5304)
744de6d removed locale (#5300)
7eb0d60 Update aviation-space-and-environmental-medicine.csl (#5297)
2769970 Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (#5298)
51e3f4c Update harvard-university-of-bath.csl (#5299)
5fce84f Create cns-spectrums.csl (#5290)
bb8082c Create journal-of-surgical-oncology.csl (#5259)
90c13ae Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (#5288)
4bab1ad Update early-christianity.csl (#5289)
636ba78 Update tatup-zeitschrift-fur-technikfolgenabschatzung-in-theorie-und-… (#5291)
b7cc511 Create biotechnologia.csl (#5292)
5bab881 Update journal-of-orthopaedic-trauma.csl (#5287)
5943413 Fix locales (#5285)
302bd65 Update universite-du-quebec-a-montreal-departement-dhistoire.csl (#5286)
860ae48 Add Haaga-Helia University of Applied Sciences Harvard style (#5282)
c1c27de  Localize Metropolia style title (#5283)
508da89 Fix presentation for Methods of Information in Medicine (#5284)
53e1d0b Create geschichte-und-gesellschaft.csl (#5216)
d7ed0cb Create universite-de-geneve-departement-de-francais-moderne.csl (#5212)
80c404b Update journal-of-orthopaedic-trauma.csl (#5281)
20c143a Adding publishers' names (#5280)
6e5cd59 Update sodertorns-hogskola-oxford.csl (#5279)
52f2621 dollar-brace
a260294 Create journal-of-microbiology-and-biotechnology.csl (#5277)
1fc979e Create qeios.csl (#5261)
86347b7 GH does this for us -- again, sorry guys
b649589 Create experimental-biology-and-medicine.csl (#5276)
12ae0b1 Revert "tell sheldon about the job state"
bdcae89 tell sheldon about the job state
1240067 Add Vegetation classification and Survey (#5271)
6f398f0 Major update to Gallia.csl (#5269)
2a74b2c Update filters.yaml (#5273)
20046d2 Update spec_helper.rb (#5272)
2ee0dd8 Create the-sociological-review.csl (#5260)
5b8d09c move filters to inert file to pacify Sheldon (#5268)
e5f3315 Localize more language descriptors in style titles (#5270)
bfd2942 Localize more language descriptors in style titles (#5267)
35e276f Fix variable used for the label after indication of number of pages (#5240)
60f6371 Create Universidade-do-Estado-do-Rio-de-Janeiro.csl (#5247)
d8cc2ae Create the-journal-of-the-acoustical-society-of-america-numeric.csl (#5256)
92259c1 Create journal-of-financial-and-quantitative-analysis.csl (#5264)
6ba8aab Create journal-of-vestibular-research.csl (#5258)
0c88f41 Update european-journal-of-international-law.csl (#5265)
cff5abc Put language descriptor within parentheses
4a62709 Update monash-university-harvard.csl (#5253)
64fd1aa Localize more language descriptors in style titles (#5262)
f6519cb Localize more language descriptors in style titles (#5257)
170ccae tiny fixes for universitat-basel-iberoromanistik.csl (#5254)
b7284c9 Localize more language descriptors in style titles (#5252)
f4ef858 Add "Baishideng Publishing Group" dependents (#5251)
266e7c3 Make world-journal-of-hepatology.csl to bpg.csl parent (#5243)
9129098 fix small formatting issues for mclc.csl (#5229)
5d9560b Create crispr-journal.csl (#5249)
a217299 Change "Czech" to "Čeština" in titles (#5248)
4fef39a Create journal-of-open-research-software.csl (#5245)
2bff1a6 Change "Dutch" to "Nederlands" in titles (#5242)
f28da34 Update spec_helper.rb (#5246)
e0e977c Move content from wiki pages to markdown files (#5194)
018304c Update universite-de-montreal-apa.csl (#5239)
3b83e5c Create sodertorns-hogskola-oxford.csl (#5234)
1335378 Stop notifying 8827 port on Zotero servers (#5237)
f079b2a Update author-year disambiguation (#5238)
60bb0c9 Update technische-universitat-dresden-medizin.csl (#5236)
e374657 Create Leidraad voor juridische auteurs 2019 (Dutch) (#5223)
0450d89 Add new style for U of Mannheim, Germanistische Linguistik (#5228)
81f0689 Create health-sports-rehabilitation-medicine.csl (#5233)
c152a44 Update Gemfile.lock (#5235)
748e1eb Update geochimica-et-cosmochimica-acta.csl (#5231)
06b9ce8 Update zeitschrift-fur-theologie-und-philosophie.csl (#5230)
e747cb1 haute-ecole-de-gestion-de-geneve: Make polyglot & et al changes
4cfedb7 Create universite-de-sherbrooke-histoire.csl (#5210)
a96a61e Update journal-of-glaciology.csl (#5222)
c6a94c9 Add Journal of Human Rights (#5227)
c5c9c5f Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (#5214)
ffb7aa6 Create comparativ.csl (#5215)
e07329a Update lancaster-university-harvard.csl (#5220)
c075d41 Update mimesis-edizioni.csl (#5219)
502970a Removed space in year only citation (#5218)
13e8c6b Update acta-scientiae-veterinariae.csl (#5209)
0699da6 Remake mammallia.csl for Oct/2020 guidelines. (#5207)
b2dd3fd Update journal-of-international-business-studies.csl (#5217)
dd52bfe Update quaternaire.csl (#5199)
ccb1b0d rebuild webpage and article-journal citations in journal-of-forensic-sciences.csl (#5203)
f02f4fb Create pedosphere.csl (#5196)
70dd87a Create open-gender-journal.csl (#5198)
d272998 Create the-quarterly-journal-of-economics.csl (#5197)
d27cab3 fix locale issues, add cite-locator (#5206)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 30fb68e
@koppor koppor mentioned this pull request Jun 11, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants