Skip to content

Commit

Permalink
chore: add package pipeline for 4 os optimize linux size
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoangthuan99 committed Dec 9, 2024
1 parent 7501109 commit 9f27ae4
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ jobs:
$pythonFolder = Split-Path -Path "$pythonPath" -Parent
echo "PYTHON_FOLDER=$pythonFolder" >> $env:GITHUB_ENV
Copy-Item -Path "$pythonFolder\python*.*" -Destination "$pythonFolder\Scripts\" -Force -Recurse
Copy-Item -Path "$pythonFolder\python*.*" -Destination "$pythonFolder\Scripts\" -Force
- name: prepare python package unix
if : runner.os != 'windows'
- name: prepare python package macos
if : runner.os == 'macOs'
run: |
source $HOME/miniconda/bin/activate base
conda init
Expand All @@ -118,6 +118,18 @@ jobs:
PYTHON_FOLDER=$(dirname $(dirname "$PYTHON_PATH"))
echo "PYTHON_FOLDER=$PYTHON_FOLDER" >> $GITHUB_ENV
echo "github end PYTHON_FOLDER: ${{env.PYTHON_FOLDER}}"
- name: prepare python package linux
if : runner.os == 'linux'
run: |
source $HOME/miniconda/bin/activate base
conda init
conda activate ${{env.MODEL_NAME}}
PYTHON_PATH=$(which python)
echo $PYTHON_PATH
PYTHON_FOLDER=$(dirname $(dirname "$PYTHON_PATH"))
rm -rf PYTHON_FOLDER/lib/python3.1
echo "PYTHON_FOLDER=$PYTHON_FOLDER" >> $GITHUB_ENV
echo "github end PYTHON_FOLDER: ${{env.PYTHON_FOLDER}}"
- name: Upload Artifact
#if : runner.os == 'windows' || runner.os == 'linux'
Expand Down

0 comments on commit 9f27ae4

Please sign in to comment.