5555
5656 ffmpeg-macos-build :
5757 name : Build FFmpeg for macOS
58- runs-on : macos-14
58+ runs-on : macos-15
5959 needs : pre-checks
6060 strategy :
6161 fail-fast : true
@@ -78,19 +78,20 @@ jobs:
7878 - name : Setup Environment
7979 id : setup
8080 run : |
81- print '::group::Enable Xcode 15.2 '
82- sudo xcode-select --switch /Applications/Xcode_15.2 .app/Contents/Developer
81+ print '::group::Enable Xcode 16.1 '
82+ sudo xcode-select --switch /Applications/Xcode_16.1.0 .app/Contents/Developer
8383 print '::endgroup::'
8484
85- local -a to_remove=()
86-
87- for formula (llvm gcc postgresql openjdk sox libsndfile flac libvorbis opusfile \
85+ local -a unwanted_formulas=(llvm gcc postgresql openjdk sox libsndfile flac libvorbis opusfile \
8886 libogg composer php gd freetype fontconfig webp libpng lame libtiff opus kotlin \
89- sbt libxft libxcb) {
90- if [[ -d /usr/local/opt/${formula} ]] to_remove+=(${formula})
87+ sbt libxft libxcb [email protected] ) 88+
89+ local -a remove_formulas=()
90+ for formula (${unwanted_formulas}) {
91+ if [[ -d ${HOMEBREW_PREFIX}/Cellar/${formula} ]] remove_formulas+=(${formula})
9192 }
9293
93- if (( #to_remove )) brew uninstall --ignore-dependencies ${to_remove }
94+ if (( #remove_formulas )) brew uninstall --ignore-dependencies ${remove_formulas }
9495
9596 local -r date_string=$(date +"%Y-%m-%d")
9697 local -r target='${{ matrix.target }}'
@@ -150,11 +151,14 @@ jobs:
150151 strategy :
151152 fail-fast : true
152153 matrix :
153- target : [x64]
154+ target : [x64, arm64 ]
154155 include :
155156 - target : x64
156157 config : Release
157158 type : static
159+ - target : arm64
160+ config : Release
161+ type : static
158162 defaults :
159163 run :
160164 shell : pwsh
@@ -190,7 +194,7 @@ jobs:
190194
191195 ffmpeg-package-universal :
192196 name : Build FFmpeg (Universal)
193- runs-on : macos-14
197+ runs-on : macos-15
194198 needs : [pre-checks, ffmpeg-macos-build]
195199 steps :
196200 - name : Checkout
@@ -214,7 +218,7 @@ jobs:
214218
215219 macos-build :
216220 name : Build macOS Dependencies
217- runs-on : macos-14
221+ runs-on : macos-15
218222 needs : pre-checks
219223 strategy :
220224 fail-fast : true
@@ -238,18 +242,18 @@ jobs:
238242 id : setup
239243 run : |
240244 : Setup Environment
241-
242- print '::group::Enable Xcode 15.2'
243- sudo xcode-select --switch /Applications/Xcode_15.2.app/Contents/Developer
245+ print '::group::Enable Xcode 16.1'
246+ sudo xcode-select --switch /Applications/Xcode_16.1.0.app/Contents/Developer
244247 print '::endgroup::'
245248
246- to_remove=( )
249+ local -a unwanted_formulas=(llvm gcc [email protected] ) 247250
248- for formula (llvm gcc) {
249- if [[ -d /usr/local/opt/"${formula}" ]] to_remove+=(${formula})
251+ local -a remove_formulas=()
252+ for formula (${unwanted_formulas}) {
253+ if [[ -d ${HOMEBREW_PREFIX}/Cellar/${formula} ]] remove_formulas+=(${formula})
250254 }
251255
252- if (( #to_remove )) brew uninstall --ignore-dependencies ${to_remove }
256+ if (( #remove_formulas )) brew uninstall --ignore-dependencies ${remove_formulas }
253257
254258 local -r date_string=$(date +"%Y-%m-%d")
255259 local -r target='${{ matrix.target }}'
@@ -304,7 +308,7 @@ jobs:
304308
305309 macos-package-universal :
306310 name : Build macOS Dependencies (Universal)
307- runs-on : macos-14
311+ runs-on : macos-15
308312 needs : [pre-checks, macos-build]
309313 steps :
310314 - name : Checkout
@@ -328,7 +332,7 @@ jobs:
328332
329333 macos-qt6-build :
330334 name : Build Qt6 (macOS)
331- runs-on : macos-14
335+ runs-on : macos-15
332336 needs : pre-checks
333337 defaults :
334338 run :
@@ -341,17 +345,18 @@ jobs:
341345 id : setup
342346 run : |
343347 : Setup Environment
344- print '::group::Enable Xcode 15.2 '
345- sudo xcode-select --switch /Applications/Xcode_15.2 .app/Contents/Developer
348+ print '::group::Enable Xcode 16.1 '
349+ sudo xcode-select --switch /Applications/Xcode_16.1.0 .app/Contents/Developer
346350 print '::endgroup::'
347351
348- local -a to_remove=( )
352+ local -a unwanted_formulas=(llvm gcc [email protected] ) 349353
350- for formula (llvm gcc) {
351- if [[ -d /usr/local/opt/"${formula}" ]] to_remove+=(${formula})
354+ local -a remove_formulas=()
355+ for formula (${unwanted_formulas}) {
356+ if [[ -d ${HOMEBREW_PREFIX}/Cellar/${formula} ]] remove_formulas+=(${formula})
352357 }
353358
354- if (( #to_remove )) brew uninstall --ignore-dependencies ${to_remove }
359+ if (( #remove_formulas )) brew uninstall --ignore-dependencies ${remove_formulas }
355360
356361 local -r date_string=$(date +"%Y-%m-%d")
357362 artifact_name="qt6-macos-universal-${{ needs.pre-checks.outputs.shortHash }}"
@@ -403,7 +408,7 @@ jobs:
403408
404409 macos-qt6-package :
405410 name : Create macOS Qt6 (${{ matrix.target }})
406- runs-on : macos-14
411+ runs-on : macos-15
407412 strategy :
408413 fail-fast : true
409414 matrix :
@@ -441,14 +446,17 @@ jobs:
441446 strategy :
442447 fail-fast : true
443448 matrix :
444- target : [x64, x86]
449+ target : [x64, x86, arm64 ]
445450 include :
446451 - target : x64
447452 config : Release
448453 type : static
449454 - target : x86
450455 config : Release
451456 type : static
457+ - target : arm64
458+ config : Release
459+ type : static
452460 defaults :
453461 run :
454462 shell : pwsh
@@ -499,7 +507,7 @@ jobs:
499507 Remove-Item -Recurse -Force ${{ github.workspace }}/windows_build_temp
500508
501509 - name : Build qrcodegencpp Debug
502- if : matrix.target == 'x64'
510+ if : matrix.target == 'x64' || matrix.target == 'arm64'
503511 shell : pwsh
504512 run : |
505513 # Build qrcodegencpp Debug
@@ -557,6 +565,63 @@ jobs:
557565 target : ${{ matrix.target }}
558566 config : ${{ matrix.config }}
559567
568+ - name : Publish Build Artifacts
569+ if : matrix.target == 'x64' || (github.event_name != 'pull_request' || fromJSON(needs.pre-checks.outputs.seekingTesters))
570+ uses : actions/upload-artifact@v4
571+ with :
572+ name : ${{ steps.setup.outputs.artifactName }}
573+ path : ${{ github.workspace }}/windows/${{ steps.setup.outputs.artifactFileName }}
574+
575+ windows-qt6-arm64-build :
576+ name : Build Qt6 (Windows ARM64)
577+ runs-on : windows-2022
578+ needs : [pre-checks, windows-qt6-build]
579+ strategy :
580+ fail-fast : true
581+ matrix :
582+ config : [RelWithDebInfo, Debug]
583+
584+ steps :
585+ - name : Checkout
586+ uses : actions/checkout@v4
587+
588+ - name : Setup Environment
589+ id : setup
590+ run : |
591+ # Setup Environment
592+ $HostArtifactName="qt6-windows-x64-${{ matrix.config }}-${{ needs.pre-checks.outputs.shortHash }}"
593+ $HostFileName="windows-deps-qt6-$(Get-Date -Format 'yyyy-MM-dd')-x64-${{ matrix.config }}.zip"
594+
595+ $ArtifactName="qt6-windows-arm64-${{ matrix.config }}-${{ needs.pre-checks.outputs.shortHash }}"
596+ $FileName="windows-deps-qt6-$(Get-Date -Format 'yyyy-MM-dd')-arm64-${{ matrix.config }}.zip"
597+
598+ "hostArtifactName=${HostArtifactName}" >> $env:GITHUB_OUTPUT
599+ "hostArtifactFileName=${HostFileName}" >> $env:GITHUB_OUTPUT
600+ "qtHostPath=${env:GITHUB_WORKSPACE}/Qt6Host" >> $env:GITHUB_OUTPUT
601+ "artifactName=${ArtifactName}" >> $env:GITHUB_OUTPUT
602+ "artifactFileName=${FileName}" >> $env:GITHUB_OUTPUT
603+
604+ - name : Download Host Tools Artifact
605+ uses : actions/download-artifact@v4
606+ with :
607+ name : ${{ steps.setup.outputs.hostArtifactName }}
608+ path : ${{ github.workspace }}/Qt6Host
609+
610+ - name : Setup Host Tools Artifact
611+ run : |
612+ . ${{ github.workspace }}/utils.pwsh/Expand-ArchiveExt
613+
614+ Set-Location ${{ github.workspace }}/Qt6Host
615+ Expand-ArchiveExt -Path ${{ steps.setup.outputs.hostArtifactFileName }} -DestinationPath (Get-Location | Convert-Path)
616+
617+ - name : Build Windows Qt
618+ uses : ./.github/actions/build-qt
619+ env :
620+ QtHostPath : ${{ steps.setup.outputs.qtHostPath }}
621+ with :
622+ target : arm64
623+ config : ${{ matrix.config }}
624+
560625 - name : Publish Build Artifacts
561626 if : github.event_name != 'pull_request' || fromJSON(needs.pre-checks.outputs.seekingTesters)
562627 uses : actions/upload-artifact@v4
@@ -570,8 +635,8 @@ jobs:
570635 strategy :
571636 fail-fast : true
572637 matrix :
573- target : [x64]
574- needs : [pre-checks, windows-qt6-build]
638+ target : [x64, arm64 ]
639+ needs : [pre-checks, windows-qt6-build, windows-qt6-arm64-build ]
575640 steps :
576641 - name : Checkout
577642 uses : actions/checkout@v4
@@ -609,7 +674,7 @@ jobs:
609674 shopt -s extglob
610675 shopt -s nullglob
611676
612- for arch in x64 x86; do
677+ for arch in x64 x86 arm64 ; do
613678 _temp=$(mktemp -d)
614679 pushd "${_temp}" > /dev/null
615680
@@ -641,16 +706,17 @@ jobs:
641706 _temp=$(mktemp -d)
642707 pushd "${_temp}" > /dev/null
643708
644- for artifact in ${GITHUB_WORKSPACE}/**/macos-@(deps|ffmpeg)-!(qt6*)-${arch}.*; do
709+ for artifact in ${GITHUB_WORKSPACE}/**/macos-@(deps|ffmpeg)-!(qt6*)-${arch}?(-dSYMs) .*; do
645710 case ${artifact} in
646711 *.zip) unzip -o ${artifact} > /dev/null ;;
647712 *.tar.xz) XZ_OPT=-T0 tar -xvJf ${artifact} ;;
648713 *.tar.gz) tar -xvzf ${artifact} ;;
649714 esac
650715 done
651716
652- XZ_OPT=-T0 tar -cvJf macos-deps-${{ steps.metadata.outputs.version }}-${arch}.tar.xz -- *
653- mv macos-deps-${{ steps.metadata.outputs.version }}-${arch}.tar.xz ${GITHUB_WORKSPACE}
717+ XZ_OPT=-T0 tar -cvJf macos-deps-${{ steps.metadata.outputs.version }}-${arch}.tar.xz -- !(*.dSYM)
718+ XZ_OPT=-T0 tar -cvJf macos-deps-${{ steps.metadata.outputs.version }}-${arch}-dSYMs.tar.xz -- *.dSYM
719+ mv macos-deps-${{ steps.metadata.outputs.version }}-${arch}?(-dSYMs).tar.xz ${GITHUB_WORKSPACE}
654720
655721 popd > /dev/null
656722 done
@@ -677,7 +743,8 @@ jobs:
677743 body_path : ${{ github.workspace }}/CHECKSUMS.txt
678744 files : |
679745 ${{ github.workspace }}/windows-*-x64*.zip
746+ ${{ github.workspace }}/windows-*-arm64*.zip
680747 ${{ github.workspace }}/windows-*-x86*.zip
681- ${{ github.workspace }}/macos-*-arm64.tar.xz
682- ${{ github.workspace }}/macos-*-x86_64.tar.xz
683- ${{ github.workspace }}/macos-*-universal.tar.xz
748+ ${{ github.workspace }}/macos-*-arm64?(-dSYMs) .tar.xz
749+ ${{ github.workspace }}/macos-*-x86_64?(-dSYMs) .tar.xz
750+ ${{ github.workspace }}/macos-*-universal?(-dSYMs) .tar.xz
0 commit comments