Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 66a9188

Browse files
chore: add package pipeline for 4 os optimize linux size and fix windows
1 parent 9f27ae4 commit 66a9188

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

.github/workflows/python-package.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ jobs:
3838
- os: "linux"
3939
name: "amd64"
4040
runs-on: "ubuntu-20-04-cuda-12-0"
41-
- os: "mac"
42-
name: "amd64"
43-
runs-on: "macos-selfhosted-12"
44-
- os: "mac"
45-
name: "arm64"
46-
runs-on: "macos-silicon"
41+
# - os: "mac"
42+
# name: "amd64"
43+
# runs-on: "macos-selfhosted-12"
44+
# - os: "mac"
45+
# name: "arm64"
46+
# runs-on: "macos-silicon"
4747
- os: "windows"
4848
name: "amd64"
4949
runs-on: "windows-cuda-12-0"
@@ -98,14 +98,12 @@ jobs:
9898
if : runner.os == 'windows'
9999
shell: pwsh
100100
run: |
101-
$pythonPath = where.exe python
101+
$pythonPath = where.exe python |
102102
echo "Python path (where.exe): $pythonPath"
103-
104-
105103
$pythonFolder = Split-Path -Path "$pythonPath" -Parent
106104
echo "PYTHON_FOLDER=$pythonFolder" >> $env:GITHUB_ENV
107105
108-
Copy-Item -Path "$pythonFolder\python*.*" -Destination "$pythonFolder\Scripts\" -Force
106+
copy "$pythonFolder\python*.*" "$pythonFolder\Scripts\"
109107
110108
- name: prepare python package macos
111109
if : runner.os == 'macOs'
@@ -127,7 +125,7 @@ jobs:
127125
PYTHON_PATH=$(which python)
128126
echo $PYTHON_PATH
129127
PYTHON_FOLDER=$(dirname $(dirname "$PYTHON_PATH"))
130-
rm -rf PYTHON_FOLDER/lib/python3.1
128+
rm -rf $PYTHON_FOLDER/lib/python3.1
131129
echo "PYTHON_FOLDER=$PYTHON_FOLDER" >> $GITHUB_ENV
132130
echo "github end PYTHON_FOLDER: ${{env.PYTHON_FOLDER}}"
133131
@@ -140,6 +138,11 @@ jobs:
140138
include-hidden-files: true
141139
compression-level: 9
142140

141+
- name: Post Upload windows
142+
if : runner.os == 'windows'
143+
run: |
144+
rm ${{env.PYTHON_FOLDER}}/Scripts/python*.*
145+
143146
codesign:
144147
runs-on: macos-latest
145148
needs: build-and-test
@@ -172,11 +175,11 @@ jobs:
172175
name: ${{env.MODEL_NAME}}-mac-amd64-signed
173176
path: ${{env.MODEL_NAME}}-mac-amd64
174177
include-hidden-files: true
175-
compression-level: 0
178+
compression-level: 9
176179
- name: Upload Artifact
177180
uses: actions/upload-artifact@v4
178181
with:
179182
name: ${{env.MODEL_NAME}}-mac-arm64-signed
180183
path: ${{env.MODEL_NAME}}-mac-arm64
181184
include-hidden-files: true
182-
compression-level: 0
185+
compression-level: 9

0 commit comments

Comments
 (0)