Building and Deploying QT applications using Gitlab CI/CD (docker preferably)
-
wrote on 4 Jul 2024, 11:51 last edited by lukutis222 7 Apr 2024, 11:52
Hello. I have a server that is dedicated for storing my application update files. Whenever I want to deploy new application, I pack all required files (.exe, .dll and etc) to .zip file and upload it to my server. On my server I also have a
version.txt
document that simply shows which version is the latest version of my application. When a user runs my application, it automatically sends a request to my server to check the version.txt document and it performs an update if required.This process is tested and it works fine, however I do not like the fact that I have to manually build/deploy and upload my
update.zip
to the server, Ideally I would like to automate this process using Gitlab CI/CD pipeline.I have used CI/CD for various other projects (mostly involved STM32 MCU's and I am able to build/deploy STM32 projects and place the requires files to the Gitlab as artifacts using specific Docker image that is able to build STM32 projects. I am hoping to do the same with QT application.
I have tried to find Docker image for building QT applications but I was not able to find any (I have found a few but they were last updated 5-6 years ago so they do not support latest QT versions). Perhaps someone have experience with QT applications build/deploy automation process and could throw some ideas?
-
wrote on 4 Jul 2024, 17:24 last edited by
Here is a sample project that I help maintain. It uses Github CI "runner" machines, which is very github-specific.
However, despite the fact that the Github "runner" has a lot of packages preinstalled, the following script still captures 90% or more of my build dependencies:
- https://github.com/219-design/qt-qml-project-template-with-ci/blob/a85e7f49a12/tools/ci/provision.sh
In other words, the apt-get
install
lines shown there are a half-decent starting point for your Docker.Caveat: the
i386
things are there for Android support. If you are not building for Android (or anything else withi386
architecture), then you can delete those.
1/2