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