Skip to content

Commit

Permalink
use setup-uv on posix runners
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulMelody committed Sep 18, 2024
1 parent bd34fe6 commit 1783c74
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
62 changes: 28 additions & 34 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,24 @@ jobs:
needs: [make-outputs]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: pdm-project/setup-pdm@v4
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
python-version: 3.11
version: "latest"
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install -y libegl1
- name: Build with pyinstaller
run: |
pdm sync -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging --no-editable
uv tool install pdm
uv tool run pdm export -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging -o packaging/requirements.txt --without-hashes
uv tool run pdm build --no-sdist
uv venv --python 3.11
cd packaging
pdm run pyinstaller libresvip.spec
uv pip install -r requirements.txt
python -m pip install ../dist/*.whl --no-deps
uv run pyinstaller libresvip.spec
cd dist
tar -czvf LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.linux-x86_64.tar.gz libresvip
rm -rf libresvip
Expand Down Expand Up @@ -272,23 +274,19 @@ jobs:
needs: [make-outputs]
steps:
- uses: actions/checkout@v4
- name: Set up Python (MacOS x86_64)
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
python-version: "3.12"
- uses: pdm-project/setup-pdm@v4
with:
python-version: 3.12
version: "latest"
- name: Build with pyinstaller
run: |
pdm export -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging -o packaging/requirements.txt --without-hashes
pdm build --no-sdist
python -m venv .venv
source .venv/bin/activate
uv tool install pdm
uv tool run pdm export -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging -o packaging/requirements.txt --without-hashes
uv tool run pdm build --no-sdist
uv venv --python 3.12
cd packaging
python -m ensurepip --upgrade
python -m pip install pillow uv
python -m uv pip install -r requirements.txt
uv pip install pillow
uv pip install -r requirements.txt
python -m pip install ../dist/*.whl --no-deps
python -m PyInstaller libresvip.spec
brew install create-dmg
Expand All @@ -313,23 +311,19 @@ jobs:
needs: [make-outputs]
steps:
- uses: actions/checkout@v4
- name: Set up Python (MacOS arm64)
run: |
curl -L https://www.python.org/ftp/python/3.12.3/python-3.12.3-macos11.pkg --output ~/Downloads/python.pkg
sudo installer -pkg ~/Downloads/python.pkg -target /
- uses: pdm-project/setup-pdm@v4
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
python-version: 3.12
version: "latest"
- name: Build with pyinstaller
run: |
pdm export -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging -o packaging/requirements.txt --without-hashes
pdm build --no-sdist
python -m venv .venv
source .venv/bin/activate
uv tool install pdm
uv tool run pdm export -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging -o packaging/requirements.txt --without-hashes
uv tool run pdm build --no-sdist
uv venv --python 3.12
cd packaging
python -m ensurepip --upgrade
python -m pip install pillow uv
python -m uv pip install -r requirements.txt
uv pip install pillow
uv pip install -r requirements.txt
curl -L https://mediaarea.net/download/binary/libmediainfo0/${LIBMEDIAINFO_VERSION}/MediaInfo_DLL_${LIBMEDIAINFO_VERSION}_Mac_x86_64+arm64.tar.bz2 --output libmediainfo.tar.bz2
tar xvf libmediainfo.tar.bz2
mv MediaInfoLib/libmediainfo.0.dylib ../.venv/lib/python3.12/site-packages/pymediainfo/
Expand Down
1 change: 1 addition & 0 deletions libresvip/plugins/tlp/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ class TuneLabTrack(BaseModel):
pan: float
mute: bool
solo: bool
color: str = ""
parts: list[TuneLabPart] = Field(default_factory=list)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ test = ["pytest>=8.3.3", "pytest-datadir>=1.5.0"]

[tool.pdm.build]
includes = ["libresvip"]
excludes = ["tests", "libresvip/__pyinstaller/*", "libresvip/res/qml/**", "libresvip/res/locales/*.ts", "libresvip/**/*.po", "**/.mypy_cache"]
excludes = ["tests", "libresvip/res/qml/**", "libresvip/res/locales/*.ts", "libresvip/**/*.po", "**/.mypy_cache"]

[tool.pytest.ini_options]
addopts = "-s -p no:warnings"
Expand Down

0 comments on commit 1783c74

Please sign in to comment.