@@ -744,9 +744,23 @@ jobs:
744744 validate : false
745745
746746 build_win :
747- name : Windows
747+ name : ${{ matrix.name }}
748748 needs : setup_release
749- runs-on : windows-2022
749+ runs-on : ${{ matrix.os }}
750+ strategy :
751+ fail-fast : false
752+ matrix :
753+ include :
754+ - name : Windows-AMD64
755+ os : windows-2022
756+ arch : x86_64
757+ msystem : ucrt64
758+ toolchain : ucrt-x86_64
759+ - name : Windows-ARM64
760+ os : windows-11-arm
761+ arch : aarch64
762+ msystem : clangarm64
763+ toolchain : clang-aarch64
750764 steps :
751765 - name : Checkout
752766 uses : actions/checkout@v4
@@ -861,15 +875,15 @@ jobs:
861875 # if a dependency needs to be pinned, see https://github.com/LizardByte/build-deps/pull/186
862876 uses : msys2/setup-msys2@v2
863877 with :
864- msystem : ucrt64
878+ msystem : ${{ matrix.msystem }}
865879 update : true
866880 install : >-
867881 wget
868882
869883 - name : Update Windows dependencies
870884 env :
871- MSYSTEM : " ucrt64 "
872- TOOLCHAIN : " ucrt-x86_64 "
885+ MSYSTEM : ${{ matrix.msystem }}
886+ TOOLCHAIN : ${{ matrix.toolchain }}
873887 shell : msys2 {0}
874888 run : |
875889 # variables
@@ -883,17 +897,22 @@ jobs:
883897 "mingw-w64-${TOOLCHAIN}-curl-winssl"
884898 "mingw-w64-${TOOLCHAIN}-gcc"
885899 "mingw-w64-${TOOLCHAIN}-graphviz"
886- "mingw-w64-${TOOLCHAIN}-MinHook"
887900 "mingw-w64-${TOOLCHAIN}-miniupnpc"
888901 "mingw-w64-${TOOLCHAIN}-nlohmann-json"
889902 "mingw-w64-${TOOLCHAIN}-nodejs"
890- "mingw-w64-${TOOLCHAIN}-nsis"
891903 "mingw-w64-${TOOLCHAIN}-onevpl"
892904 "mingw-w64-${TOOLCHAIN}-openssl"
893905 "mingw-w64-${TOOLCHAIN}-opus"
894906 "mingw-w64-${TOOLCHAIN}-toolchain"
895907 )
896908
909+ if [[ ${MSYSTEM} == "ucrt64" ]]; then
910+ dependencies+=(
911+ "mingw-w64-${TOOLCHAIN}-MinHook"
912+ "mingw-w64-${TOOLCHAIN}-nsis" # TODO: how to create an arm64 installer?
913+ )
914+ fi
915+
897916 # do not modify below this line
898917
899918 ignore_packages=()
@@ -979,27 +998,40 @@ jobs:
979998 -B build \
980999 -G Ninja \
9811000 -S . \
982- -DBUILD_WERROR=ON \
9831001 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
9841002 -DSUNSHINE_ASSETS_DIR=assets \
9851003 -DSUNSHINE_PUBLISHER_NAME='${{ github.repository_owner }}' \
9861004 -DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev' \
9871005 -DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
9881006 ninja -C build
9891007
990- - name : Package Windows
1008+ - name : Package Windows (Prepare)
9911009 shell : msys2 {0}
9921010 run : |
9931011 mkdir -p artifacts
1012+
1013+ - name : Package Windows (Installer)
1014+ if : runner.arch == 'X86' || runner.arch == 'X64'
1015+ shell : msys2 {0}
1016+ run : |
9941017 cd build
9951018
9961019 # package
9971020 cpack -G NSIS
1021+
1022+ # move
1023+ mv ./cpack_artifacts/Sunshine.exe ../artifacts/Sunshine-${{ matrix.os }}-installer.exe
1024+
1025+ - name : Package Windows (Portable)
1026+ shell : msys2 {0}
1027+ run : |
1028+ cd build
1029+
1030+ # package
9981031 cpack -G ZIP
9991032
10001033 # move
1001- mv ./cpack_artifacts/Sunshine.exe ../artifacts/sunshine-windows-installer.exe
1002- mv ./cpack_artifacts/Sunshine.zip ../artifacts/sunshine-windows-portable.zip
1034+ mv ./cpack_artifacts/Sunshine.zip ../artifacts/Sunshine-${{ matrix.os }}-portable.zip
10031035
10041036 - name : Run tests
10051037 id : test
@@ -1011,7 +1043,7 @@ jobs:
10111043 - name : Generate gcov report
10121044 id : test_report
10131045 # any except canceled or skipped
1014- if : always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
1046+ if : always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure') && runner.arch == 'X86' || runner.arch == 'X64'
10151047 shell : msys2 {0}
10161048 working-directory : build
10171049 run : |
@@ -1035,7 +1067,7 @@ jobs:
10351067 disable_search : true
10361068 fail_ci_if_error : true
10371069 files : ./build/tests/test_results.xml
1038- flags : ${{ runner.os }}
1070+ flags : ${{ matrix.name }}
10391071 handle_no_reports_found : true
10401072 token : ${{ secrets.CODECOV_TOKEN }}
10411073 verbose : true
@@ -1051,7 +1083,7 @@ jobs:
10511083 disable_search : true
10521084 fail_ci_if_error : true
10531085 files : ./build/coverage.xml
1054- flags : ${{ runner.os }}
1086+ flags : ${{ matrix.name }}
10551087 token : ${{ secrets.CODECOV_TOKEN }}
10561088 verbose : true
10571089
@@ -1066,12 +1098,12 @@ jobs:
10661098 7z -r `
10671099 "-xr!CMakeFiles" `
10681100 "-xr!cpack_artifacts" `
1069- a "../artifacts/sunshine-win32 -debuginfo.7z" "*.dbg"
1101+ a "../artifacts/${{ matrix.name }} -debuginfo.7z" "*.dbg"
10701102
10711103 - name : Upload Artifacts
10721104 uses : actions/upload-artifact@v4
10731105 with :
1074- name : sunshine-windows
1106+ name : Sunshine-${{ matrix.name }}
10751107 path : artifacts/
10761108 if-no-files-found : error
10771109
0 commit comments