Skip to content

Commit

Permalink
Download Qt for arm64 since the open source version support arm64 in Qt6
Browse files Browse the repository at this point in the history
Signed-off-by: Cédrik Fuoco <[email protected]>
  • Loading branch information
cedrik-fuoco-adsk committed Nov 5, 2024
1 parent 318c5c9 commit 73a9a57
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 77 deletions.
69 changes: 3 additions & 66 deletions .github/actions/build-qt5-for-arm64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inputs:
qt-version-short:
description: 'Qt version to build major.minor'
required: true
vfx-platform:
description: 'VFX Platform'
required: true
python3-version:
description: 'Python 3 version'
required: true
Expand Down Expand Up @@ -58,19 +55,12 @@ runs:
shell: bash

- name: Install Homebrew dependencies (OpenSSL 1.1.1)
if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2023'
if: steps.arm64-qt.outputs.cache-hit != 'true'
run: |
brew install --quiet --formula [email protected]
brew list [email protected]
shell: bash

- name: Install Homebrew dependencies (OpenSSL 3.X.X)
if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2024'
run: |
brew install --quiet --formula openssl@3
brew list openssl@3
shell: bash

# Use Ninja 1.11.1 because Qt need to be patched for Ninja 1.12.1.
- name: Install Ninja 1.11.1
if: steps.arm64-qt.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -112,35 +102,21 @@ runs:
shell: bash

- name: Download Qt ${{ inputs.qt-version }} source
if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2023'
if: steps.arm64-qt.outputs.cache-hit != 'true'
run: |
curl https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/${{ inputs.qt-version-short }}/${{ inputs.qt-version }}/single/qt-everywhere-opensource-src-${{ inputs.qt-version }}.tar.xz -o qt.tar.xz
tar xf qt.tar.xz
mv qt-everywhere-src-${{ inputs.qt-version }} qt-src
shell: bash

- name: Download Qt ${{ inputs.qt-version }} source
if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2024'
run: |
curl https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/${{ inputs.qt-version-short }}/${{ inputs.qt-version }}/single/qt-everywhere-src-${{ inputs.qt-version }}.tar.xz -o qt.tar.xz
tar xf qt.tar.xz
mv qt-everywhere-src-${{ inputs.qt-version }} qt-src
shell: bash

- name: Create directory for build
if: steps.arm64-qt.outputs.cache-hit != 'true'
run: |
mkdir -p qt-build
shell: bash

- name: List OpenSSL folder
if: matrix.vfx-platform == 'CY2024'
run: |
ls -al $(brew --prefix openssl@3)
shell: bash

- name: Configure Qt ${{ inputs.qt-version }} for CY2023
if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2023'
if: steps.arm64-qt.outputs.cache-hit != 'true'
run: |
../qt-src/configure \
--prefix="../${{ inputs.qt-output }}" \
Expand Down Expand Up @@ -178,45 +154,6 @@ runs:
working-directory: ${{ github.workspace }}/qt-build
shell: bash

- name: Configure Qt ${{ inputs.qt-version }} for CY2024
if: steps.arm64-qt.outputs.cache-hit != 'true' && matrix.vfx-platform == 'CY2024'
run: |
../qt-src/configure \
--prefix="../${{ inputs.qt-output }}" \
-no-strip \
-no-rpath \
-opensource \
-plugin-sql-sqlite \
-openssl-linked \
-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 $(brew --prefix openssl@3)/include -L $(brew --prefix openssl@3)/lib \
-I /opt/homebrew/Cellar/icu4c/74.2/include -L /opt/homebrew/Cellar/icu4c/74.2/lib
working-directory: ${{ github.workspace }}/qt-build
shell: bash

- name: Build Qt ${{ inputs.qt-version }}
if: steps.arm64-qt.outputs.cache-hit != 'true'
run: |
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
- /usr/local/share/chromium:/github/home/chromium
- /usr/local/lib/node_modules:/github/home/node_modules
- /opt/hostedtoolcache/CodeQL:/github/home/CodeQL
- /usr/local/share/boost:/github/home/boost
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -170,6 +171,7 @@ jobs:
rm -rf /github/home/chromium || true
rm -rf /github/home/node_modules || true
rm -rf /github/home/CodeQL || true
rm -rf /github/home/boost || true
- name: Display disk space
run: |
Expand Down Expand Up @@ -440,20 +442,21 @@ jobs:
aqtversion: '==3.1.*'

- name: Install Qt ${{ matrix.qt-version }}
if: matrix.arch-type == 'x86_64' && matrix.vfx-platform == 'CY2024'
if: matrix.vfx-platform == 'CY2024'
uses: jurplel/install-qt-action@v4
with:
version: '${{ matrix.qt-version }}'
host: 'mac'
target: 'desktop'
arch: 'clang_64'
# clang_64 contains both x86_64 and arm64 for Qt 6.
arch: 'clang_64'
dir: "${{ github.workspace }}/deps"
install-deps: 'false'
modules: ${{ env.MACOX_X86_64_QT6_MODULES }}
archives: ${{ env.MACOX_X86_64_QT6_ARCHIVES }}
# Caching only save 2 minutes. Keep the cache for longer operations.
cache: false
setup-python: 'false'
setup-python: true
tools: 'tools_qtcreator'
set-env: 'true'
tools-only: 'false'
Expand All @@ -468,13 +471,12 @@ jobs:
cp $(unzip -l file.zip | awk 'NR==4 {print $4}') ${{ github.workspace }}/deps/Qt/${{ matrix.qt-version }}/clang_64/mkspecs/features/toolchain.prf
- name: Build Qt
if: matrix.arch-type == 'arm64'
if: matrix.arch-type == 'arm64' && matrix.vfx-platform == 'CY2023'
id: build-qt5-for-arm64
uses: ./.github/actions/build-qt5-for-arm64
with:
qt-version: "${{ matrix.qt-version }}"
qt-version-short: "${{ matrix.qt-version-short }}"
vfx-platform: "${{ matrix.vfx-platform }}"
python3-version: "3.11.9"
python2-version: "2.7.18"
xcode-version: "14.3.1"
Expand All @@ -495,14 +497,10 @@ jobs:
brew install --quiet --formula cmake ninja readline sqlite3 xz zlib tcl-tk autoconf automake libtool python yasm clang-format black meson nasm pkg-config glew icu4c
- name: Set QT_HOME
if: matrix.arch-type == 'x86_64' && matrix.vfx-platform == 'CY2023'
if: matrix.arch-type == 'x86_64'
# With aqt, the universal binaries are under clang_64 and not macos folder.
run: |
echo "QT_HOME=${{ github.workspace }}/deps/Qt/${{ matrix.qt-version }}/clang_64" >> $GITHUB_ENV
- name: Set QT_HOME
if: matrix.arch-type == 'x86_64' && matrix.vfx-platform == 'CY2024'
run: |
echo "QT_HOME=${{ github.workspace }}/deps/Qt/${{ matrix.qt-version }}/macos" >> $GITHUB_ENV
- name: Set QT_HOME
if: matrix.arch-type == 'arm64'
Expand Down

0 comments on commit 73a9a57

Please sign in to comment.