build_Qt6.11.2_MinGW64_RP #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build_Qt6.11.1_MinGW64_RP | |
| on: workflow_dispatch | |
| #on: [push, pull_request] | |
| env: | |
| QT_VERSION: 6.11.1 | |
| QT_VERSION2: '6.11' | |
| FILE_NAME: static-Release_mingw1620_64_UCRT_RP | |
| jobs: | |
| windows_mingw64_static_release: | |
| runs-on: windows-latest | |
| steps: | |
| # 检出本仓库 | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| # 安装python | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| architecture: 'x64' | |
| # 安装 Perl | |
| - name: Setup Perl | |
| run: | | |
| cd .. #Directory: D:\a\buildQt | |
| curl -L -o strawberry-perl-64bit-portable.zip https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54221_64bit/strawberry-perl-5.42.2.1-64bit-portable.zip | |
| unzip -q strawberry-perl-64bit-portable.zip -d ./Strawberry | |
| # 安装 MinGW64 | |
| - name: Setup MinGW64 | |
| run: | | |
| cd .. #Directory: D:\a\buildQt | |
| curl -L -o x86_64-release-posix-seh-ucrt.7z https://github.com/niXman/mingw-builds-binaries/releases/download/16.2.0-rt_v14-rev1/x86_64-16.2.0-release-posix-seh-ucrt-rt_v14-rev1.7z | |
| 7z x D:\a\buildQt\x86_64-release-posix-seh-ucrt.7z -oD:\a\buildQt | |
| # 安装 Ninja | |
| - name: Setup Ninja | |
| run: | | |
| cd .. #Directory: D:\a\buildQt | |
| mkdir -p ninja | |
| curl -L -o ninja.zip https://github.com/ninja-build/ninja/releases/download/v1.13.2/ninja-win.zip | |
| unzip -q ninja.zip -d ./ninja | |
| # 构建Qt | |
| - name: Build Qt | |
| run: | | |
| #ls #Directory: D:\a\buildQt\buildQt(即仓库目录) | |
| #D:\a\buildQt 上级目录,这里当做根目录 | |
| #D:\a\buildQt\Qt Qt目录 | |
| #D:\a\buildQt\Qt\${{env.QT_VERSION}} Qt目录源代码和build文件夹存放目录 | |
| #D:\a\buildQt\Qt\${{env.QT_VERSION}}-static Qt安装目录 | |
| # 创建文件夹 | |
| cd .. #Directory: D:\a\buildQt | |
| mkdir -p Qt | |
| # 创建文件夹 | |
| cd Qt #Directory: D:\a\buildQt\Qt | |
| mkdir -p ${{env.QT_VERSION}} | |
| mkdir -p ${{env.QT_VERSION}}-static | |
| # 下载源代码并解压,源代码目录D:\a\buildQt\Qt\${{env.QT_VERSION}}\XXX | |
| curl -L -o qtbase-everywhere-src.zip https://download.qt.io/official_releases/qt/${{env.QT_VERSION2}}/${{env.QT_VERSION}}/submodules/qtbase-everywhere-src-${{env.QT_VERSION}}.zip | |
| unzip -q qtbase-everywhere-src.zip -d ./${{env.QT_VERSION}} | |
| curl -L -o qttools-everywhere-src.zip https://download.qt.io/official_releases/qt/${{env.QT_VERSION2}}/${{env.QT_VERSION}}/submodules/qttools-everywhere-src-${{env.QT_VERSION}}.zip | |
| unzip -q qttools-everywhere-src.zip -d ./${{env.QT_VERSION}} | |
| curl -L -o qttranslations-everywhere-src.zip https://download.qt.io/official_releases/qt/${{env.QT_VERSION2}}/${{env.QT_VERSION}}/submodules/qttranslations-everywhere-src-${{env.QT_VERSION}}.zip | |
| unzip -q qttranslations-everywhere-src.zip -d ./${{env.QT_VERSION}} | |
| curl -L -o qtsvg-everywhere-src.zip https://download.qt.io/official_releases/qt/${{env.QT_VERSION2}}/${{env.QT_VERSION}}/submodules/qtsvg-everywhere-src-${{env.QT_VERSION}}.zip | |
| unzip -q qtsvg-everywhere-src.zip -d ./${{env.QT_VERSION}} | |
| # 调用编译脚本 | |
| cmd.exe /c "call `"D:\a\buildQt\buildQt\buildQt6\build-Qt6mingw64_RP(ninja).cmd`"" | |
| # 打包 | |
| - name: Package binaries | |
| run: | | |
| #ls #Directory: D:\a\buildQt\buildQt(即仓库目录) | |
| 7z a Qt_${{env.QT_VERSION}}-${{env.FILE_NAME}}.7z ../Qt/${{env.QT_VERSION}}-static -mx=9 | |
| # 上传 | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: Qt_${{env.QT_VERSION}}-${{env.FILE_NAME}} | |
| path: Qt_${{env.QT_VERSION}}-${{env.FILE_NAME}}.7z | |
| # 发布 | |
| - name: TempRelease | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: temp_Qt_${{env.QT_VERSION}}-${{env.FILE_NAME}} | |
| release_name: TempRelease_Qt_${{env.QT_VERSION}}-${{env.FILE_NAME}} | |
| files: Qt_${{env.QT_VERSION}}-${{env.FILE_NAME}}.7z |