-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Initial shot for snapcraft.yaml #2345
Conversation
69f05c2
to
a7a8b3e
Compare
9b71e35
to
af78a63
Compare
I currently cannot test, no working VM with X11. Maybe someone else has? |
I get the same problems with the diriver:
I found this issues which are similar and there seems to be some libgl stuff missing or whatever (not an expert in that area) |
d4be7e5
to
c2f1bfb
Compare
@koppor do you think this is feasible for 4.0? I would really like to include this in 4.0, but then we would have to include it into a beta version, so people can test it. |
Yes, I do think so. We also testers, so it is a very good idea to include it in beta-3. |
.gitignore
Outdated
@@ -51,83 +51,23 @@ jabref.xml | |||
|
|||
|
|||
|
|||
# Created by https://www.gitignore.io/api/gradle,java,jabref,intellij,eclipse,netbeans,windows,linux,macos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to the gitignore? This diff seems strange to me if I think about the purpose of the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I just regenerated it - i regenerated using gitigonre.io 😇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More specifically, I added snapcraft
to the API call. Instead of sorting the updates out, I just replaced the whole output
.gitignore
Outdated
@@ -269,4 +296,5 @@ gradle-app.setting | |||
|
|||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 | |||
# gradle/wrapper/gradle-wrapper.properties | |||
scenicView.properties | |||
|
|||
# End of https://www.gitignore.io/api/gradle,java,jabref,intellij,eclipse,netbeans,windows,linux,macos,snapcraft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this binary file below good for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.snapcraft/travis_snapcraft.cfg
is the travis-encrypted file with my personal credentials enabling an upload to the Ubuntu app store.
.travis.yml
Outdated
- if [ "$TEST_SUITE" == "checkstyle" ]; then ./gradlew checkstyleMain checkstyleTest checkstyleJmh; fi | ||
- if [ "$TEST_SUITE" == "guiTest" ]; then ./buildres/gui-tests.sh; fi | ||
|
||
after_success: | ||
# enable codecov report | ||
- ./gradlew jacocoTestReport | ||
- bash <(curl -s https://codecov.io/bash) | ||
- if [ "$TEST_SUITE" != "checkstyle" ] && [ "$TEST_SUITE" != "snapcraft" ]; then ./gradlew jacocoTestReport && bash <(curl -s https://codecov.io/bash); fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens here? Why do you run it with checkstyle && snapcraft only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not checkstyle and not snapcraft makes guitest and normal test... checkstyle does not run any tests and snapcroft doesn't too.
build.gradle
Outdated
rename { String fileName -> | ||
fileName.replace('-fat', '') | ||
} | ||
} | ||
file("$buildDir/releases/JabRef-${project.version}.jar").setExecutable(true, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snapcraft.yaml
Outdated
# based on https://github.com/snapcore/snapcraft/blob/master/demos/gradle/snap/snapcraft.yaml | ||
|
||
name: jabref | ||
version: '4.0-dev' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value needs to be documented (that it has to be changed) if it cannot be parametrized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run-snapcraft.sh line 3: The value is changed upon run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll document that.
It's not so cool that we mix our build environments again but hey... |
Yeah, I also don't like it. However, snapcraft is supported for CircleCI 2.0 only. I tried to port our build to CircleCI 2.0 at https://github.com/JabRef/jabref/tree/circleci20, but I did not succeed. Needs much more work... |
We can also use launchpad to build snaps: It checks for new commits 4 times a day from github: |
While JabRef now starts and runs fine, I still get the xprops error:
|
I don't get the reason for the issue with
|
I get the same output, and
As these ATK is some gnome stuff, I believe it has to do with my Xfce desktop environment. So maybe someone with gnome or KDE can test this I also tried to install java-atk-wrapper, not still same error |
I would propose
|
Thus, I merge. 😇 |
Current state: gradle binary cannot be downloaded from https://build.snapcraft.io. See: canonical-web-and-design/build.snapcraft.io#918 |
The new location is handled at #3107. |
Future tracking of SnapCraft is tracked at #3121 |
Future tracking of SnapCraft at #3121
This outlines how we could get into the app store of Ubuntu (https://developer.ubuntu.com/en/desktop/ and https://shop.canonical.com/index.php?cPath=19). The issue is that snap is only supported in Ubuntu 16.04 LTS.
Thus, this PR fails. We have to interpret following gist https://gist.github.com/evandandrea/c754964bfdfb176844f26f605ebbb8db and try to adapt it.It seems that the IRC channel is the only help out there. The gradle support is very new (see canonical/snapcraft#912).
Is there some Linuxer out there who wants to take over?Howto install and update
snap install jabref --edge --devmode
snap refresh jabref --edge --devmode
Current state
Travis is used for building as currently only CircleCI 2.0 is supported for building and we use CircleCI 1.0 for building. A switch to CircleCI 2.0 is tested at branch circleci20, but does currently not work and it does not seem to be easy to get it runningbuild takes approx. 9:30minmaster
branch only (currentlysnapcraft
only) to avoid much too much development versions at Ubuntu.4.0-dev
.snapcraft.yaml
workingGet travis to workBlocked by https://forum.snapcraft.io/t/proxy-errors-on-large-uploads/1228solved by uploading one build at a timejavafx warning: WARNING: Loading FXML document with JavaFX API of version 8.0.112 by JavaFX runtime of version 8.0.111
- we cannot do anything about that: openjfx is version 8.0.111 in Ubuntu Zetsy.work on transfer to https://code.launchpad.net/~jabref/+snaps for allowing building on ubuntu instead of build on travisSteps after merging
adapttravis.yml
to build snap only at themaster
branch (and notsnapcraft
).Howto build locally
docker run -it -v /d/git-repositories/jabref/jabref:/tmp/snap koppor/docker-snapcraft-java-de bash
cd /tmp/jabref
References