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,20 @@ 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
50+ run : |
51+ python -m pythonnet.find_libpython --export >> $GITHUB_ENV
8052
8153 - name : Python Tests
8254 run : pytest
83- if : ${{ matrix.os == 'macos' }}
8455
8556 - name : Embedding tests
8657 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}}
9058
9159 - name : Python tests run from .NET
9260 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}}
9661
9762 # TODO: Run perf tests
9863 # TODO: Run mono tests on Windows?
0 commit comments