Right now we only can install on ~14.04~ 16.04, which is pretty bad since it's ~4~ 2 years out of date. I know there's something about travis that was in the way before, but we need to get this resolved.
I think worst case we should be able to use an Ubuntu 18.04 docker image, compile inside it, and get the resulting .deb out via a volume.
Somewhat related #2898
Any update on this? Installing the deb package on 18.04 fails due to dependencies.
dpkg: dependency problems prevent configuration of cockatrice:
cockatrice depends on libprotobuf9v5; however:
Package libprotobuf9v5 is not installed.
cockatrice depends on libqt5websockets5 (>= 5.3.0); however:
Package libqt5websockets5 is not installed.
libqt5websockets5 is available for 18.04, you just need to install the package.
libprotobuf9v5 is not available for 18.04, its version was bumped to libprotobuf10.
I guess the best bet you have is to compile Cockatrice: https://github.com/Cockatrice/Cockatrice/wiki/Compiling-Cockatrice-(Linux)#ubuntu-16xx17xx18xx
No update, this needs someone to work on it
If someone can have a chat with me on Gitter I'm sure we can set something up since the basic construct is working but I fail with the right commands to get compiling inside docker to work.
@tooomm can you open a WIP PR?
Looks like appveyor now supports building on Linux, too, and they have Ubuntu 18.04 Bionic Beaver images available: https://www.appveyor.com/docs/linux-images-software/
Yes, I mentioned that in Gitter already. Though, @Daenyth's preference was to not use it because it puts even more stress on AppVeyor (which builds already very slowly), and supports no parallel jobs for free unlike travis...
I've no idea if it would have 1x windows AND 1x linux in parallel maybe?
I think we'd accept an update to the config if someone does it, but I am concerned about the automatic github release thing we use for auto-update. I know appveyor works differently than the others, so idk.
As a fellow linux user I too would like this awesome program to be updated for 18.04 and Linux Mint 19 (also 18.04 based.).
I have a machine and I'd be willing to do the builds as long as someone could help modify the requirements for libprotobuf or something of the sort. (Basically update it to the 3.0.0 revision, from Libprotobuf9.5 to Libprotobuf10) If I knew more about libprotobuf and cockatrice I would do it myself, but I don't know much about either aside from how to use cockatrice.
That's generous but we need a CI server doing the builds rather than a person.
I could set up a Jenkins or Travis style CI server if you'd like. I've managed to compile Cockatrice on my desktop for 18.04 and it works well.
We use Travis already, and Travis itself only provides support for 16.04.
So we need to use their docker service to build Cockatrice inside a Ubuntu 18.04 LTS container.
If you can help with that, that would be great and highly appreciated.
I started to work on that already, but didn't finish it and currently have no time to look further. Since I've no experience with docker and compiling in linux I had some troubles.
My branch on github: https://github.com/Cockatrice/Cockatrice/tree/tooomm-docker
Last travis build from that branch: https://travis-ci.org/Cockatrice/Cockatrice/jobs/422827071
If you have any input, you can edit my travis.yaml configuration file in that branch and send a pr!
There's the servatrice dockerfile which does the kind of compilation we need, it's just not written to be flexible enough for the way we want to build. Would be a good starting point
@tooomm your script section in travis.yaml is launching a new docker container each time you docker exec; you need to make a Dockerfile
@Daenyth I reused your Dockerfile from the repo for now (note: it only builds servatrice).
But after the docker run command, Travis times out because no further output is received for 10 minutes:
https://travis-ci.org/Cockatrice/Cockatrice/jobs/446908988#L3053-L3082
I used the following commands: https://github.com/Cockatrice/Cockatrice/blob/tooomm-docker/.travis.yml#L19-L24
Edit: If I use the -d option as well, the useful output when starting up servatrice isn't shown, but the run command doesn't hang up and the build finishes: https://travis-ci.org/Cockatrice/Cockatrice/jobs/447114599#L3614-L3618
This way we could test the Dockerfile at least to keep it up to date (it was outdated already and didn't work for me without changes).
You don't need to do docker run I believe. We just need to make it so that the docker build puts the built image in a volume, and then we can extract the deb file from the volume. Good start!
@Daenyth How do multi-stage container, that you mentioned in #2898, exactly work and how do they help us here?
Still figuring how copying/extracting files from a container works as I've had no time to try further.
A multi-stage container would be useful because it would allow us to have multiple entry points - we could build a base image that has compilation dependencies and then do the application layers on top of it.
It's strictly necessary for this - I'm fine just having one container compile it all.
We need to confirm that deploy works correctly for all new packages from the docker container, and test installation with the resulting packages.
Last time we tried with the new docker image, the packages were not named correctly and deployment wasn't working for all yet.
This worked for the latest releases.
Most helpful comment
Looks like appveyor now supports building on Linux, too, and they have Ubuntu 18.04 Bionic Beaver images available: https://www.appveyor.com/docs/linux-images-software/