diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e98f49be3..316539eef 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -78,6 +78,7 @@ jobs: - name: Setup Environment id: setup run: | + : Setup Environment print '::group::Enable Xcode 15.2' sudo xcode-select --switch /Applications/Xcode_15.2.app/Contents/Developer print '::endgroup::' @@ -150,11 +151,14 @@ jobs: strategy: fail-fast: true matrix: - target: [x64] + target: [x64, arm64] include: - target: x64 config: Release type: static + - target: arm64 + config: Release + type: static defaults: run: shell: pwsh @@ -441,7 +445,7 @@ jobs: strategy: fail-fast: true matrix: - target: [x64, x86] + target: [x64, x86, arm64] include: - target: x64 config: Release @@ -449,6 +453,9 @@ jobs: - target: x86 config: Release type: static + - target: arm64 + config: Release + type: static defaults: run: shell: pwsh @@ -499,7 +506,7 @@ jobs: Remove-Item -Recurse -Force ${{ github.workspace }}/windows_build_temp - name: Build qrcodegencpp Debug - if: matrix.target == 'x64' + if: matrix.target == 'x64' || matrix.target == 'arm64' shell: pwsh run: | # Build qrcodegencpp Debug @@ -557,6 +564,63 @@ jobs: target: ${{ matrix.target }} config: ${{ matrix.config }} + - name: Publish Build Artifacts + if: matrix.target == 'x64' || (github.event_name != 'pull_request' || fromJSON(needs.pre-checks.outputs.seekingTesters)) + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.setup.outputs.artifactName }} + path: ${{ github.workspace }}/windows/${{ steps.setup.outputs.artifactFileName }} + + windows-qt6-arm64-build: + name: Build Qt6 (Windows ARM64) + runs-on: windows-2022 + needs: [pre-checks, windows-qt6-build] + strategy: + fail-fast: true + matrix: + config: [RelWithDebInfo, Debug] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Environment + id: setup + run: | + # Setup Environment + $HostArtifactName="qt6-windows-x64-${{ matrix.config }}-${{ needs.pre-checks.outputs.shortHash }}" + $HostFileName="windows-deps-qt6-$(Get-Date -Format 'yyyy-MM-dd')-x64-${{ matrix.config }}.zip" + + $ArtifactName="qt6-windows-arm64-${{ matrix.config }}-${{ needs.pre-checks.outputs.shortHash }}" + $FileName="windows-deps-qt6-$(Get-Date -Format 'yyyy-MM-dd')-arm64-${{ matrix.config }}.zip" + + "hostArtifactName=${HostArtifactName}" >> $env:GITHUB_OUTPUT + "hostArtifactFileName=${HostFileName}" >> $env:GITHUB_OUTPUT + "qtHostPath=${env:GITHUB_WORKSPACE}/Qt6Host" >> $env:GITHUB_OUTPUT + "artifactName=${ArtifactName}" >> $env:GITHUB_OUTPUT + "artifactFileName=${FileName}" >> $env:GITHUB_OUTPUT + + - name: Download Host Tools Artifact + uses: actions/download-artifact@v4 + with: + name: ${{ steps.setup.outputs.hostArtifactName }} + path: ${{ github.workspace }}/Qt6Host + + - name: Setup Host Tools Artifact + run: | + . ${{ github.workspace }}/utils.pwsh/Expand-ArchiveExt + + Set-Location ${{ github.workspace }}/Qt6Host + Expand-ArchiveExt -Path ${{ steps.setup.outputs.hostArtifactFileName }} -DestinationPath (Get-Location | Convert-Path) + + - name: Build Windows Qt + uses: ./.github/actions/build-qt + env: + QtHostPath: ${{ steps.setup.outputs.qtHostPath }} + with: + target: arm64 + config: ${{ matrix.config }} + - name: Publish Build Artifacts if: github.event_name != 'pull_request' || fromJSON(needs.pre-checks.outputs.seekingTesters) uses: actions/upload-artifact@v4 @@ -570,8 +634,8 @@ jobs: strategy: fail-fast: true matrix: - target: [x64] - needs: [pre-checks, windows-qt6-build] + target: [x64, arm64] + needs: [pre-checks, windows-qt6-build, windows-qt6-arm64-build] steps: - name: Checkout uses: actions/checkout@v4 @@ -609,7 +673,7 @@ jobs: shopt -s extglob shopt -s nullglob - for arch in x64 x86; do + for arch in x64 x86 arm64; do _temp=$(mktemp -d) pushd "${_temp}" > /dev/null @@ -677,6 +741,7 @@ jobs: body_path: ${{ github.workspace }}/CHECKSUMS.txt files: | ${{ github.workspace }}/windows-*-x64*.zip + ${{ github.workspace }}/windows-*-arm64*.zip ${{ github.workspace }}/windows-*-x86*.zip ${{ github.workspace }}/macos-*-arm64.tar.xz ${{ github.workspace }}/macos-*-x86_64.tar.xz diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml index c8a77ecee..0d265c706 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/scheduled.yaml @@ -139,7 +139,7 @@ jobs: strategy: fail-fast: true matrix: - target: [x64] + target: [x64, arm64] include: - target: x64 config: Release @@ -222,7 +222,7 @@ jobs: strategy: fail-fast: true matrix: - target: [x64, x86] + target: [x64, x86, arm64] include: - target: x64 config: Release @@ -230,6 +230,9 @@ jobs: - target: x86 config: Release type: static + - target: arm64 + config: Release + type: static defaults: run: shell: pwsh @@ -268,7 +271,7 @@ jobs: Remove-Item -Recurse -Force ${{ github.workspace }}/windows_build_temp - name: Build qrcodegencpp Debug - if: matrix.target == 'x64' + if: matrix.target == 'x64' || matrix.target == 'arm64' shell: pwsh run: | # Build qrcodegencpp Debug @@ -348,8 +351,70 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup Environment + id: setup + run: | + # Setup Environment + $ArtifactName="qt6-windows-${{ matrix.target }}-${{ matrix.config }}-nightly" + $FileName="windows-deps-qt6-$(Get-Date -Format 'yyyy-MM-dd')-${{ matrix.target }}-${{ matrix.config }}.zip" + + "artifactName=${ArtifactName}" >> $env:GITHUB_OUTPUT + "artifactFileName=${FileName}" >> $env:GITHUB_OUTPUT + - name: Build Windows Qt uses: ./.github/actions/build-qt with: target: ${{ matrix.target }} config: ${{ matrix.config }} + + - name: Publish Build Artifacts + if: matrix.target == 'x64' + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.setup.outputs.artifactName }} + path: ${{ github.workspace }}/windows/${{ steps.setup.outputs.artifactFileName }} + + windows-qt6-arm64-build: + name: Build Qt6 (Windows ARM64) + runs-on: windows-2022 + needs: [windows-qt6-build] + strategy: + fail-fast: true + matrix: + config: [RelWithDebInfo, Debug] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Environment + id: setup + run: | + # Setup Environment + $HostArtifactName="qt6-windows-x64-${{ matrix.config }}-nightly" + $HostFileName="windows-deps-qt6-$(Get-Date -Format 'yyyy-MM-dd')-x64-${{ matrix.config }}.zip" + + "hostArtifactName=${HostArtifactName}" >> $env:GITHUB_OUTPUT + "hostArtifactFileName=${HostFileName}" >> $env:GITHUB_OUTPUT + "qtHostPath=${env:GITHUB_WORKSPACE}/Qt6Host" >> $env:GITHUB_OUTPUT + + - name: Download Host Tools Artifact + uses: actions/download-artifact@v4 + with: + name: ${{ steps.setup.outputs.hostArtifactName }} + path: ${{ github.workspace }}/Qt6Host + + - name: Setup Host Tools Artifact + run: | + . ${{ github.workspace }}/utils.pwsh/Expand-ArchiveExt + + Set-Location ${{ github.workspace }}/Qt6Host + Expand-ArchiveExt -Path ${{ steps.setup.outputs.hostArtifactFileName }} -DestinationPath (Get-Location | Convert-Path) + + - name: Build Windows Qt + uses: ./.github/actions/build-qt + env: + QtHostPath: ${{ steps.setup.outputs.qtHostPath }} + with: + target: arm64 + config: ${{ matrix.config }}