1
+ name : Build Qt Open Source
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' feature/**'
7
+ paths :
8
+ - .github/workflows/build_qt.yml
9
+
10
+ pull_request :
11
+ branches :
12
+ - ' feature/**'
13
+ paths :
14
+ - .github/workflows/build_qt.yml
15
+
16
+ jobs :
17
+ macos :
18
+ runs-on : ${{ matrix.os }}
19
+ strategy :
20
+ fail-fast : false
21
+ matrix :
22
+ include :
23
+ - os : [macos-14]
24
+ qt-version : " 5.15.15"
25
+ python3-version : " 3.11.9"
26
+ python2-version : " 2.7.18"
27
+ xcode-version : " 14.3.1"
28
+ - os : [macos-14]
29
+ qt-version : " 5.15.15"
30
+ python3-version : " 3.11.9"
31
+ python2-version : " 2.7.18"
32
+ xcode-version : " 15.4"
33
+
34
+ steps :
35
+ - name : Switch to XCode 14
36
+ run : |
37
+ sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode-version }}.app
38
+
39
+ - name : Install Homebrew dependencies
40
+ run : |
41
+ brew install --quiet --formula libiconv libpng libpq libtool libuv libxau libxcb libxdmcp
42
+ brew install --quiet --formula autoconf automake cmake pcre2 harfbuzz freetype node@18 nspr nss
43
+ brew install --quiet --formula xcb-proto xcb-util xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm
44
+ brew install --quiet --formula brotli bzip2 dbus glew icu4c jpeg md4c [email protected] pkg-config sqlite xorgproto zlib zstd
45
+
46
+
47
+ - name : Get Opt Directories
48
+ id : opt_dirs
49
+ run : |
50
+ echo "Checking permissions for /opt/homebrew/opt..."
51
+ ls -al /opt/homebrew/opt
52
+ echo "Running find command..."
53
+ find "/opt/homebrew/opt" -mindepth 1 -maxdepth 1 -type d |
54
+ while read dir; do
55
+ echo "Processing directory: $dir"
56
+ echo "-I $dir/include -L $dir/lib"
57
+ done || {
58
+ echo "No directories found in /opt/homebrew/opt"
59
+ exit 1
60
+ }
61
+
62
+ # - name: Display Opt Directories
63
+ # run: cat opt_dirs.txt
64
+
65
+ # Use Ninja 1.11.1 because Qt need to be patched for Ninja 1.12.1.
66
+ - name : Install Ninja 1.11.1
67
+ run : |
68
+ wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip
69
+ unzip ninja-mac.zip -d ./ninja
70
+ echo "$(pwd)/ninja" >> $GITHUB_PATH
71
+
72
+ - name : Display ninja version
73
+ run : |
74
+ ninja --version
75
+
76
+ - name : Install pyenv
77
+ run : |
78
+ curl https://pyenv.run | bash
79
+
80
+ export PYENV_ROOT="$HOME/.pyenv"
81
+ echo "$PYENV_ROOT/shims" >> $GITHUB_PATH
82
+ echo "$PYENV_ROOT/bin" >> $GITHUB_PATH
83
+
84
+ - name : Setup pyenv
85
+ run : |
86
+ echo $PATH
87
+ pyenv install ${{ matrix.python3-version }} ${{ matrix.python2-version }}
88
+ pyenv global ${{ matrix.python3-version }} ${{ matrix.python2-version }}
89
+
90
+ - name : Display Python installation location
91
+ run : |
92
+ python -c "import sys; print(sys.executable)"
93
+ python2 -c "import sys; print(sys.executable)"
94
+
95
+ - name : Download Qt ${{ matrix.qt-version }} source
96
+ run : |
97
+ git clone git://code.qt.io/qt/qt5.git
98
+ cd qt5
99
+ git checkout 5.15
100
+ ./init-repository
101
+
102
+ - name : Create directory for build
103
+ run : |
104
+ mkdir -p qt-build
105
+
106
+ - name : Configure Qt ${{ matrix.qt-version }}
107
+ run : |
108
+ ../qt5/configure -release -prefix ./release -nomake examples -nomake tests QMAKE_APPLE_DEVICE_ARCHS=arm64 \
109
+ -opensource -confirm-license -c++std c++17 -openssl-linked -opengl desktop -release -skip qtlocation \
110
+ -I /opt/homebrew/Cellar/[email protected] /1.1.1w/include -L //opt/homebrew/Cellar/[email protected] /1.1.1w/lib
111
+ env :
112
+ OPENSSL_LIBS :
' -L/opt/homebrew/Cellar/[email protected] /1.1.1w/lib -lssl -lcrypto'
113
+ working-directory : ${{ github.workspace }}/qt-build
114
+
115
+ - name : Build Qt
116
+ run : |
117
+ make -j$(python -c 'import os; print(os.cpu_count())')
118
+ working-directory : ${{ github.workspace }}/qt-build
119
+
120
+ - name : Display release folder
121
+ run : |
122
+ ls -al ./release
123
+ working-directory : ${{ github.workspace }}/qt-build
0 commit comments