From 73a9a57c59c9c67c10bc65f10af53623ff3dcdc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9drik=20Fuoco?= Date: Tue, 5 Nov 2024 08:46:46 -0500 Subject: [PATCH] Download Qt for arm64 since the open source version support arm64 in Qt6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédrik Fuoco --- .../actions/build-qt5-for-arm64/action.yml | 69 +------------------ .github/workflows/ci.yml | 20 +++--- 2 files changed, 12 insertions(+), 77 deletions(-) diff --git a/.github/actions/build-qt5-for-arm64/action.yml b/.github/actions/build-qt5-for-arm64/action.yml index bd602418..9bfad27b 100644 --- a/.github/actions/build-qt5-for-arm64/action.yml +++ b/.github/actions/build-qt5-for-arm64/action.yml @@ -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 @@ -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 openssl@1.1 brew list openssl@1.1 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' @@ -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 }}" \ @@ -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: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce18b2cc..d70d8554 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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: | @@ -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' @@ -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" @@ -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'