Skip to content

Commit

Permalink
ci(test): Test build python tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyinc committed Nov 2, 2024
1 parent 5d136ad commit 85127d0
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/release-python-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,25 @@ jobs:
# Build lyric-py-worker
cd ../lyric-py-worker
rye sync
# Setup virtualenv and install dependencies
python3 -m venv .venv
if [ "${{ matrix.os }}" = "windows-latest" ]; then
source .venv/Scripts/activate
else
source .venv/bin/activate
fi
pip install --upgrade pip
pip install -r app-requirements.txt
# Install lyric-task
pip install --force-reinstall ../dist/lyric_task-*.whl
pip install -r app-requirements.txt
# Build wasm
cd src
componentize-py -d ./wit -w lyric-py-task componentize worker -o python_worker_fat.wasm
wasm-tools print python_worker_fat.wasm | wasm-tools strip -a -o lyric_py_worker/python_worker.wasm
rm python_worker_fat.wasm
cd ..
# Build wheel
rye sync --no-dev
rye build
# Build lyric-js-worker
Expand Down Expand Up @@ -159,17 +167,21 @@ jobs:
# Build lyric-py-worker
cd ../lyric-py-worker
rye sync
# Setup virtualenv and install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r app-requirements.txt
# Install lyric-task
pip install --force-reinstall ../dist/lyric_task-*.whl
pip install -r app-requirements.txt
# Build wasm
cd src
componentize-py -d ./wit -w lyric-py-task componentize worker -o python_worker_fat.wasm
wasm-tools print python_worker_fat.wasm | wasm-tools strip -a -o lyric_py_worker/python_worker.wasm
rm python_worker_fat.wasm
cd ..
# Build wheel
rye sync --no-dev
rye build
# Build lyric-js-worker
Expand Down Expand Up @@ -219,7 +231,11 @@ jobs:
# Build lyric-py-worker
cd ../lyric-py-worker
rye sync --no-dev
# Setup virtualenv and install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r app-requirements.txt
# Install lyric-task
pip install --force-reinstall ../dist/lyric_task-*.tar.gz
# Build wasm
Expand All @@ -229,6 +245,7 @@ jobs:
rm python_worker_fat.wasm
cd ..
# Build sdist
rye sync --no-dev
rye build --sdist
# Build lyric-js-worker
Expand Down

0 comments on commit 85127d0

Please sign in to comment.