Skip to content

Commit

Permalink
CI: Add arm64 slice to Windows dependencies matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
PatTheMav committed Sep 17, 2024
1 parent 92cbb9a commit 98eb7ab
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 9 deletions.
77 changes: 71 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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::'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -441,14 +445,17 @@ jobs:
strategy:
fail-fast: true
matrix:
target: [x64, x86]
target: [x64, x86, arm64]
include:
- target: x64
config: Release
type: static
- target: x86
config: Release
type: static
- target: arm64
config: Release
type: static
defaults:
run:
shell: pwsh
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
71 changes: 68 additions & 3 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
strategy:
fail-fast: true
matrix:
target: [x64]
target: [x64, arm64]
include:
- target: x64
config: Release
Expand Down Expand Up @@ -222,14 +222,17 @@ jobs:
strategy:
fail-fast: true
matrix:
target: [x64, x86]
target: [x64, x86, arm64]
include:
- target: x64
config: Release
type: static
- target: x86
config: Release
type: static
- target: arm64
config: Release
type: static
defaults:
run:
shell: pwsh
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

0 comments on commit 98eb7ab

Please sign in to comment.