Skip to content

Commit cdd1ad1

Browse files
committed
Revert "ci: fix"
This reverts commit b14ed1c.
1 parent b14ed1c commit cdd1ad1

File tree

1 file changed

+1
-75
lines changed

1 file changed

+1
-75
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,10 @@ concurrency:
2424
group: ${{ github.workflow }}-${{ github.ref }}
2525
cancel-in-progress: true
2626
jobs:
27-
cleanup:
28-
name: Cleanup workspace
29-
runs-on: [self-hosted, linux]
30-
if: always()
31-
steps:
32-
- name: Force clean all workspaces
33-
run: |
34-
# 清理所有可能的工作目录
35-
sudo find /home/parallels/actions-runner/_work -name "project-detector" -type d -exec rm -rf {} + 2>/dev/null || true
36-
# 确保工作目录权限正确
37-
sudo chown -R parallels:parallels /home/parallels/actions-runner/_work/ 2>/dev/null || true
38-
sudo chmod -R 755 /home/parallels/actions-runner/_work/ 2>/dev/null || true
39-
shell: bash
40-
4127
lint:
4228
name: Lint
4329
runs-on: [self-hosted, macos]
4430
steps:
45-
- name: Force clean workspace
46-
run: |
47-
# 强制删除所有文件和目录,包括隐藏文件
48-
sudo find ${{ github.workspace }} -mindepth 1 -delete 2>/dev/null || true
49-
# 如果find失败,使用rm -rf作为备选
50-
sudo rm -rf ${{ github.workspace }}/* ${{ github.workspace }}/.[^.]* ${{ github.workspace }}/..?* 2>/dev/null || true
51-
# 确保工作目录存在且权限正确
52-
sudo mkdir -p ${{ github.workspace }}
53-
sudo chown -R $(whoami):$(whoami) ${{ github.workspace }}
54-
sudo chmod -R 755 ${{ github.workspace }}
55-
shell: bash
5631
- uses: actions/checkout@v5
5732
- name: setup pnpm
5833
uses: pnpm/action-setup@v4
@@ -111,17 +86,6 @@ jobs:
11186
name: stable - ${{ matrix.settings.target }} - node@20
11287
runs-on: ${{ matrix.settings.host }}
11388
steps:
114-
- name: Force clean workspace
115-
run: |
116-
# 强制删除所有文件和目录,包括隐藏文件
117-
sudo find ${{ github.workspace }} -mindepth 1 -delete 2>/dev/null || true
118-
# 如果find失败,使用rm -rf作为备选
119-
sudo rm -rf ${{ github.workspace }}/* ${{ github.workspace }}/.[^.]* ${{ github.workspace }}/..?* 2>/dev/null || true
120-
# 确保工作目录存在且权限正确
121-
sudo mkdir -p ${{ github.workspace }}
122-
sudo chown -R $(whoami):$(whoami) ${{ github.workspace }}
123-
sudo chmod -R 755 ${{ github.workspace }}
124-
shell: bash
12589
- uses: actions/checkout@v5
12690
- name: setup pnpm
12791
uses: pnpm/action-setup@v4
@@ -228,17 +192,6 @@ jobs:
228192
- '22'
229193
runs-on: ${{ matrix.settings.host }}
230194
steps:
231-
- name: Force clean workspace
232-
run: |
233-
# 强制删除所有文件和目录,包括隐藏文件
234-
sudo find ${{ github.workspace }} -mindepth 1 -delete 2>/dev/null || true
235-
# 如果find失败,使用rm -rf作为备选
236-
sudo rm -rf ${{ github.workspace }}/* ${{ github.workspace }}/.[^.]* ${{ github.workspace }}/..?* 2>/dev/null || true
237-
# 确保工作目录存在且权限正确
238-
sudo mkdir -p ${{ github.workspace }}
239-
sudo chown -R $(whoami):$(whoami) ${{ github.workspace }}
240-
sudo chmod -R 755 ${{ github.workspace }}
241-
shell: bash
242195
- uses: actions/checkout@v5
243196
- name: setup pnpm
244197
uses: pnpm/action-setup@v4
@@ -280,17 +233,6 @@ jobs:
280233
- linux
281234
- ${{ contains(matrix.target, 'x86_64') && 'x64' || 'arm64' }}
282235
steps:
283-
- name: Force clean workspace
284-
run: |
285-
# 强制删除所有文件和目录,包括隐藏文件
286-
sudo find ${{ github.workspace }} -mindepth 1 -delete 2>/dev/null || true
287-
# 如果find失败,使用rm -rf作为备选
288-
sudo rm -rf ${{ github.workspace }}/* ${{ github.workspace }}/.[^.]* ${{ github.workspace }}/..?* 2>/dev/null || true
289-
# 确保工作目录存在且权限正确
290-
sudo mkdir -p ${{ github.workspace }}
291-
sudo chown -R $(whoami):$(whoami) ${{ github.workspace }}
292-
sudo chmod -R 755 ${{ github.workspace }}
293-
shell: bash
294236
- uses: actions/checkout@v5
295237
- name: setup pnpm
296238
uses: pnpm/action-setup@v4
@@ -339,12 +281,7 @@ jobs:
339281
with:
340282
image: ${{ steps.docker.outputs.IMAGE }}
341283
options: -v ${{ steps.docker.outputs.PNPM_STORE_PATH }}:${{ steps.docker.outputs.PNPM_STORE_PATH }} -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }}
342-
run: |
343-
# 在Docker容器内清理可能的权限问题
344-
npm run test
345-
# 测试完成后清理可能产生权限问题的文件
346-
find . -name ".vite" -type d -exec chmod -R 755 {} \; 2>/dev/null || true
347-
find . -name "node_modules" -type d -exec chmod -R 755 {} \; 2>/dev/null || true
284+
run: npm run test
348285

349286
publish:
350287
name: Publish
@@ -354,17 +291,6 @@ jobs:
354291
- test-macOS-windows-binding
355292
- test-linux-binding
356293
steps:
357-
- name: Force clean workspace
358-
run: |
359-
# 强制删除所有文件和目录,包括隐藏文件
360-
sudo find ${{ github.workspace }} -mindepth 1 -delete 2>/dev/null || true
361-
# 如果find失败,使用rm -rf作为备选
362-
sudo rm -rf ${{ github.workspace }}/* ${{ github.workspace }}/.[^.]* ${{ github.workspace }}/..?* 2>/dev/null || true
363-
# 确保工作目录存在且权限正确
364-
sudo mkdir -p ${{ github.workspace }}
365-
sudo chown -R $(whoami):$(whoami) ${{ github.workspace }}
366-
sudo chmod -R 755 ${{ github.workspace }}
367-
shell: bash
368294
- uses: actions/checkout@v5
369295
- name: setup pnpm
370296
uses: pnpm/action-setup@v4

0 commit comments

Comments
 (0)