Skip to content

Update build_qt.yml #25

Update build_qt.yml

Update build_qt.yml #25

Workflow file for this run

name: Build Qt Open Source
on:
push:
branches:
- 'feature/**'
paths:
- .github/workflows/build_qt.yml
pull_request:
branches:
- 'feature/**'
paths:
- .github/workflows/build_qt.yml
jobs:
macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: [macos-14]
qt-version: "5.15.15"
python3-version: "3.11.9"
python2-version: "2.7.18"
xcode-version: "14.3.1"
- os: [macos-14]
qt-version: "5.15.15"
python3-version: "3.11.9"
python2-version: "2.7.18"
xcode-version: "15.4"
steps:
- name: Switch to XCode 14
run: |
sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode-version }}.app
- name: Install Homebrew dependencies
run: |
brew install --quiet --formula libiconv libpng libpq libtool libuv libxau libxcb libxdmcp
brew install --quiet --formula autoconf automake cmake pcre2 harfbuzz freetype node@18 nspr nss
brew install --quiet --formula xcb-proto xcb-util xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm
brew install --quiet --formula brotli bzip2 dbus glew icu4c jpeg md4c [email protected] pkg-config sqlite xorgproto zlib zstd
brew list [email protected]
- name: Get Opt Directories
id: opt_dirs
run: |
echo "Checking permissions for /opt/homebrew/opt..."
ls -al /opt/homebrew/opt
echo "Running find command..."
find "/opt/homebrew/opt" -mindepth 1 -maxdepth 1 -type l -o -type d |
while read dir; do
real_path=$(readlink -f "$dir")
if [ -d "$real_path" ]; then
echo "-I $real_path/include -L $real_path/lib"
fi
done || {
echo "No valid directories found in /opt/homebrew/opt"
exit 1
}
# Use Ninja 1.11.1 because Qt need to be patched for Ninja 1.12.1.
- name: Install Ninja 1.11.1
run: |
wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip
unzip ninja-mac.zip -d ./ninja
echo "$(pwd)/ninja" >> $GITHUB_PATH
- name: Display ninja version
run: |
ninja --version
- name: Install pyenv
run: |
curl https://pyenv.run | bash
export PYENV_ROOT="$HOME/.pyenv"
echo "$PYENV_ROOT/shims" >> $GITHUB_PATH
echo "$PYENV_ROOT/bin" >> $GITHUB_PATH
- name: Setup pyenv
run: |
echo $PATH
pyenv install ${{ matrix.python3-version }} ${{ matrix.python2-version }}
pyenv global ${{ matrix.python3-version }} ${{ matrix.python2-version }}
- name: Display Python installation location
run: |
python -c "import sys; print(sys.executable)"
python2 -c "import sys; print(sys.executable)"
- name: Download Qt ${{ matrix.qt-version }} source
run: |
curl https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/5.15/5.15.15/single/qt-everywhere-opensource-src-5.15.15.tar.xz -o qt.tar.xz
tar xf qt.tar.xz
mv qt-everywhere-src-5.15.15 qt-src
- name: Create directory for build
run: |
mkdir -p qt-build
mkdir -p qt-release
- name: Configure Qt ${{ matrix.qt-version }}
run: |
../qt-src/configure \
--prefix="../qt-release" \
-no-strip \
-no-rpath \
-opensource \
-plugin-sql-sqlite \
-openssl \
-verbose \
-opengl desktop \
-no-warnings-are-errors \
-no-libudev \
-no-egl \
-nomake examples \
-nomake tests \
-c++std c++14 \
-confirm-license \
-no-use-gold-linker \
-release \
-no-sql-mysql \
-no-xcb \
-qt-libjpeg \
-qt-libpng \
-bundled-xcb-xinput \
-sysconfdir /etc/xdg \
-qt-pcre \
-qt-harfbuzz \
-R . \
-icu \
-skip qtnetworkauth \
-skip qtpurchasing \
-skip qtlocation \
-I /opt/homebrew/Cellar/[email protected]/1.1.1w/include -L /opt/homebrew/Cellar/[email protected]/1.1.1w/lib \
-I /opt/homebrew/Cellar/icu4c/74.2/include -L /opt/homebrew/Cellar/icu4c/74.2/lib
working-directory: ${{ github.workspace }}/qt-build
- name: Build Qt ${{ matrix.qt-version }}
run: |
make -j$(python -c 'import os; print(os.cpu_count())')
working-directory: ${{ github.workspace }}/qt-build
- name: Install Qt ${{ matrix.qt-version }}
run: |
make install -j$(python -c 'import os; print(os.cpu_count())')
working-directory: ${{ github.workspace }}/qt-build
- name: Display release folder
run: |
ls -al ./release
working-directory: ${{ github.workspace }}/qt-build