From 6380956e6d609e94214e51eccdd9fa3cdda80e33 Mon Sep 17 00:00:00 2001 From: microcai Date: Wed, 2 Oct 2024 20:50:52 +0800 Subject: [PATCH] build qt-6.8.0 --- .github/workflows/build64.yml | 58 ---------------------------- .github/workflows/msvc-qt.yml | 71 +++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/build64.yml create mode 100644 .github/workflows/msvc-qt.yml diff --git a/.github/workflows/build64.yml b/.github/workflows/build64.yml deleted file mode 100644 index a4e829e..0000000 --- a/.github/workflows/build64.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: build64 - -on: workflow_dispatch - -jobs: - GenerateWinStaticBinaries: - runs-on: windows-2022 - - steps: - - name: Clone repository - uses: actions/checkout@v4 - - name: Install Python 3.7 version - uses: actions/setup-python@v1 - with: - python-version: '3.7' - architecture: 'x64' - - name: setup msvc - uses: ilammy/msvc-dev-cmd@v1.13.0 - with: - arch: 'amd64' - - name: Compile static Qt version - run: | - # Clone Qt6 repo - cd .. - git clone https://code.qt.io/qt/qt5.git -b 6.7.3 - cd qt5 - perl init-repository -f --module-subset=qt5compat,qt3d,qtbase,qtcharts,qtdeclarative,qtimageformats,qtlanguageserver,qtmqtt,qtmultimedia,qtnetworkauth,qtquick3d,qtquicktimeline,qtserialbus,qtserialport,qtshadertools,qtsvg,qtwebchannel,qtwebengine,qtwebsockets,qtwebview - # Create shadow build folder - cd .. - mkdir qt6_shadow - cd qt6_shadow - # Setup the compiler - # Configure Qt6 - ..\qt5\configure.bat -release -static -static-runtime -no-pch -optimize-size -platform win32-msvc -prefix "..\Qt6_binaries" -no-feature-accessibility -confirm-license -- -DFEATURE_cxx20=ON - cmake --build . --parallel 4 - cmake --install . - - name: Package binaries - run: | - # Create archive of the pre-built Qt binaries - 7z a qt6_673_static_64.zip ..\Qt6_binaries - tar -cf qt6_673_static_64.tar ..\Qt6_binaries - - name: Upload tar - uses: actions/upload-artifact@v4 - with: - overwrite: true - name: qt6_673_static_64.tar - path: qt6_673_static_64.tar - - name: Upload zip - uses: actions/upload-artifact@v4 - with: - overwrite: true - name: qt6_673_static_64 - path: qt6_673_static_64.zip - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: qt6_673_static_64.zip - diff --git a/.github/workflows/msvc-qt.yml b/.github/workflows/msvc-qt.yml new file mode 100644 index 0000000..9323d22 --- /dev/null +++ b/.github/workflows/msvc-qt.yml @@ -0,0 +1,71 @@ +name: msvc-static + +on: [push, workflow_dispatch] + +jobs: + msvc_static_qt: + runs-on: windows-2022 + + steps: + - uses: actions/checkout@v4.2.1 + - uses: actions/setup-python@v5.2.0 + with: + python-version: '3.10' + - run: python --version + - name: Setup the compiler + uses: TheMrMilchmann/setup-msvc-dev@v3 + with: + arch: 'x64' + - name: Install ninja-build tool + uses: seanmiddleditch/gha-setup-ninja@v5 + + - name: Clone Qt repo and its submodules + working-directory: ${{ runner.workspace }} + run: | + # Clone Qt6 repo + git clone https://code.qt.io/qt/qt5.git -b v6.8.0 qt-source + cd qt-source + perl init-repository.pl + + - name: create build directory + working-directory: ${{ runner.workspace }} + run: mkdir qt-build + + - name: configure Qt for static build + working-directory: ${{ runner.workspace }}/qt-build + run: > + ..\qt-source\configure.bat -debug-and-release -static -static-runtime -no-pch -optimize-size -platform win32-msvc + -prefix "..\qt6-win64-vc2022-static" -confirm-license + -no-feature-accessibility + -no-feature-valgrind + -no-feature-windeployqt + -no-feature-appstore-compliant + -no-feature-assistant + -no-feature-example-hwr + -skip qtopcua,qtgrpc,qt3d + -- -DFEATURE_cxx20=ON + + - name: build qt + working-directory: ${{ runner.workspace }}/qt-build + run: cmake --build . --parallel 4 + + - name: install qt to temp dir + working-directory: ${{ runner.workspace }}/qt-build + run: cmake --install . + + - name: Package binaries + # Create archive of the pre-built Qt binaries + run: 7z a qt6_680_win64_vc2022_static.zip ..\qt6-win64-vc2022-static + + - name: Upload zip + uses: actions/upload-artifact@v4.4.2 + with: + overwrite: true + name: qt6_680_win64_vc2022_static + path: qt6_680_win64_vc2022_static.zip + + - name: Release + uses: softprops/action-gh-release@v2.0.8 + if: startsWith(github.ref, 'refs/tags/') + with: + files: qt6_680_win64_vc2022_static.zip