Upgrade build runner to macos-12 since the previous OS was not workin… #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://github.com/pypa/cibuildwheel. | |
name: Build | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macos-12] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout diff-match-patch-cpp-stl submodule | |
run: git submodule update --init | |
- uses: actions/setup-python@v2 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.16.1 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_TEST_COMMAND: "python -m unittest discover {project}/tests" | |
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" | |
CIBW_ARCHS_LINUX: "auto" | |
CIBW_ARCHS_WINDOWS: "auto" | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ./wheelhouse/*.whl | |
# Build the source distribution under Linux | |
build_sdist: | |
name: Source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout diff-match-patch-cpp-stl submodule | |
run: git submodule update --init | |
- uses: actions/setup-python@v2 | |
- name: Build source distribution | |
run: | | |
pip install setuptools twine | |
python setup.py sdist | |
# Check whether the source distribution will render correctly | |
twine check dist/*.tar.gz | |
- name: Test source distribution | |
run: | | |
pip install ./dist/*.tar.gz | |
python -c "from fast_diff_match_patch import diff" | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ./dist/*.tar.gz |