Skip to content

Commit bc71318

Browse files
build qt for arm64 and cache it
Signed-off-by: Cédrik Fuoco <[email protected]>
1 parent f1fabd4 commit bc71318

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

.github/workflows/build_qt.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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+
os: [macos-14]
23+
build: [1]
24+
include:
25+
- build: 1
26+
qt-version: "5.15.15"
27+
python3-version: "3.11.9"
28+
python2-version: "2.7.18"
29+
30+
steps:
31+
- name: Install Homebrew dependencies
32+
run: |
33+
brew install --quiet --formula libiconv libpng libpq libtool libuv libxau libxcb libxdmcp
34+
brew install --quiet --formula autoconf automake cmake pcre2 harfbuzz freetype node@18 nspr nss
35+
brew install --quiet --formula xcb-proto xcb-util xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm
36+
brew install --quiet --formula brotli bzip2 dbus glew icu4c jpeg md4c [email protected] pkg-config sqlite xorgproto zlib zstd
37+
38+
39+
# Use Ninja 1.11.1 because Qt need to be patched for Ninja 1.12.1.
40+
- name: Install Ninja 1.11.1
41+
run: |
42+
wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip
43+
unzip ninja-mac.zip -d ./ninja
44+
echo "$(pwd)/ninja" >> $GITHUB_PATH
45+
46+
- name: Display ninja version
47+
run: |
48+
ninja --version
49+
50+
- name: Install pyenv
51+
run: |
52+
curl https://pyenv.run | bash
53+
54+
export PYENV_ROOT="$HOME/.pyenv"
55+
echo "$PYENV_ROOT/shims" >> $GITHUB_PATH
56+
echo "$PYENV_ROOT/bin" >> $GITHUB_PATH
57+
58+
- name: Setup pyenv
59+
run: |
60+
echo $PATH
61+
pyenv install ${{ matrix.python3-version }} ${{ matrix.python2-version }}
62+
pyenv global ${{ matrix.python3-version }} ${{ matrix.python2-version }}
63+
64+
- name: Display Python installation location
65+
run: |
66+
python -c "import sys; print(sys.executable)"
67+
python2 -c "import sys; print(sys.executable)"
68+
69+
- name: Download Qt ${{ matrix.qt-version }} source
70+
run: |
71+
pwd
72+
wget https://download.qt.io/archive/qt/5.15/5.15.15/single/qt-everywhere-opensource-src-5.15.15.zip
73+
unzip qt-everywhere-opensource-src-5.15.15.zip
74+
75+
- name: Create directory for build
76+
run: |
77+
mkdir -p ${{ github.workspace }}/qt-build
78+
79+
- name: Configure Qt ${{ matrix.qt-version }}
80+
run: |
81+
ls -al ${{ github.workspace }}
82+
ls -al ../
83+
OPENSSL_LIBS='-L/usr/local/Cellar/[email protected]/1.1.1w/lib -lssl -lcrypto' ../qt-everywhere-opensource-src-5.15.15/configure -release -prefix ./release -nomake examples -nomake tests QMAKE_APPLE_DEVICE_ARCHS=arm64 -opensource -confirm-license -c++std c++14 -openssl-linked -opengl desktop -release -I /usr/local/Cellar/[email protected]/1.1.1w/include -L /usr/local/Cellar/[email protected]/1.1.1w/lib -skip qtlocation
84+
working-directory: ${{ github.workspace }}/qt-build
85+
86+
- name: Build Qt
87+
run: |
88+
make -j$(python -c 'import os; print(os.cpu_count())')
89+
working-directory: ${{ github.workspace }}/qt-build
90+
91+
- name: Display release folder
92+
run: |
93+
ls -al ./release
94+
working-directory: ${{ github.workspace }}/qt-build

0 commit comments

Comments
 (0)