1212 fail-fast : false
1313 matrix :
1414 os : [windows, ubuntu, macos]
15- pyver_minor : [6, 7, 8, 9 ]
15+ python : ["3.6", "3.7", "3.8", "3.9" ]
1616 platform : [x64]
1717 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
4218
4319 env :
4420 PYTHONNET_SHUTDOWN_MODE : ${{ matrix.SHUTDOWN_MODE }}
@@ -56,10 +32,10 @@ jobs:
5632 - name : Setup .NET
5733 uses : actions/setup-dotnet@v1
5834
59- - name : Set up Python 3. ${{ matrix.pyver_minor }}
35+ - name : Set up Python ${{ matrix.python }}
6036 uses : actions/setup-python@v2
6137 with :
62- python-version : 3. ${{ matrix.pyver_minor }}
38+ python-version : ${{ matrix.python }}
6339 architecture : ${{ matrix.platform }}
6440
6541 - name : Install dependencies
@@ -68,31 +44,34 @@ jobs:
6844
6945 - name : Build and Install
7046 run : |
71- python setup.py configure
7247 pip install -v .
7348
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}}
49+ - name : Set Python DLL path (non Windows)
50+ if : ${{ matrix.os != 'windows' }}
51+ run : |
52+ python -m pythonnet.find_libpython --export >> $GITHUB_ENV
8053
81- - name : Python Tests
82- run : pytest
83- if : ${{ matrix.os == 'macos' }}
54+ - name : Set Python DLL path (Windows)
55+ if : ${{ matrix.os == 'windows' }}
56+ run : |
57+ python -m pythonnet.find_libpython --export | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
58+
59+ - name : Python Tests (Mono)
60+ if : ${{ matrix.os != 'windows' }}
61+ run : pytest --runtime mono
62+
63+ - name : Python Tests (.NET Core)
64+ run : pytest --runtime netcore
65+
66+ - name : Python Tests (.NET Framework)
67+ if : ${{ matrix.os == 'windows' }}
68+ run : pytest --runtime netfx
8469
8570 - name : Embedding tests
8671 run : dotnet test --runtime any-${{ matrix.platform }} src/embed_tests/
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}}
9072
9173 - name : Python tests run from .NET
9274 run : dotnet test --runtime any-${{ matrix.platform }} src/python_tests_runner/
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}}
9675
9776 # TODO: Run perf tests
9877 # TODO: Run mono tests on Windows?
0 commit comments