Skip to content

Commit

Permalink
Build binary distributions for supported platforms (#14)
Browse files Browse the repository at this point in the history
* New versions

* Build also on branches
  • Loading branch information
rickardp committed Oct 5, 2022
1 parent ef9d3ae commit 96b83fb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,49 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy2, pypy3]
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy2.7", "pypy3.10"]
exclude:
- os: macos-latest
python-version: 3.5
python-version: "3.5"
- os: windows-latest
python-version: 3.5
python-version: "3.5"
- os: macos-latest
python-version: 3.6
python-version: "3.6"
- os: windows-latest
python-version: 3.6
python-version: "3.6"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install --upgrade pip && pip install wheel
- name: Test
run: |
python setup.py test
- name: Build
run: |
python setup.py bdist_wheel
- name: Save build artifact
uses: actions/upload-artifact@v3
with:
name: artifact-${{ matrix.python-version }}-${{ matrix.os }}
path: dist/splitstream-*.whl
retention-days: 7
publish:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Build dist
run: |
python setup.py sdist
- name: Publish to PyPi
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi }}
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Intended Audience :: Developers"]
Expand Down

0 comments on commit 96b83fb

Please sign in to comment.