Repository navigation
117 lines (106 loc) · 3.38 KB
/
Copy pathdebug_windows.yml
File metadata and controls
117 lines (106 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Copyright 2024, MCSL Team, mailto:services@mcsl.com.cn
#
# Part of "MCSL2", a simple and multifunctional Minecraft server launcher.
#
# Licensed under the GNU General Public License, Version 3.0, with our
# additional agreements. (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/MCSLTeam/MCSL2/raw/master/LICENSE
#
################################################################################
name: Windows Debug Build
on: workflow_dispatch
jobs:
Windows:
strategy:
fail-fast: false
matrix:
include:
- architecture: x64
runner: windows-2022
experimental: false
skip_arm64_missing_wheels: false
use_upx: true
- architecture: arm64
runner: windows-11-arm
experimental: true
skip_arm64_missing_wheels: true
use_upx: false
runs-on: ${{ matrix.runner }}
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout Repo
uses: actions/checkout@v6.0.3
- name: Setup uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Python
run: uv python install 3.8
- name: Sync Dependencies
shell: pwsh
run: uv sync --no-dev --locked ${{ matrix.skip_arm64_missing_wheels && '--no-install-package pyqt5-qt5 --no-install-package pywin32' || '' }}
- name: Build
run: |
uv run deploy.py --windows-console-mode=disable
- name: Optimize
shell: pwsh
run: |
$dist = "build/MCSL2.dist"
$removePaths = @(
"zstandard",
"_asyncio.pyd",
"pyexpat.pyd",
"qt5qml.dll",
"qt5qmlmodels.dll",
"qt5quick.dll"
)
foreach ($path in $removePaths) {
Remove-Item -Force -Recurse "$dist/$path" -ErrorAction SilentlyContinue
}
$upxTargets = @(
"_ctypes.pyd",
"_decimal.pyd",
"_elementtree.pyd",
"_lzma.pyd",
"_overlapped.pyd",
"_socket.pyd",
"_ssl.pyd",
"_win32sysloader.pyd",
"libffi-7.dll",
"libcrypto-1_1.dll",
"libssl-1_1.dll",
"MCSL2.exe",
"python38.dll",
"pythoncom38.dll",
"pywintypes38.dll",
"qt5core.dll",
"qt5dbus.dll",
"qt5gui.dll",
"qt5multimedia.dll",
"qt5network.dll",
"qt5printsupport.dll",
"qt5svg.dll",
"qt5websockets.dll",
"qt5widgets.dll",
"qt5xml.dll",
"select.pyd",
"unicodedata.pyd",
"win32api.pyd",
"win32gui.pyd",
"win32print.pyd"
) | ForEach-Object { "$dist/$_" } | Where-Object { Test-Path $_ }
if ("${{ matrix.use_upx }}" -eq "true" -and $upxTargets.Count -gt 0) {
.\upx.exe -9 $upxTargets
}
- name: Upload Artifacts
uses: actions/upload-artifact@v7.0.1
with:
name: MCSL2-Windows-${{ matrix.architecture }}
path: |
build/MCSL2.dist/**/*