12
12
strategy :
13
13
matrix :
14
14
os : ["macos-latest"]
15
- python-version : ["3.7.9 "]
15
+ python-version : ["3.x "]
16
16
17
17
steps :
18
18
# v2 breaks `git describe` so v1 is needed.
@@ -24,70 +24,38 @@ jobs:
24
24
- name : Print git describe
25
25
run : |
26
26
git describe
27
- - name : Set up Mac Python ${{ matrix.python-version }}
28
- # actions/setup-python can't be used as it builds less portable extensions.
29
- env :
30
- MB_PYTHON_VERSION : ${{ matrix.python-version }}
31
- run : |
32
- source .travis/install_python.sh
33
- install_python
34
- $PYTHON_EXE -m venv venv
35
- source venv/bin/activate
36
- echo "$PATH" >> $GITHUB_PATH
37
- - name : Print Python version
38
- run : |
39
- python -VV
27
+ - name : Set up Python ${{ matrix.python-version }}
28
+ uses : actions/setup-python@v2
29
+ with :
30
+ python-version : ${{ matrix.python-version }}
40
31
- name : Install Python dependencies
41
32
run : |
42
33
python -m pip install --upgrade pip
43
- pip install pytest pytest-cov pytest-benchmark wheel twine
44
- pip install git+https://github.com/HexDecimal/delocate.git@loader_path
34
+ pip install wheel twine
45
35
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
46
- - name : Build package.
47
- run : |
48
- python setup.py sdist develop bdist_wheel --py-limited-api=cp36
49
- - name : Test with pytest
50
- run : |
51
- pytest --no-window --cov-report=xml
52
- - uses : codecov/codecov-action@v1
53
- - name : Package binary files
36
+ - name : Prepare package.
37
+ # Downloads SDL2 for the later step.
54
38
run : |
55
- delocate-wheel -v dist/*.whl
56
- delocate-listdeps --all dist/*.whl
39
+ python setup.py check
40
+ - name : Build wheels
41
+
42
+ env :
43
+ CIBW_BUILD : cp38-* pp*
44
+ CIBW_ARCHS_MACOS : x86_64 arm64 universal2
45
+ CIBW_BEFORE_BUILD_MACOS : pip install --force-reinstall git+https://github.com/HexDecimal/delocate.git@loader_path
46
+ CIBW_BEFORE_TEST : pip install numpy
47
+ CIBW_TEST_COMMAND : python -c "import tcod"
48
+ CIBW_TEST_SKIP : " pp* *-macosx_arm64 *-macosx_universal2:arm64"
57
49
- name : Archive wheel
58
50
uses : actions/upload-artifact@v2
59
51
with :
60
52
name : wheel-macos
61
- path : dist /*.whl
53
+ path : wheelhouse /*.whl
62
54
retention-days : 1
63
55
- name : Upload to PyPI
64
56
if : github.event_name == 'release'
65
57
env :
66
58
TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
67
59
TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
68
60
run : |
69
- twine upload --skip-existing dist/*
70
-
71
- isolated_test :
72
- name : Verify wheel dependencies
73
- needs : build
74
- runs-on : ${{ matrix.os }}
75
- strategy :
76
- matrix :
77
- os : ["macos-latest"]
78
- python-version : ["3.x"]
79
- steps :
80
- - name : Set up Python ${{ matrix.python-version }}
81
- uses : actions/setup-python@v2
82
- with :
83
- python-version : ${{ matrix.python-version }}
84
- - uses : actions/download-artifact@v2
85
- with :
86
- name : wheel-macos
87
- path : dist
88
- - name : Install tcod from wheel
89
- run : |
90
- python -m pip install dist/*.whl
91
- - name : Verify dependency correctness
92
- run : |
93
- python -c "import tcod"
61
+ twine upload --skip-existing wheelhouse/*
0 commit comments