Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pypi release workflow #858

Merged
merged 23 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fc9831b
Initial pypi release workflow
ayushdg Oct 12, 2022
74508b1
Initial pypi release workflow
ayushdg Oct 12, 2022
278e231
Fix typo for python version strings
ayushdg Oct 12, 2022
0780d65
update concurrency groups
ayushdg Oct 12, 2022
9c1ec66
rename python version strings to allow cp3x package strings
ayushdg Oct 12, 2022
8b23f37
update toolchain, windows arcs and output dir typo
ayushdg Oct 12, 2022
a68490c
linux typo, remove manual python/conda setup
ayushdg Oct 12, 2022
1602aad
re-add checkout step
ayushdg Oct 12, 2022
ba46f81
remove conda list
ayushdg Oct 12, 2022
d6aa5bb
Add qemu step and expand manylinux archs
ayushdg Oct 12, 2022
f720618
Add more archs and macos builds
ayushdg Oct 12, 2022
905915d
Re-add setuptools-rust install
ayushdg Oct 12, 2022
9c4e074
switch to qemu v1
ayushdg Oct 12, 2022
957b579
Add aarch64 apple silicon target, cargo build for debugging
ayushdg Oct 12, 2022
b9b0c21
only build aarch64 on ubuntu, release build only
ayushdg Oct 12, 2022
3035576
Remove aarch64 linux builds for now
ayushdg Oct 12, 2022
5865f43
Test aarch64 linux again
ayushdg Oct 13, 2022
efe009e
move to checkout v3
ayushdg Oct 13, 2022
612ef94
Add cargo path to linux env
ayushdg Oct 13, 2022
7ddcc39
qemu for arm64 only, add source build
ayushdg Oct 13, 2022
6d02618
Merge branch 'main' into add-pypi-release-workflow
charlesbluca Oct 14, 2022
d97e3c2
Remove package building on PR's, remove commented conda env section, …
ayushdg Oct 18, 2022
f36a411
Merge branch 'add-pypi-release-workflow' of github.com:ayushdg/dask-s…
ayushdg Oct 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: style-${{ github.ref }}
group: docker-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Upload Python package
on:
release:
types: [created]

# for testing
concurrency:
group: release-${{ github.head_ref }}
cancel-in-progress: true

# Required shell entrypoint to have properly activated conda environments
defaults:
run:
shell: bash -l {0}

jobs:
build:
name: build py3.${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ["8", "9", "10"] # 3.x
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install setuptools setuptools-rust wheel twine
which python
pip list
- name: Set up QEMU for linux aarch64
if: contains(matrix.os, 'ubuntu')
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Add arm64 target for macos
if: contains(matrix.os, 'macos')
run: rustup target add aarch64-apple-darwin
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: 'cp3${{ matrix.python }}-*'
CIBW_SKIP: '*musllinux*'
CIBW_ARCHS_LINUX: 'aarch64 x86_64'
CIBW_ARCHS_WINDOWS: 'AMD64'
CIBW_ARCHS_MACOS: 'x86_64 arm64'
CIBW_ENVIRONMENT_LINUX: 'CARGO_NET_GIT_FETCH_WITH_CLI="true" PATH="$HOME/.cargo/bin:$PATH"'
# Without CARGO_NET_GIT_FETCH_WITH_CLI we oom (https://github.com/rust-lang/cargo/issues/10583)
CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"'
CIBW_BEFORE_BUILD: 'pip install -U setuptools-rust'
CIBW_BEFORE_BUILD_LINUX: >
pip install -U setuptools-rust &&
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y &&
rustup show
with:
package-dir: .
output-dir: dist
config-file: "dask_planner/pyproject.toml"
- name: Build source distribution
if: contains(matrix.os, 'ubuntu') && matrix.python == '8'
run: |
pip install -U setuptools-rust
python setup.py sdist
- name: list dist files
run: ls -lh dist/
- name: Upload binary wheels
uses: actions/upload-artifact@v3
with:
name: wheels for py3.${{ matrix.python }} on ${{ matrix.os }}
path: dist/*
- name: Publish package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/*
charlesbluca marked this conversation as resolved.
Show resolved Hide resolved