-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7a84f0
commit c6a5590
Showing
1 changed file
with
66 additions
and
46 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 |
---|---|---|
@@ -1,53 +1,73 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
release: | ||
types: | ||
- published | ||
push: | ||
pull_request: | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
CIBW_ARCHS_MACOS: x86_64 arm64 | ||
CIBW_SKIP: cp36-* cp37-* pp* *i686 | ||
CIBW_ARCHS_MACOS: x86_64 arm64 | ||
CIBW_SKIP: cp36-* cp37-* pp* *i686 | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Build sdist | ||
run: pipx run build --sdist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
- uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pypa/[email protected] | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheelhouse | ||
path: ./wheelhouse/*.whl | ||
import_library: | ||
name: Import library on ${{ matrix.os }} with Python ${{ matrix.python }} | ||
runs-on: ${{ matrix.os }} | ||
needs: [build_wheels] | ||
strategy: | ||
matrix: | ||
python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheelhouse | ||
path: wheelhouse | ||
- run: python -m pip install --find-links wheelhouse event_stream | ||
- run: python -c 'import event_stream' | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: pipx run build --sdist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/*.tar.gz | ||
upload_pypi: | ||
name: Upload wheels and sidst to PyPI | ||
runs-on: ubuntu-latest | ||
needs: [build_wheels, import_library, build_sdist] | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheelhouse | ||
path: wheelhouse | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
- run: mv wheelhouse/* dist/ | ||
- uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |