FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Implement venv derivation · pythonnet/pythonnet@3a3abb9 · GitHub

Repository navigation

Use uv and derive as much as possible from the environment, if available #1568

Use uv and derive as much as possible from the environment, if available

Use uv and derive as much as possible from the environment, if available #1568

Workflow file for this run

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
name: Main
on:
push:
branches:
- master
pull_request:
jobs:
build-test:
name: Build and Test
runs-on: ${{ matrix.os.instance }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os:
- category: windows
platform: x86
instance: windows-latest
- category: windows
platform: x64
instance: windows-latest
- category: ubuntu
platform: x64
instance: ubuntu-22.04
- category: ubuntu
platform: arm64
instance: ubuntu-22.04-arm
- category: macos
platform: x64
instance: macos-13
python: ["3.10", "3.11", "3.12", "3.13"]
# This fails in pytest with:
# CSC : error CS4023: /platform:anycpu32bitpreferred can only be used with /t:exe, /t:winexe and /t:appcontainerexe [D:\a\pythonnet\pythonnet\src\runtime\Python.Runtime.csproj]
exclude:
- os:
category: windows
platform: x86
python: "3.13"
steps:
- name: Set Environment on macOS
uses: maxim-lobanov/setup-xamarin@v1
if: ${{ matrix.os.category == 'macos' }}
with:
mono-version: latest
- name: Checkout code
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'
- name: Set up Python ${{ matrix.python }}
uses: astral-sh/setup-uv@v6
with:
architecture: ${{ matrix.os.platform }}
python-version: ${{ matrix.python }}
activate-environment: true
enable-cache: true
- name: Embedding 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: pytest --runtime mono
# TODO: Run these tests on Windows x86
- name: Python Tests (.NET Core)
if: ${{ matrix.os.platform == 'x64' }}
run: pytest --runtime coreclr
- name: Python Tests (.NET Framework)
if: ${{ matrix.os.category == 'windows' }}
run: pytest --runtime netfx
- name: Python tests run from .NET
run: uv run dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
# TODO: Run mono tests on Windows?

Back | FazBrowse Home | New Git URL