8000 Use uv by filmor · Pull Request #2520 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

Use uv #2520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

Use uv #2520

Changes from 1 commit
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
Prev Previous commit
Next Next commit
Activate environment in CI
  • Loading branch information
filmor committed Apr 27, 2025
commit bef4e0cb8446bf204d31ad5e7600863d813fe905
17 changes: 9 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,42 +58,43 @@ jobs:
dotnet-version: '6.0.x'

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
architecture: ${{ matrix.os.platform }}
python-version: ${{ matrix.python }}
activate-environment: true
enable-cache: true

- name: Set Python DLL path and PYTHONHOME (non Windows)
if: ${{ matrix.os.category != 'windows' }}
run: |
echo PYTHONNET_PYDLL=$(uv run find_libpython) >> $GITHUB_ENV
echo PYTHONNET_PYDLL=$(find_libpython) >> $GITHUB_ENV

- name: Set Python DLL path and PYTHONHOME (Windows)
if: ${{ matrix.os.category == 'windows' }}
run: |
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(uv run find_libpython)"
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(find_libpython)"

- name: Embedding tests
run: uv run dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
run: dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
env:
MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466

- name: Python Tests (Mono)
if: ${{ matrix.os.category != 'windows' }}
run: uv run pytest --runtime mono
run: pytest --runtime mono

# TODO: Run these tests on Windows x86
- name: Python Tests (.NET Core)
if: ${{ matrix.os.platform == 'x64' }}
run: uv run pytest --runtime coreclr
run: pytest --runtime coreclr

- name: Python Tests (.NET Framework)
if: ${{ matrix.os.category == 'windows' }}
run: uv run pytest --runtime netfx
run: pytest --runtime netfx

- name: Python tests run from .NET
run: uv run dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
run: dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/

- name: Perf tests
if: ${{ (matrix.python == '3.8') && (matrix.os.platform == 'x64') }}
Expand Down
Loading
2956
0