12
12
fail-fast : false
13
13
matrix :
14
14
os : [windows, ubuntu, macos]
15
- python : [3. 6, 3. 7, 3. 8, 3. 9]
15
+ pyver_minor : [6, 7, 8, 9]
16
16
platform : [x64]
17
17
shutdown_mode : [Normal, Soft]
18
+ include :
19
+ - os : ubuntu
20
+ pyver_minor : 6
21
+ dll_suffix : m
22
+ - os : ubuntu
23
+ pyver_minor : 7
24
+ dll_suffix : m
25
+
26
+ - os : macos
27
+ dll_prefix : lib
28
+ dll_pyver_major : ' 3.'
29
+ dll_suffix : m
30
+ - os : ubuntu
31
+ dll_prefix : lib
32
+ dll_pyver_major : ' 3.'
33
+ - os : windows
34
+ dll_pyver_major : ' 3'
35
+
36
+ - os : ubuntu
37
+ dll_ext : .so
38
+ - os : windows
39
+ dll_ext : .dll
40
+ - os : macos
41
+ dll_ext : .dylib
18
42
19
43
env :
20
44
PYTHONNET_SHUTDOWN_MODE : ${{ matrix.SHUTDOWN_MODE }}
@@ -32,10 +56,10 @@ jobs:
32
56
- name : Setup .NET
33
57
uses : actions/setup-dotnet@v1
34
58
35
- - name : Set up Python ${{ matrix.python }}
59
+ - name : Set up Python 3. ${{ matrix.pyver_minor }}
36
60
uses : actions/setup-python@v2
37
61
with :
38
- python-version : ${{ matrix.python }}
62
+ python-version : 3. ${{ matrix.pyver_minor }}
39
63
architecture : ${{ matrix.platform }}
40
64
41
65
- name : Install dependencies
@@ -47,16 +71,28 @@ jobs:
47
71
python setup.py configure
48
72
pip install -v .
49
73
74
+ # TODO this should be gone once clr module sets PythonDLL or preloads it
75
+ - name : Python Tests
76
+ run : pytest
77
+ if : ${{ matrix.os != 'macos' }}
78
+ env :
79
+ PYTHONNET_PYDLL : ${{ matrix.DLL_PREFIX }}python${{matrix.DLL_PYVER_MAJOR}}${{matrix.PYVER_MINOR}}${{matrix.DLL_SUFFIX}}${{matrix.DLL_EXT}}
80
+
50
81
- name : Python Tests
51
82
run : pytest
83
+ if : ${{ matrix.os == 'macos' }}
52
84
53
85
- name : Embedding tests
54
86
run : dotnet test --runtime any-${{ matrix.platform }} src/embed_tests/
55
87
if : ${{ matrix.os != 'macos' }} # Not working right now, doesn't find libpython
88
+ env :
89
+ PYTHONNET_PYDLL : ${{ matrix.DLL_PREFIX }}python${{matrix.DLL_PYVER_MAJOR}}${{matrix.PYVER_MINOR}}${{matrix.DLL_SUFFIX}}${{matrix.DLL_EXT}}
56
90
57
91
- name : Python tests run from .NET
58
92
run : dotnet test --runtime any-${{ matrix.platform }} src/python_tests_runner/
59
93
if : ${{ matrix.os == 'windows' }} # Not working for others right now
94
+ env :
95
+ PYTHONNET_PYDLL : ${{ matrix.DLL_PREFIX }}python${{matrix.DLL_PYVER_MAJOR}}${{matrix.PYVER_MINOR}}${{matrix.DLL_SUFFIX}}${{matrix.DLL_EXT}}
60
96
61
97
# TODO: Run perf tests
62
98
# TODO: Run mono tests on Windows?
0 commit comments