Skip to content

Commit 6662830

Browse files
committed
ENH: Add Qt6 build to CI workflow
- Extend matrix with qt-major-version (5, 6) to exercise both Qt versions. - Split Qt install into Qt 5 and Qt 6 steps conditioned on qt-major-version. - Keep using system VTK only for Qt 5 builds; disable it for Qt 6 builds. - Derive CTK_QT_VERSION from qt-major-version in the configure step. - Update diagnostic step to print both Qt5_DIR and Qt6_DIR from CMake cache.
1 parent ac913e8 commit 6662830

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
runs-on: ["ubuntu-latest"]
24+
qt-major-version: [5, 6]
2425
steps:
2526
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
2627

@@ -36,7 +37,8 @@ jobs:
3637
- name: Retrieve new lists of APT packages
3738
run: sudo apt-get update
3839

39-
- name: Install Qt
40+
- name: Install Qt 5
41+
if: ${{ matrix.qt-major-version == 5 }}
4042
run: |
4143
sudo apt-get install -y \
4244
qtbase5-dev \
@@ -50,17 +52,33 @@ jobs:
5052
libqt5x11extras5-dev \
5153
libxt-dev
5254
53-
- name: Install VTK
54-
if: matrix.runs-on == 'ubuntu-latest'
55+
- name: Install VTK (Qt 5)
56+
if: ${{ matrix.runs-on == 'ubuntu-latest' && matrix.qt-major-version == 5 }}
5557
run: |
5658
sudo apt-get install -y \
5759
libvtk9-dev \
5860
libvtk9-qt-dev
5961
62+
- name: Install Qt 6
63+
if: ${{ matrix.qt-major-version == 6 }}
64+
run: |
65+
sudo apt-get install -y \
66+
qt6-base-dev \
67+
qt6-base-private-dev \
68+
qt6-5compat-dev \
69+
qt6-multimedia-dev \
70+
qt6-scxml-dev \
71+
qt6-tools-dev \
72+
qt6-tools-dev-tools \
73+
qt6-svg-dev \
74+
qt6-webengine-dev \
75+
libqt6openglwidgets6 \
76+
libxt-dev
77+
6078
- name: Configure CTK
6179
run: |
6280
cmake \
63-
-DCTK_QT_VERSION:STRING=5 \
81+
-DCTK_QT_VERSION:STRING=${{ matrix.qt-major-version }} \
6482
-DCTK_ENABLE_Widgets:BOOL=ON \
6583
-DCTK_USE_SYSTEM_VTK:BOOL=$CTK_USE_VTK \
6684
-DCTK_LIB_Visualization/VTK/Widgets:BOOL=$CTK_USE_VTK \
@@ -81,11 +99,14 @@ jobs:
8199
-B CTK-build \
82100
-S .
83101
env:
84-
CTK_USE_VTK: "${{ matrix.runs-on == 'ubuntu-latest' && 'ON' || 'OFF' }}"
102+
CTK_USE_VTK: "${{ matrix.runs-on == 'ubuntu-latest' && matrix.qt-major-version == 5 && 'ON' || 'OFF' }}"
85103

86-
- name: Display Qt5_DIR
104+
- name: Display Qt_DIR
87105
run: |
88-
cat CTK-build/CMakeCache.txt | grep ^Qt5_DIR
106+
echo "Qt5_DIR:"
107+
cat CTK-build/CMakeCache.txt | grep '^Qt5_DIR' || true
108+
echo "Qt6_DIR:"
109+
cat CTK-build/CMakeCache.txt | grep '^Qt6_DIR' || true
89110
90111
- name: Build CTK
91112
run: |

0 commit comments

Comments
 (0)