@@ -740,9 +740,23 @@ jobs:
740740          validate : false 
741741
742742  build_win :
743-     name : Windows 
743+     name : ${{ matrix.name }} 
744744    needs : setup_release 
745-     runs-on : windows-2022 
745+     runs-on : ${{ matrix.os }} 
746+     strategy :
747+       fail-fast : false 
748+       matrix :
749+         include :
750+           - name : Windows-AMD64 
751+             os : windows-2022 
752+             arch : x86_64 
753+             msystem : ucrt64 
754+             toolchain : ucrt-x86_64 
755+           - name : Windows-ARM64 
756+             os : windows-11-arm 
757+             arch : aarch64 
758+             msystem : clangarm64 
759+             toolchain : clang-aarch64 
746760    steps :
747761      - name : Checkout 
748762        uses : actions/checkout@v4 
@@ -857,15 +871,15 @@ jobs:
857871        #  if a dependency needs to be pinned, see https://github.com/LizardByte/build-deps/pull/186
858872        uses : msys2/setup-msys2@v2 
859873        with :
860-           msystem : ucrt64 
874+           msystem : ${{ matrix.msystem }} 
861875          update : true 
862876          install : >- 
863877            wget 
864878
865879name : Update Windows dependencies 
866880        env :
867-           MSYSTEM : " ucrt64 " 
868-           TOOLCHAIN : " ucrt-x86_64 " 
881+           MSYSTEM : ${{ matrix.msystem }} 
882+           TOOLCHAIN : ${{ matrix.toolchain }} 
869883        shell : msys2 {0} 
870884        run : | 
871885          # variables 
@@ -879,17 +893,22 @@ jobs:
879893            "mingw-w64-${TOOLCHAIN}-curl-winssl" 
880894            "mingw-w64-${TOOLCHAIN}-gcc" 
881895            "mingw-w64-${TOOLCHAIN}-graphviz" 
882-             "mingw-w64-${TOOLCHAIN}-MinHook" 
883896            "mingw-w64-${TOOLCHAIN}-miniupnpc" 
884897            "mingw-w64-${TOOLCHAIN}-nlohmann-json" 
885898            "mingw-w64-${TOOLCHAIN}-nodejs" 
886-             "mingw-w64-${TOOLCHAIN}-nsis" 
887899            "mingw-w64-${TOOLCHAIN}-onevpl" 
888900            "mingw-w64-${TOOLCHAIN}-openssl" 
889901            "mingw-w64-${TOOLCHAIN}-opus" 
890902            "mingw-w64-${TOOLCHAIN}-toolchain" 
891903          ) 
892904
905+           if [[ ${MSYSTEM} == "ucrt64" ]]; then 
906+             dependencies+=( 
907+               "mingw-w64-${TOOLCHAIN}-MinHook" 
908+               "mingw-w64-${TOOLCHAIN}-nsis"  # TODO: how to create an arm64 installer? 
909+             ) 
910+           fi 
911+ 
893912          # do not modify below this line 
894913
895914          ignore_packages=() 
@@ -975,27 +994,40 @@ jobs:
975994            -B build \ 
976995            -G Ninja \ 
977996            -S . \ 
978-             -DBUILD_WERROR=ON \ 
979997            -DCMAKE_BUILD_TYPE=RelWithDebInfo \ 
980998            -DSUNSHINE_ASSETS_DIR=assets \ 
981999            -DSUNSHINE_PUBLISHER_NAME='${{ github.repository_owner }}' \ 
9821000            -DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev' \ 
9831001            -DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support' 
9841002          ninja -C build 
9851003
986- name : Package Windows 
1004+ name : Package Windows (Prepare)  
9871005        shell : msys2 {0} 
9881006        run : | 
9891007          mkdir -p artifacts 
1008+ 
1009+ name : Package Windows (Installer) 
1010+         if : runner.arch == 'X86' || runner.arch == 'X64' 
1011+         shell : msys2 {0} 
1012+         run : | 
9901013          cd build 
9911014
9921015          # package 
9931016          cpack -G NSIS 
1017+ 
1018+           # move 
1019+           mv ./cpack_artifacts/Sunshine.exe ../artifacts/Sunshine-${{ matrix.os }}-installer.exe 
1020+ 
1021+ name : Package Windows (Portable) 
1022+         shell : msys2 {0} 
1023+         run : | 
1024+           cd build 
1025+ 
1026+           # package 
9941027          cpack -G ZIP 
9951028
9961029          # move 
997-           mv ./cpack_artifacts/Sunshine.exe ../artifacts/sunshine-windows-installer.exe 
998-           mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-windows-portable.zip 
1030+           mv ./cpack_artifacts/Sunshine.zip ../artifacts/Sunshine-${{ matrix.os }}-portable.zip 
9991031
10001032name : Run tests 
10011033        id : test 
@@ -1007,7 +1039,7 @@ jobs:
10071039name : Generate gcov report 
10081040        id : test_report 
10091041        #  any except canceled or skipped
1010-         if : always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure') 
1042+         if : always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure') && runner.arch == 'X86' || runner.arch == 'X64'  
10111043        shell : msys2 {0} 
10121044        working-directory : build 
10131045        run : | 
@@ -1031,7 +1063,7 @@ jobs:
10311063          disable_search : true 
10321064          fail_ci_if_error : true 
10331065          files : ./build/tests/test_results.xml 
1034-           flags : ${{ runner.os  }} 
1066+           flags : ${{ matrix.name  }} 
10351067          handle_no_reports_found : true 
10361068          token : ${{ secrets.CODECOV_TOKEN }} 
10371069          verbose : true 
@@ -1047,7 +1079,7 @@ jobs:
10471079          disable_search : true 
10481080          fail_ci_if_error : true 
10491081          files : ./build/coverage.xml 
1050-           flags : ${{ runner.os  }} 
1082+           flags : ${{ matrix.name  }} 
10511083          token : ${{ secrets.CODECOV_TOKEN }} 
10521084          verbose : true 
10531085
@@ -1062,12 +1094,12 @@ jobs:
10621094          7z -r ` 
10631095            "-xr!CMakeFiles" ` 
10641096            "-xr!cpack_artifacts" ` 
1065-             a "../artifacts/sunshine-win32 -debuginfo.7z" "*.dbg" 
1097+             a "../artifacts/${{ matrix.name }} -debuginfo.7z" "*.dbg" 
10661098
10671099name : Upload Artifacts 
10681100        uses : actions/upload-artifact@v4 
10691101        with :
1070-           name : sunshine-windows 
1102+           name : Sunshine-${{ matrix.name }} 
10711103          path : artifacts/ 
10721104          if-no-files-found : error 
10731105
0 commit comments