-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from brianhelba/multi-platform
Build wheels for macOS
- Loading branch information
Showing
4 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,28 +4,63 @@ on: | |
types: [published] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: ["3.6", "3.7", "3.8", "3.9"] | ||
# Linux builds don't need to run across different Python versions, | ||
# they will all be installed under the manylinux action | ||
exclude: | ||
- os: ubuntu-latest | ||
python-version: "3.6" | ||
- os: ubuntu-latest | ||
python-version: "3.7" | ||
- os: ubuntu-latest | ||
python-version: "3.8" | ||
- os: ubuntu-latest | ||
python-version: "3.9" | ||
# Use the latest Python version as a base for Linux builds | ||
include: | ||
- os: ubuntu-latest | ||
python-version: "3.x" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
submodules: true | ||
# Tags are needed to compute the current version number | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install tox and pypa-build | ||
run: | | ||
pip install --upgrade pip | ||
pip install tox build | ||
- name: Build sdist | ||
# Do this before the manylinux build, so the output directory doesn't get created by Docker | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: | | ||
pyproject-build --sdist | ||
- name: Build manylinux wheels | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
uses: RalfG/[email protected]_x86_64 | ||
with: | ||
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39' | ||
# Necessary for setuptools_scm to read the version from Git | ||
system-packages: 'git-lfs' | ||
- name: Install tox | ||
- name: Remove non-manylinux wheels | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
# Those are built as intermediate artifacts, but should not be published | ||
# Since these are built by Docker, they must be removed with sudo | ||
run: | | ||
pip install --upgrade pip | ||
pip install tox | ||
sudo rm -f dist/*-linux*.whl | ||
- name: Build non-Linux wheels | ||
if: ${{ matrix.os != 'ubuntu-latest' }} | ||
run: | | ||
pyproject-build --wheel | ||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: "__token__" | ||
|
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
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
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