Skip to content

Commit 538e5fd

Browse files
committed
🐞 fix: 尝试修复 MacOS 构建
1 parent 8bf3eeb commit 538e5fd

4 files changed

Lines changed: 24 additions & 22 deletions

File tree

.github/workflows/dev.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ jobs:
7979
run: |
8080
echo "🧹 Cleaning workspace, node_modules, and Electron caches..."
8181
rm -rf dist out node_modules ~/.cache/electron-builder ~/.cache/electron
82+
# macOS 上安装 LLVM 以支持 Wasm 编译
83+
- name: Install LLVM on macOS
84+
if: runner.os == 'macOS'
85+
run: brew install llvm
86+
- name: Set Environment Variables on macOS
87+
if: runner.os == 'macOS'
88+
run: |
89+
echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV
90+
echo "AR=$(brew --prefix llvm)/bin/llvm-ar" >> $GITHUB_ENV
8291
# 安装项目依赖
8392
- name: Install dependencies
8493
run: pnpm install
@@ -143,28 +152,19 @@ jobs:
143152
name: Upload Artifacts - Windows Setup arm64,
144153
if: runner.os == 'Windows',
145154
uses: actions/upload-artifact@v4,
146-
with:
147-
{ name: SPlayer-Windows-setup-arm64, path: dist/*-arm64-setup.exe },
155+
with: { name: SPlayer-Windows-setup-arm64, path: dist/*-arm64-setup.exe },
148156
}
149157
- {
150158
name: Upload Artifacts - Windows Portable x64,
151159
if: runner.os == 'Windows',
152160
uses: actions/upload-artifact@v4,
153-
with:
154-
{
155-
name: SPlayer-Windows-portable-x64,
156-
path: dist/*-x64-portable.exe,
157-
},
161+
with: { name: SPlayer-Windows-portable-x64, path: dist/*-x64-portable.exe },
158162
}
159163
- {
160164
name: Upload Artifacts - Windows Portable arm64,
161165
if: runner.os == 'Windows',
162166
uses: actions/upload-artifact@v4,
163-
with:
164-
{
165-
name: SPlayer-Windows-portable-arm64,
166-
path: dist/*-arm64-portable.exe,
167-
},
167+
with: { name: SPlayer-Windows-portable-arm64, path: dist/*-arm64-portable.exe },
168168
}
169169
- {
170170
name: Upload Artifacts - macOS DMG x64,
@@ -194,15 +194,13 @@ jobs:
194194
name: Upload Artifacts - Linux AppImage x64,
195195
if: runner.os == 'Linux',
196196
uses: actions/upload-artifact@v4,
197-
with:
198-
{ name: SPlayer-Linux-appimage-x64, path: dist/*-x86_64.AppImage },
197+
with: { name: SPlayer-Linux-appimage-x64, path: dist/*-x86_64.AppImage },
199198
}
200199
- {
201200
name: Upload Artifacts - Linux AppImage arm64,
202201
if: runner.os == 'Linux',
203202
uses: actions/upload-artifact@v4,
204-
with:
205-
{ name: SPlayer-Linux-appimage-arm64, path: dist/*-arm64.AppImage },
203+
with: { name: SPlayer-Linux-appimage-arm64, path: dist/*-arm64.AppImage },
206204
}
207205
- {
208206
name: Upload Artifacts - Linux Pacman x64,
@@ -214,8 +212,7 @@ jobs:
214212
name: Upload Artifacts - Linux Pacman arm64,
215213
if: runner.os == 'Linux',
216214
uses: actions/upload-artifact@v4,
217-
with:
218-
{ name: SPlayer-Linux-pacman-arm64, path: dist/*-aarch64.pacman },
215+
with: { name: SPlayer-Linux-pacman-arm64, path: dist/*-aarch64.pacman },
219216
}
220217
- {
221218
name: Upload Artifacts - Linux DEB x64,

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ jobs:
6666
run: |
6767
echo "🧹 Cleaning workspace, node_modules, and Electron caches..."
6868
rm -rf dist out node_modules ~/.cache/electron-builder ~/.cache/electron
69+
# macOS 上安装 LLVM 以支持 Wasm 编译
70+
- name: Install LLVM on macOS
71+
if: runner.os == 'macOS'
72+
run: brew install llvm
73+
- name: Set Environment Variables on macOS
74+
if: runner.os == 'macOS'
75+
run: |
76+
echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV
77+
echo "AR=$(brew --prefix llvm)/bin/llvm-ar" >> $GITHUB_ENV
6978
# 安装项目依赖
7079
- name: Install dependencies
7180
run: pnpm install

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
"get-port": "^7.1.0",
6767
"github-markdown-css": "^5.8.1",
6868
"got": "^14.6.5",
69-
"iconv-lite": "^0.7.2",
7069
"js-cookie": "^3.0.5",
7170
"jss": "^10.10.0",
7271
"jss-preset-default": "^10.10.0",

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)