Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. GitHub Actions CI best-known-methods to support Qt applications

GitHub Actions CI best-known-methods to support Qt applications

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 5 Posters 287 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ravenwater
    wrote on 13 Mar 2025, 13:57 last edited by Ravenwater
    #1

    We are using GitHub actions for our CI, and we want to bring in Qt to some of our applications.

    What is the best-known method to install the required Qt components to leverage GitHub CI?

    1 Reply Last reply
    1
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 13 Mar 2025, 20:30 last edited by
      #2

      Hi and welcome to devnet,

      You can use the aqtinstall project for that.
      The Qt online installer now also has a batch mode that should allow you to do this.
      There's also an existing action based on aqtinstall that might be of interest (I have not used it yet).

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • K Offline
        K Offline
        KH-219Design
        wrote on 14 Mar 2025, 14:37 last edited by
        #3

        I want to second @SGaist 's mention of aqtinstall. I have found it effective, ergonomic, and stable while using it (since at least 2020) to support builds for a number of platforms: linux, windows, mac, android, ios. In addition to the aqtinstall docs that @SGaist linked to, you can take a look at aqtinstall github activity to see their good communication and upkeep.

        Other options you might consider:

        • building your own set of Qt libs (offline, pre-CI) ; hosting them somewhere; using curl or wget or similar to retrieve them in CI.
        • building your own docker container with Qt libs inside it, and following GitHub docs about running actions in your own chosen container (instead of GitHub "runner" VMs).

        www.219design.com
        Software | Electrical | Mechanical | Product Design

        1 Reply Last reply
        1
        • P Offline
          P Offline
          Paul Colby
          wrote on 15 Mar 2025, 00:37 last edited by
          #4

          Also supporting @SGaist's reply, for GitHub Actions, I use the install-qt-action action quite a lot. Here's a bit of an extreme example of a project of mine that builds on GitHub Actions for all latest Qt minor releases from Qt 5.9 to 6.9 Beta 2, on Linux, Windows and macOS (skipping Qt 6.0 and 6.1 though, just because they don't support Bluetooth, which that project uses), with gcc, clang, msvc and mingw, for x86, x86-64 and arm64 (currently 146 different bulds) : https://github.com/pcolby/dokit/blob/main/.github/workflows/build.yaml

          More than happy to try to answer any questions you might have about Qt on GitHub Actions, since I've had to figure out a lot of the corner cases the hard way! But most of my learnings are covered in the comments in that build.yaml file :)

          Cheers.

          1 Reply Last reply
          3
          • S Offline
            S Offline
            SlySven
            wrote on 9 Apr 2025, 00:01 last edited by
            #5

            Unfortunately that action has broken in the last 12 hours... something is messed up and it seems to be down to a python module (wheel) which got updated to 46.0 and borked things... waiting urgently on a fix!

            1 Reply Last reply
            0
            • P Offline
              P Offline
              Paul Colby
              wrote on 9 Apr 2025, 06:10 last edited by
              #6

              Hi @SlySven, perhaps the issue has been resolved already? I just did a complete run of 146 builds, and they all passed correctly. You can see the builds here.

              That said, on Ubuntu (only) I don't rely on install-qt-action to install Python, so perhaps that gets around the issue you mentioned? eg, I do this for Ubuntu runners (not macOs nor Windows):

                   - uses: actions/setup-python@v5
                      with:
                        python-version: '>=3.9'
                   - uses: jurplel/install-qt-action@v4
                      with:
                        ...
                        setup-python: false
              

              Cheers.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved