Skip to content

Commit

Permalink
ci: simplify windows build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
belingud committed Dec 22, 2024
1 parent 012d4ff commit 651273e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Install Nuitka
run: pdm add nuitka

# Windows Build - 修改后的构建步骤
# Windows Build
- name: Build with Nuitka (Windows)
if: matrix.platform == 'windows'
shell: pwsh
Expand All @@ -67,11 +67,9 @@ jobs:
$outputName = "gptcomet-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.ref_name }}"
echo "Output name will be: $outputName"
# 创建并清理 dist 目录
Remove-Item -Path dist -Recurse -Force -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Force -Path dist
# 使用 --output-dir 和 --output-filename 参数确保文件直接输出到正确位置
pdm run python -m nuitka `
--standalone `
--onefile `
Expand All @@ -96,7 +94,7 @@ jobs:
echo "Checking dist directory contents:"
Get-ChildItem dist -Recurse | Format-Table FullName, Length, LastWriteTime
# Windows Test - 简化的测试步骤
# Windows Test
- name: Test built executable (Windows)
if: matrix.platform == 'windows'
shell: pwsh
Expand All @@ -113,7 +111,6 @@ jobs:
echo "ERROR: Executable not found at path: $exePath"
echo "Directory contents:"
Get-ChildItem "dist" -Recurse | Format-Table FullName, Length, LastWriteTime
exit 1
}
# Unix Build
Expand All @@ -123,7 +120,6 @@ jobs:
echo "Starting Nuitka build for Unix..."
echo "Current directory: $(pwd)"
# 清理并创建 dist 目录
rm -rf dist
mkdir -p dist
Expand Down

0 comments on commit 651273e

Please sign in to comment.