Skip to content

Commit e595f5a

Browse files
rbqvqReenigneArcher
andcommitted
ci(build/windows): add support for arm64
NSIS installer does not support CLANGARM64. So only pack portable version currently. Signed-off-by: Coia Prant <coiaprant@gmail.com> Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
1 parent f022eae commit e595f5a

1 file changed

Lines changed: 28 additions & 9 deletions

File tree

.github/workflows/ci-windows.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
arch: x86_64
3030
msystem: ucrt64
3131
toolchain: ucrt-x86_64
32+
- name: Windows-ARM64
33+
os: windows-11-arm
34+
arch: aarch64
35+
msystem: clangarm64
36+
toolchain: clang-aarch64
3237
steps:
3338
- name: Checkout
3439
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -46,7 +51,9 @@ jobs:
4651
4752
- name: Update Windows dependencies
4853
env:
49-
MSYSTEM: ${{ matrix.msystem }}
54+
# MSYSTEM is a built-in environment variable of MSYS2.
55+
# Do not use this environment variable name.
56+
MATRIX_MSYSTEM: ${{ matrix.msystem }}
5057
TOOLCHAIN: ${{ matrix.toolchain }}
5158
shell: msys2 {0}
5259
run: |
@@ -62,17 +69,22 @@ jobs:
6269
"mingw-w64-${TOOLCHAIN}-curl-winssl"
6370
"mingw-w64-${TOOLCHAIN}-gcc"
6471
"mingw-w64-${TOOLCHAIN}-graphviz"
65-
"mingw-w64-${TOOLCHAIN}-MinHook"
6672
"mingw-w64-${TOOLCHAIN}-miniupnpc"
6773
"mingw-w64-${TOOLCHAIN}-nlohmann-json"
6874
"mingw-w64-${TOOLCHAIN}-nodejs"
69-
"mingw-w64-${TOOLCHAIN}-nsis"
7075
"mingw-w64-${TOOLCHAIN}-onevpl"
7176
"mingw-w64-${TOOLCHAIN}-openssl"
7277
"mingw-w64-${TOOLCHAIN}-opus"
7378
"mingw-w64-${TOOLCHAIN}-toolchain"
7479
)
7580
81+
if [[ "${MATRIX_MSYSTEM}" == "ucrt64" ]]; then
82+
dependencies+=(
83+
"mingw-w64-${TOOLCHAIN}-MinHook"
84+
"mingw-w64-${TOOLCHAIN}-nsis"
85+
)
86+
fi
87+
7688
# do not modify below this line
7789
7890
ignore_packages=()
@@ -83,7 +95,7 @@ jobs:
8395
tarball="${pkg}-${version}-any.pkg.tar.zst"
8496
8597
# download working version
86-
wget "https://repo.msys2.org/mingw/${MSYSTEM}/${tarball}"
98+
wget "https://repo.msys2.org/mingw/${MATRIX_MSYSTEM}/${tarball}"
8799
88100
tarballs="${tarballs} ${tarball}"
89101
done
@@ -169,17 +181,24 @@ jobs:
169181
echo "::remove-matcher owner=gcc::"
170182
171183
- name: Package Windows
184+
env:
185+
# MSYSTEM is a built-in environment variable of MSYS2.
186+
# Do not use this environment variable name.
187+
# if MSYSTEM is used, it interferes with environment and cpack cannot be found.
188+
MATRIX_MSYSTEM: ${{ matrix.msystem }}
172189
shell: msys2 {0}
173190
run: |
174191
mkdir -p artifacts
175192
cd build
176193
177-
# package
178-
cpack -G NSIS
179-
cpack -G ZIP
194+
# nsis installer
195+
if [[ "${MATRIX_MSYSTEM}" == "ucrt64" ]]; then
196+
cpack -G NSIS
197+
mv ./cpack_artifacts/Sunshine.exe ../artifacts/Sunshine-${{ matrix.name }}-installer.exe
198+
fi
180199
181-
# move
182-
mv ./cpack_artifacts/Sunshine.exe ../artifacts/Sunshine-${{ matrix.name }}-installer.exe
200+
# portable version
201+
cpack -G ZIP
183202
mv ./cpack_artifacts/Sunshine.zip ../artifacts/Sunshine-${{ matrix.name }}-portable.zip
184203
185204
- name: Run tests

0 commit comments

Comments
 (0)