Skip to content

Ant Ray PyPi Nightly #105

Ant Ray PyPi Nightly

Ant Ray PyPi Nightly #105

Workflow file for this run

name: Ant Ray PyPi Nightly
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
branch:
description: 'Enter branch name to build wheels from (default: main)'
required: false
type: string
default: 'main'
# pull_request:
# push:
# branches:
# - main
release:
types:
- published
jobs:
build_linux_wheels_aarch64:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04-arm]
python-version: [39, 310, 311]
arch: [aarch64]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_BUILD_LINUX: yum install -y epel-release && yum -y update && yum -y install curl && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash && export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install 16.20.2 && nvm use 16.20.2 && pip install "cython>=0.29.32" wheel && ./ci/env/install-bazel.sh && pushd python/ray/dashboard/client && npm ci && npm run build && popd
CIBW_BUILD: cp${{ matrix.python-version }}-manylinux_${{ matrix.arch }}*
CIBW_ENVIRONMENT: RAY_DEBUG_BUILD=nightly
with:
package-dir: ./python
output-dir: ./python/dist
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./python/dist/*.whl
build_linux_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [39, 310, 311]
arch: [x86_64]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_BUILD_LINUX: yum install -y epel-release && yum -y update && yum -y install npm && pip install "cython>=0.29.32" wheel && ./ci/env/install-bazel.sh && pushd python/ray/dashboard/client && npm -g install [email protected] && npm ci && npm run build && popd
CIBW_BUILD: cp${{ matrix.python-version }}-manylinux_${{ matrix.arch }}*
CIBW_ENVIRONMENT: RAY_DEBUG_BUILD=nightly
with:
package-dir: ./python
output-dir: ./python/dist
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./python/dist/*.whl
build_macos_wheels13:
name: Build macOS wheels (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13]
python-version: [39, 310, 311]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch || 'main' }}
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_BUILD: brew install node && pip install "cython>=0.29.32" wheel && sudo ./ci/env/install-bazel.sh && python -m ensurepip --upgrade && sudo chmod a+x /Users/runner/bin/bazel && sudo chown -R runner /Users/runner/Library/Caches/bazelisk && pushd python/ray/dashboard/client && npm ci && npm run build && popd
CIBW_BUILD: cp${{ matrix.python-version }}-macosx_*
MACOSX_DEPLOYMENT_TARGET: 14.2
CIBW_ENVIRONMENT: RAY_DEBUG_BUILD=nightly
with:
package-dir: ./python
output-dir: ./python/dist
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./python/dist/*.whl
build_macos_wheels:
name: Build macOS wheels (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14]
python-version: [39, 310, 311]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch || 'main' }}
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_BUILD: brew install node && pip install "cython>=0.29.32" wheel && sudo ./ci/env/install-bazel.sh && python -m ensurepip --upgrade && sudo chmod a+x /Users/runner/bin/bazel && sudo chown -R runner /Users/runner/Library/Caches/bazelisk && pushd python/ray/dashboard/client && npm ci && npm run build && popd
CIBW_BUILD: cp${{ matrix.python-version }}-macosx_*
CIBW_ENVIRONMENT: RAY_DEBUG_BUILD=nightly
with:
package-dir: ./python
output-dir: ./python/dist
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./python/dist/*.whl
upload_pypi:
needs: [build_macos_wheels, build_macos_wheels13, build_linux_wheels, build_linux_wheels_aarch64]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
# if: github.event_name == 'release' && github.event.action == 'published'
# # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: python/dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: python/dist
skip-existing: true
upload_test_pypi:
needs: [build_macos_wheels, build_macos_wheels13, build_linux_wheels, build_linux_wheels_aarch64]
runs-on: ubuntu-latest
environment: testpypi-publish
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: python/dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: python/dist
repository-url: https://test.pypi.org/legacy/
skip-existing: true