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 Aug 5, 2024
1 parent 2d03e24 commit 210ffa9
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 7 deletions.
75 changes: 70 additions & 5 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,14 +151,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 @@ -444,14 +448,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 @@ -559,6 +566,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 @@ -572,8 +636,8 @@ jobs:
strategy:
fail-fast: true
matrix:
target: [x64, x86]
needs: [pre-checks, windows-qt6-build]
target: [x64, x86, arm64]
needs: [pre-checks, windows-qt6-build, windows-qt6-arm64-build]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -610,7 +674,7 @@ jobs:
: Package Windows dependencies
shopt -s extglob
for arch in x64 x86; do
for arch in x64 x86 arm64; do
_temp=$(mktemp -d)
pushd "${_temp}" > /dev/null
Expand Down Expand Up @@ -675,6 +739,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
69 changes: 67 additions & 2 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, x86]
target: [x64, x86, arm64]
include:
- target: x64
config: Release
Expand Down Expand Up @@ -225,14 +225,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 @@ -350,8 +353,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 210ffa9

Please sign in to comment.