|
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: |
|
# Disabled for now, will require some work (#2653) |
|
# |
|
# - 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"] |
|
|
|
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: Synchronize the virtual environment |
|
run: uv sync |
|
|
|
- name: Embedding tests (Mono/.NET Framework) |
|
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net472 --logger "console;verbosity=detailed" src/embed_tests/ |
|
if: always() |
|
env: |
|
MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466 |
|
|
|
- name: Embedding tests (.NET Core) |
|
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net8.0 --logger "console;verbosity=detailed" src/embed_tests/ |
|
if: always() |
|
|
|
- name: Python Tests (Mono) |
|
if: ${{ matrix.os.category != 'windows' }} |
|
run: pytest --runtime mono |
|
|
|
- name: Python Tests (.NET Core) |
|
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: dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/ |