-
-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
37 additions
and
24 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 |
---|---|---|
|
@@ -6,37 +6,50 @@ on: | |
- "*" | ||
|
||
jobs: | ||
pypi: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
platform: [windows-latest, macos-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.platform }} | ||
env: | ||
CIBW_BUILD: "cp37-* cp38-* cp39-*" | ||
CIBW_BEFORE_BUILD: "pip install cython" | ||
# os: [ubuntu-latest, windows-latest, macos-latest] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: "cp37-* cp38-* cp39-*" | ||
CIBW_BEFORE_BUILD: "pip install cython" | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
python-version: 3.8 | ||
path: ./wheelhouse/*.whl | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
pip install wheel | ||
pip install -e ".[compat,dev]" cibuildwheel twine | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Download datasets | ||
run: python -c "from river import datasets; datasets.CreditCard().download()" | ||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- name: pytest | ||
run: | | ||
pytest | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
- name: Build wheels | ||
run: | | ||
cibuildwheel --output-dir dist | ||
python setup.py sdist | ||
ls dist | ||
twine upload dist/* -u ${{ secrets.pypi_user }} -p ${{ secrets.pypi_password }} --skip-existing | ||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
user: ${{ secrets.pypi_user }} | ||
password: ${{ secrets.pypi_password }} |