Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@main
- name: Install system python deps
run: sudo apt update && sudo apt install python3-ply python3-pil libjpeg-dev zlib1g-dev
- name: Get setuptools
run: pip install --upgrade setuptools
- name: Install poetry
run: pip install poetry
- name: Install system deps
run: sudo apt update && sudo apt install libjpeg-dev zlib1g-dev
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python 3.12.10
run: uv python install 3.12.10
- name: Create and activate virtual environment
run: |
uv venv --python 3.12.10
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Install dependencies
run: pip install .
run: uv pip install .
- name: Build
run: poetry build
run: uv build
- name: Upload Wheel
uses: actions/upload-artifact@v4
with:
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/sphinx-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install system deps
run: sudo apt update && sudo apt install libjpeg-dev zlib1g-dev

- name: Install dependencies
- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Set up Python 3.12.10
run: uv python install 3.12.10

- name: Create and activate virtual environment
run: |
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip install sphinx furo myst_parser
uv venv --python 3.12.10
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Install dependencies
run: uv pip install ".[doc]"

- name: Build documentation
run: make doc
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@main
- name: Install system python deps
run: sudo apt update && sudo apt install python3-ply python3-pil libjpeg-dev zlib1g-dev
- name: Get setuptools
run: pip install --upgrade setuptools
- name: Install system deps
run: sudo apt update && sudo apt install libjpeg-dev zlib1g-dev
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python 3.12.10
run: uv python install 3.12.10
- name: Create and activate virtual environment
run: |
uv venv --python 3.12.10
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Install dependencies
run: pip install ".[test]"
run: uv pip install ".[test]"
- name: Test agrf with coverage
run: pytest
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
]
description = "Ahyangyi's OpenTTD NewGRF Toolkit"
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.12.10"
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
Expand Down
Loading