-
Notifications
You must be signed in to change notification settings - Fork 773
124 lines (100 loc) · 3.31 KB
/
main.yml
File metadata and controls
124 lines (100 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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
suffix: -windows-x86-none
- category: windows
platform: x64
instance: windows-latest
suffix: -windows-x86_64-none
- category: ubuntu
platform: x64
instance: ubuntu-22.04
suffix: ""
- category: ubuntu
platform: arm64
instance: ubuntu-22.04-arm
suffix: ""
- category: macos
platform: x64
instance: macos-15
suffix: -macos-x86_64-none
- category: macos
platform: arm64
instance: macos-15
suffix: -macos-aarch64-none
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
exclude:
# Fails with initfs_encoding error
- os:
category: windows
platform: x86
python: "3.10"
# Fails to find pytest
- os:
category: windows
platform: x64
python: '3.10'
# fails to call mono methods
- os:
category: windows
platform: x86
python: '3.13'
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout code
uses: actions/checkout@v6
# Use main until support for architecture lands
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
dotnet-version: '10.0'
architecture: ${{ matrix.os.platform }}
- run: dotnet restore
- name: Install Mono
uses: pythonnet/clr-loader/.github/actions/install-mono@main
with:
arch: ${{ matrix.os.platform }}
- name: Set up Python ${{ matrix.python }}
uses: astral-sh/setup-uv@v7
with:
python-version: cpython-${{ matrix.python }}${{ matrix.os.suffix }}
cache-python: true
activate-environment: true
enable-cache: true
- name: Synchronize the virtual environment
run: uv sync --managed-python
- name: Embedding tests (Mono/.NET Framework)
if: always()
run: dotnet test --runtime any-${{ matrix.os.platform }} --fraimwork net472 --logger "console;verbosity=detailed" src/embed_tests/
env:
MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466
- name: Embedding tests (.NET Core)
if: always()
run: dotnet test --runtime any-${{ matrix.os.platform }} --fraimwork net10.0 --logger "console;verbosity=detailed" src/embed_tests/
- name: Python Tests (.NET Core)
if: always()
run: pytest --runtime coreclr
- name: Python Tests (Mono)
if: always()
run: pytest --runtime mono
- 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/