-
Notifications
You must be signed in to change notification settings - Fork 47
Update build workflow for Linux #186
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
base: master
Are you sure you want to change the base?
Conversation
Do we need to deploy Qt in the Steam Runtime build, same as we do on Windows? |
The Qt version in the Steam container is unfortunately to old to be used, so an external one is needed for sure. When I tried to run your former linux binary (made with the install-qt-action), my system complained about some missing QT symbols. I am not entirely sure what the install-qt-action does as it includes a lot of abstraction (I assume those python scripts try to download some pre-compiled packages), however I think compiling the QT on the build system against the other libraries yields much more portable results. We can maybe improve the process a little as we use more or less the same container over and over and introduce a new workflow to pre-compile the QT and use it as an artifact during the steam build. What do you think? |
.github/workflows/cmake.yml
Outdated
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout source code | ||
uses: actions/checkout@v1 |
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.
Checkout action v2 doesn't function inside the container?
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.
Good catch. v2 is using node, which in turn requires a minimum version of GLIBC which is not present in the scout runtime https://github.com/baierjan/Ingnomia/runs/4519417849?check_suite_focus=true#step:3:17
I replaced the container with the soldier a while after and totally forgot to retest the compatibility with the v2 after removing scout. Apparently, if we no longer need scout, we can use v2 everywhere. I will update the request.
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.
Same with all the steps replaced by naked wget / unzip further down I suppose? Even if it's more overhead, keeping it uniform for readability is preferred.
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 will retest that. Initially, I was thinking about downloading and extracting all the dependencies in one step on Linuxes and/or extracting it into a custom action inside the repository as I also do not like skipping every other step just because of the target architecture.
.github/workflows/cmake.yml
Outdated
if: matrix.os == 'windows' || matrix.os == 'ubuntu' | ||
|
||
- name: Add buster-backports repository (for newer cmake) | ||
run: echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list |
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 expect pulling in backports is not going to result in a build compatible with the Steam Runtime.
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.
From the documentation at https://gitlab.steamos.cloud/steamrt/steamrt/-/tree/steamrt/soldier#preferred-versions-to-backport, mainly from
The most likely version to be able to backport is the version from the next stable release of Debian, for example backporting from Debian 11 into soldier - this matches official Debian backports. We can use a version from buster-backports as-is, if it exists.
I got the idea, it should not be a problem. After all we need that only for the cmake. On the other hand, it might be a good idea to also limit apt to only use backports repository when stated explicitly (weirdly enough, that is the default which was actually changed by Steam).
The Python scripts are downloading pre-built Qt from qt.io, reasonable choice if the correct version isn't available from regular package sources. Building Qt on your own is a hour-long job on these nodes. When building Qt on your own, going for the static build would be the reasonable choice though. We may do so, as Qt is licensed under GPL 3.0 (and some components under LGPL v3), either of which we are compatible with. We are not actually using most of Qt, so at least in terms of compile size that would be worth it. Looks like we don't get around deploying all of SFML, Qt, Noesis and Steam API when targeting the Steam Runtime. On Windows the same, we can get Steam to install OpenAL system wide for us, so same stuff needs to be deployed. |
3002d78
to
aaeaa10
Compare
So I did some experiments. The new Steam runtime is compatible with the new actions, that is good. However it is not compatible with the I tweaked the Qt installation process to only checkout the qtbase submodule as no other module is needed. That took the time down to 25 minutes (without any cache). I would say that is a good start. The windows build is still mostly untouched, the plain linux build is linked against reasonable new libraries and thus should be playable on recent systems without problems. |
Those missing packages came to Debian in Bulseye, while Soldier runtime is based on Buster. And why it's even installing these, is to work around a (now fixed) Qt bug: https://bugreports.qt.io/browse/QTBUG-88688 Should we go straight for Heavy instead of Soldier runtime? I'm still not happy with building Qt. |
aaeaa10
to
c442085
Compare
I fixed my issue with caching and now it behaves almost the same as downloading pre-build binaries (at least timewise). It seems to me, that there is no other way around for the steam builds. You can either
It is basically your choice as a maintainer, from my point of view, I would use option 3 as it is basically done and it is easy and then go for number 4, when that option become possible. I am not sure if and how good we can test compatibility of the binary with the steam runtime, we might be able to tweak the runtime image more than we think. |
Okay, if the caching works, then compilation isn't such a bad option after all. Still, a couple of options please:
Please let's have a look at what's still left in the |
The Windows workflow is mostly untouched. I updated the Linux workflow to run inside a newer container to build against newer system libraries which should result in more portable builds, hopefully targeting issue rschurade#107. A new job has been added. This build job creates binary inside steamrt soldier container (issue rschurade#183).
c442085
to
f1e801b
Compare
I applied requested options (I needed to experiment a little as some of them are were not valid, probably because I only do a checkout of the qtbase submodule). This is the configure output inside the runtime
The
and we do have a few libraries
|
run: | | ||
apt-get update | ||
apt-get upgrade -y | ||
apt-get install -y cmake g++ libvorbis-dev libqt5opengl5-dev libopenal1 unzip wget |
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.
might be faster to lock these in the container image
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 am not sure what do you mean by that? That would require to use own container image instead of a generic ubuntu:21.04
. Although it would probably be easy to do it, you only spare 1 minute from the total time.
The Windows workflow is mostly untouched.
I updated the Linux workflow to run inside a newer container to build against newer system libraries which should result in more portable builds, hopefully targeting issue #107.
A new job has been added. This build job creates binary inside steamrt soldier container (issue #183).
I have no idea how to properly test the steam binary, though. I took the result of the builds and tested it inside fairly recent snapshot of openSUSE Tumbleweed, it was working well (the win binary worked under wine).