Skip to content

Commit 40f9d9f

Browse files
committed
Add Ubuntu 20.04 Qt 6.10.3 build workflow
1 parent 8f94e20 commit 40f9d9f

1 file changed

Lines changed: 173 additions & 0 deletions

File tree

.github/workflows/qt6-focal.yml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# Build Qt 6.10.3 against Ubuntu 20.04 (Focal) and publish it as an artifact.
2+
# The artifact can subsequently be consumed by the Focal Mixxx build.
3+
4+
name: Qt 6.10.3 - Ubuntu 20.04
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
tags:
11+
- '*'
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
17+
concurrency:
18+
group: qt6-focal-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
env:
22+
QT_VERSION: 6.10.3
23+
QT_PREFIX: /opt/qt/6.10.3
24+
QT_SRC: ${{ github.workspace }}/qt-src
25+
QT_BUILD: ${{ github.workspace }}/qt-build
26+
27+
jobs:
28+
build-qt6:
29+
name: Qt 6.10.3 / Focal
30+
runs-on: ubuntu-24.04
31+
container:
32+
image: ubuntu:20.04
33+
options: --user root
34+
steps:
35+
- name: Check out repository
36+
uses: actions/checkout@v4
37+
38+
- name: Install build dependencies
39+
shell: bash
40+
run: |
41+
set -euxo pipefail
42+
export DEBIAN_FRONTEND=noninteractive
43+
apt-get update
44+
apt-get install -y --no-install-recommends \
45+
ca-certificates \
46+
build-essential \
47+
cmake \
48+
ninja-build \
49+
perl \
50+
python3 \
51+
git \
52+
wget \
53+
xz-utils \
54+
pkg-config \
55+
libfontconfig1-dev \
56+
libdbus-1-dev \
57+
libegl1-mesa-dev \
58+
libgl1-mesa-dev \
59+
libglib2.0-dev \
60+
libicu-dev \
61+
libinput-dev \
62+
libx11-dev \
63+
libx11-xcb-dev \
64+
libxcb1-dev \
65+
libxcb-glx0-dev \
66+
libxcb-keysyms1-dev \
67+
libxcb-image0-dev \
68+
libxcb-render-util0-dev \
69+
libxcb-render0-dev \
70+
libxcb-shape0-dev \
71+
libxcb-shm0-dev \
72+
libxcb-xfixes0-dev \
73+
libxcb-xinerama0-dev \
74+
libxcb-xkb-dev \
75+
libxkbcommon-dev \
76+
libxkbcommon-x11-dev \
77+
libxext-dev \
78+
libxfixes-dev \
79+
libxi-dev \
80+
libxrender-dev \
81+
libxrandr-dev \
82+
libxcomposite-dev \
83+
libxcursor-dev \
84+
libxdamage-dev \
85+
libx11-xcb-dev \
86+
libwayland-dev \
87+
libssl-dev
88+
89+
- name: Record toolchain versions
90+
shell: bash
91+
run: |
92+
set -euxo pipefail
93+
mkdir -p logs
94+
{
95+
echo '=== OS ==='
96+
cat /etc/os-release
97+
echo '=== GCC ==='
98+
gcc --version
99+
echo '=== CMake ==='
100+
cmake --version
101+
echo '=== Ninja ==='
102+
ninja --version
103+
echo '=== Python ==='
104+
python3 --version
105+
} 2>&1 | tee logs/toolchain.txt
106+
107+
- name: Download Qt source
108+
shell: bash
109+
run: |
110+
set -euxo pipefail
111+
mkdir -p "$QT_SRC"
112+
wget -q --show-progress \
113+
"https://download.qt.io/official_releases/qt/6.10/${QT_VERSION}/submodules/qtbase-everywhere-src-${QT_VERSION}.tar.xz" \
114+
-O qtbase.tar.xz
115+
tar -xf qtbase.tar.xz -C "$QT_SRC" --strip-components=1
116+
rm -f qtbase.tar.xz
117+
118+
- name: Configure Qt
119+
shell: bash
120+
run: |
121+
set -o pipefail
122+
mkdir -p logs "$QT_BUILD"
123+
cd "$QT_BUILD"
124+
"$QT_SRC/configure" \
125+
-prefix "$QT_PREFIX" \
126+
-release \
127+
-opensource \
128+
-confirm-license \
129+
-nomake examples \
130+
-nomake tests \
131+
-qt-zlib \
132+
-qt-pcre \
133+
-qt-libpng \
134+
-qt-libjpeg \
135+
-qt-freetype \
136+
-no-openssl 2>&1 | tee "$GITHUB_WORKSPACE/logs/qt-configure.log"
137+
138+
- name: Build Qt
139+
shell: bash
140+
run: |
141+
set -o pipefail
142+
cmake --build "$QT_BUILD" --parallel "$(nproc)" 2>&1 | tee "$GITHUB_WORKSPACE/logs/qt-build.log"
143+
144+
- name: Install Qt
145+
shell: bash
146+
run: |
147+
set -o pipefail
148+
cmake --install "$QT_BUILD" 2>&1 | tee "$GITHUB_WORKSPACE/logs/qt-install.log"
149+
150+
- name: Package Qt artifact
151+
shell: bash
152+
run: |
153+
set -euxo pipefail
154+
mkdir -p "$GITHUB_WORKSPACE/artifacts"
155+
tar -C /opt/qt -cJf "$GITHUB_WORKSPACE/artifacts/qt-${QT_VERSION}-ubuntu20.04.tar.xz" "${QT_VERSION}"
156+
sha256sum "$GITHUB_WORKSPACE/artifacts/qt-${QT_VERSION}-ubuntu20.04.tar.xz" \
157+
| tee "$GITHUB_WORKSPACE/artifacts/qt-${QT_VERSION}-ubuntu20.04.tar.xz.sha256"
158+
159+
- name: Upload Qt artifact
160+
uses: actions/upload-artifact@v4
161+
with:
162+
name: qt-${{ env.QT_VERSION }}-ubuntu20.04
163+
path: artifacts/
164+
retention-days: 14
165+
166+
- name: Upload build logs
167+
if: always()
168+
uses: actions/upload-artifact@v4
169+
with:
170+
name: qt-${{ env.QT_VERSION }}-ubuntu20.04-logs
171+
path: logs/
172+
if-no-files-found: warn
173+
retention-days: 14

0 commit comments

Comments
 (0)