@@ -744,9 +744,23 @@ jobs:
744
744
validate : false
745
745
746
746
build_win :
747
- name : Windows
747
+ name : ${{ matrix.name }}
748
748
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
750
764
steps :
751
765
- name : Checkout
752
766
uses : actions/checkout@v4
@@ -861,15 +875,15 @@ jobs:
861
875
# if a dependency needs to be pinned, see https://github.com/LizardByte/build-deps/pull/186
862
876
uses : msys2/setup-msys2@v2
863
877
with :
864
- msystem : ucrt64
878
+ msystem : ${{ matrix.msystem }}
865
879
update : true
866
880
install : >-
867
881
wget
868
882
869
883
- name : Update Windows dependencies
870
884
env :
871
- MSYSTEM : " ucrt64 "
872
- TOOLCHAIN : " ucrt-x86_64 "
885
+ MSYSTEM : ${{ matrix.msystem }}
886
+ TOOLCHAIN : ${{ matrix.toolchain }}
873
887
shell : msys2 {0}
874
888
run : |
875
889
# variables
@@ -883,17 +897,22 @@ jobs:
883
897
"mingw-w64-${TOOLCHAIN}-curl-winssl"
884
898
"mingw-w64-${TOOLCHAIN}-gcc"
885
899
"mingw-w64-${TOOLCHAIN}-graphviz"
886
- "mingw-w64-${TOOLCHAIN}-MinHook"
887
900
"mingw-w64-${TOOLCHAIN}-miniupnpc"
888
901
"mingw-w64-${TOOLCHAIN}-nlohmann-json"
889
902
"mingw-w64-${TOOLCHAIN}-nodejs"
890
- "mingw-w64-${TOOLCHAIN}-nsis"
891
903
"mingw-w64-${TOOLCHAIN}-onevpl"
892
904
"mingw-w64-${TOOLCHAIN}-openssl"
893
905
"mingw-w64-${TOOLCHAIN}-opus"
894
906
"mingw-w64-${TOOLCHAIN}-toolchain"
895
907
)
896
908
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
+
897
916
# do not modify below this line
898
917
899
918
ignore_packages=()
@@ -979,27 +998,40 @@ jobs:
979
998
-B build \
980
999
-G Ninja \
981
1000
-S . \
982
- -DBUILD_WERROR=ON \
983
1001
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
984
1002
-DSUNSHINE_ASSETS_DIR=assets \
985
1003
-DSUNSHINE_PUBLISHER_NAME='${{ github.repository_owner }}' \
986
1004
-DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev' \
987
1005
-DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
988
1006
ninja -C build
989
1007
990
- - name : Package Windows
1008
+ - name : Package Windows (Prepare)
991
1009
shell : msys2 {0}
992
1010
run : |
993
1011
mkdir -p artifacts
1012
+
1013
+ - name : Package Windows (Installer)
1014
+ if : runner.arch == 'X86' || runner.arch == 'X64'
1015
+ shell : msys2 {0}
1016
+ run : |
994
1017
cd build
995
1018
996
1019
# package
997
1020
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
998
1031
cpack -G ZIP
999
1032
1000
1033
# 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
1003
1035
1004
1036
- name : Run tests
1005
1037
id : test
@@ -1011,7 +1043,7 @@ jobs:
1011
1043
- name : Generate gcov report
1012
1044
id : test_report
1013
1045
# 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'
1015
1047
shell : msys2 {0}
1016
1048
working-directory : build
1017
1049
run : |
@@ -1035,7 +1067,7 @@ jobs:
1035
1067
disable_search : true
1036
1068
fail_ci_if_error : true
1037
1069
files : ./build/tests/test_results.xml
1038
- flags : ${{ runner.os }}
1070
+ flags : ${{ matrix.name }}
1039
1071
handle_no_reports_found : true
1040
1072
token : ${{ secrets.CODECOV_TOKEN }}
1041
1073
verbose : true
@@ -1051,7 +1083,7 @@ jobs:
1051
1083
disable_search : true
1052
1084
fail_ci_if_error : true
1053
1085
files : ./build/coverage.xml
1054
- flags : ${{ runner.os }}
1086
+ flags : ${{ matrix.name }}
1055
1087
token : ${{ secrets.CODECOV_TOKEN }}
1056
1088
verbose : true
1057
1089
@@ -1066,12 +1098,12 @@ jobs:
1066
1098
7z -r `
1067
1099
"-xr!CMakeFiles" `
1068
1100
"-xr!cpack_artifacts" `
1069
- a "../artifacts/sunshine-win32 -debuginfo.7z" "*.dbg"
1101
+ a "../artifacts/${{ matrix.name }} -debuginfo.7z" "*.dbg"
1070
1102
1071
1103
- name : Upload Artifacts
1072
1104
uses : actions/upload-artifact@v4
1073
1105
with :
1074
- name : sunshine-windows
1106
+ name : Sunshine-${{ matrix.name }}
1075
1107
path : artifacts/
1076
1108
if-no-files-found : error
1077
1109
0 commit comments