Skip to Content
  • Home
  • Blog
  • Privacy Policy
  • Terms And conditions
  • Disclaimer
  • About Us
      • Home
      • Blog
      • Privacy Policy
      • Terms And conditions
      • Disclaimer
      • About Us
  • Knowledge Base
  • Qt6 CMake CI Docker Action – Reproducible Builds on GitHub Actions
  • Qt6 CMake CI Docker Action – Reproducible Builds on GitHub Actions

    Learn why, what, and how to use the Qt6 CMake CI Docker Action for consistent, cross‑platform builds on GitHub Actions.
    1 February 2026 by
    Suraj Barman

    Why Use a Docker‑Based Approach?

    Building Qt6 projects in CI often suffers from environment drift: different runner OS versions, varying aqtinstall outputs, and inconsistent CMake/Ninja installations. Docker eliminates these variables by providing a single, immutable Ubuntu image for every run.

    • Identical toolchain on Ubuntu, Windows, and macOS runners
    • No hidden dependency differences
    • Fully reproducible builds across commits
    • Reduced maintenance of platform‑specific scripts

    What the Qt6 CMake CI Action Does

    The action automates the entire build pipeline inside a Docker container:

    • Installs the requested Qt6 version using aqtinstall
    • Sets up CMake and Ninja (pre‑installed in the image)
    • Executes the CMake configuration and Ninja build steps
    • Runs on any GitHub‑hosted runner while the actual build runs in Linux

    How to Use the Action

    Add a step to your workflow that references the action and supplies the required inputs.

    • qt-version – The exact Qt6 version (e.g., 6.6.1) – required
    • source-dir – Path to the directory containing CMakeLists.txt; defaults to repository root
    • modules – Space‑separated list of additional Qt add‑on modules (e.g., qtimageformats qtshadertools)

    Example Workflow

    A minimal GitHub Actions workflow that builds a Qt6 project:

    • name: Build Qt6 Project
    • on: [push, pull_request]
    • jobs:
    • build:
    • runs-on: ubuntu-latest
    • steps:
    • - uses: actions/checkout@v4
    • - name: Install Qt6 and build
    • uses: acc-vcc/qt6-cmake-ci-action@v1
    • with:
    • qt-version: "6.6.1"
    • # modules: "qtimageformats qtshadertools"
    • - name: Upload artifacts
    • uses: actions/upload-artifact@v4
    • with:
    • name: build
    • path: build/

    Supported Environments

    The action runs on all GitHub‑hosted runners (Ubuntu, Windows, macOS) because the actual build occurs inside a Linux Docker container.

    • Ubuntu‑latest, windows‑latest, macos‑latest runners
    • CMake ≥ 3.24 and Ninja preinstalled in the image
    • All core Qt6 modules (Core, GUI, Widgets, QML) are available by default

    Benefits of the Docker‑Based Action

    Using this action provides several long‑term advantages for Qt6 developers:

    • Consistent build results regardless of host OS
    • Simplified CI configuration – only the Qt version is required
    • Easy addition of optional Qt modules via the modules input
    • Potential for build caching and faster subsequent runs
    • Extensible for GUI testing (Xvfb/noVNC) and Qt Installer Framework automation

    Latest Stories

    Explore fresh ideas and updates from our editorial team.

    See All
    Your Dynamic Snippet will be displayed here... This message is displayed because you did not provide enough options to retrieve its content.

    Copyright © 2026 TechStora. All Rights Reserved.