forked from dask-contrib/dask-sql
-
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.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
156 changed files
with
4,248 additions
and
2,299 deletions.
There are no files selected for viewing
File renamed without changes.
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
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 |
---|---|---|
|
@@ -15,123 +15,159 @@ concurrency: | |
env: | ||
upload: ${{ github.event_name == 'release' && github.repository == 'dask-contrib/dask-sql' }} | ||
|
||
# Required shell entrypoint to have properly activated conda environments | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
wheels: | ||
name: Build and publish py3.${{ matrix.python }} wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
linux: | ||
name: Build and publish wheels for linux ${{ matrix.target }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python: ["8", "9", "10"] # 3.x | ||
target: [x86_64, aarch64] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Protoc | ||
if: matrix.os != 'ubuntu-latest' | ||
uses: arduino/setup-protoc@v1 | ||
if: matrix.target == 'aarch64' | ||
with: | ||
version: '3.x' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up QEMU for linux-aarch64 | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: docker/setup-qemu-action@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
platforms: arm64 | ||
- name: Add rust toolchain target for macos-aarch64 | ||
if: matrix.os == 'macos-latest' | ||
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' | ||
# Without CARGO_NET_GIT_FETCH_WITH_CLI we oom (https://github.com/rust-lang/cargo/issues/10583) | ||
CIBW_ENVIRONMENT_LINUX: > | ||
CARGO_NET_GIT_FETCH_WITH_CLI="true" | ||
PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH" | ||
CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"' | ||
CIBW_BEFORE_BUILD: 'pip install -U setuptools-rust' | ||
CIBW_BEFORE_BUILD_LINUX: > | ||
ARCH=$([ $(uname -m) == x86_64 ] && echo x86_64 || echo aarch_64) && | ||
DOWNLOAD_URL=$(curl --retry 6 --retry-delay 10 -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep -o '"browser_download_url": "[^"]*' | cut -d'"' -f4 | grep "\linux-${ARCH}.zip$") && | ||
python-version: '3.10' | ||
- name: Build wheels for x86_64 | ||
if: matrix.target == 'x86_64' | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist | ||
sccache: 'true' | ||
manylinux: '2_17' | ||
before-script-linux: > | ||
DOWNLOAD_URL=$(curl --retry 6 --retry-delay 10 -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep -o '"browser_download_url": "[^"]*' | cut -d'"' -f4 | grep "\linux-x86_64.zip$") && | ||
curl --retry 6 --retry-delay 10 -LO $DOWNLOAD_URL && | ||
unzip protoc-*-linux-$ARCH.zip -d $HOME/.local && | ||
protoc --version && | ||
pip install -U setuptools-rust && | ||
pip list && | ||
curl --retry 6 --retry-delay 10 https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y && | ||
rustup show | ||
unzip protoc-*-linux-x86_64.zip -d $HOME/.local | ||
docker-options: --env PROTOC=/root/.local/bin/protoc | ||
- name: Build wheels for aarch64 | ||
if: matrix.target == 'aarch64' | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist --zig | ||
sccache: 'true' | ||
manylinux: '2_17' | ||
- name: Check dist files | ||
run: | | ||
pip install twine | ||
twine check dist/* | ||
ls -lh dist/ | ||
- name: Upload binary wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
package-dir: . | ||
output-dir: dist | ||
config-file: "dask_planner/pyproject.toml" | ||
- name: Set up Python | ||
uses: conda-incubator/[email protected] | ||
name: wheels for linux ${{ matrix.target }} | ||
path: dist/* | ||
- name: Publish package | ||
if: env.upload == 'true' | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: twine upload dist/* | ||
|
||
windows: | ||
name: Build and publish wheels for windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
version: '3.x' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
architecture: x64 | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
miniforge-variant: Mambaforge | ||
use-mamba: true | ||
python-version: "3.8" | ||
channel-priority: strict | ||
# FIXME: aarch64 builds require glibc>=2.32 to prevent TLS allocation error when importing; | ||
# is there any way we could modify the TLS model of its shared object to avoid this? | ||
# https://bugzilla.redhat.com/show_bug.cgi?id=1722181 | ||
# xref: https://github.com/dask-contrib/dask-sql/issues/1169 | ||
- name: Update platform tag for aarch64 wheel | ||
if: matrix.os == 'ubuntu-latest' | ||
target: x64 | ||
args: --release --out dist | ||
sccache: 'true' | ||
- name: Check dist files | ||
run: | | ||
mamba install wheel | ||
pip install twine | ||
wheel tags --platform-tag=manylinux_2_32_aarch64 \ | ||
--remove \ | ||
dist/*_aarch64.whl | ||
twine check dist/* | ||
ls dist/ | ||
- name: Upload binary wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels for windows | ||
path: dist/* | ||
- name: Publish package | ||
if: env.upload == 'true' | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: twine upload dist/* | ||
|
||
macos: | ||
name: Build and publish wheels for macos ${{ matrix.target }} | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [x86_64, aarch64] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
version: '3.x' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist | ||
sccache: 'true' | ||
- name: Check dist files | ||
run: | | ||
mamba install twine | ||
pip install twine | ||
twine check dist/* | ||
ls -lh dist/ | ||
- name: Upload binary wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels for py3.${{ matrix.python }} on ${{ matrix.os }} | ||
name: wheels for macos ${{ matrix.target }} | ||
path: dist/* | ||
- name: Publish package | ||
if: env.upload == 'true' | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: twine upload dist/* | ||
|
||
sdist: | ||
name: Build and publish source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build sdist | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: conda-incubator/setup-[email protected] | ||
command: sdist | ||
args: --out dist | ||
- uses: actions/setup-python@v4 | ||
with: | ||
miniforge-variant: Mambaforge | ||
use-mamba: true | ||
python-version: "3.8" | ||
channel-priority: strict | ||
- name: Build source distribution | ||
run: | | ||
mamba install setuptools-rust twine | ||
python setup.py sdist | ||
python-version: '3.10' | ||
- name: Check dist files | ||
run: | | ||
pip install twine | ||
twine check dist/* | ||
ls -lh dist/ | ||
- name: Publish source distribution | ||
|
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
Oops, something went wrong.