Ant Ray PyPi Release #33
Workflow file for this run
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
name: Ant Ray PyPi Release | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Enter branch name to build wheels from (default: main)' | |
required: false | |
type: string | |
default: '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/cibuildwheel@v2.22.0 | |
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 instal npm && npm ci && npm run build && popd | |
CIBW_BUILD: cp${{ matrix.python-version }}-manylinux_${{ matrix.arch }}* | |
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/cibuildwheel@v2.22.0 | |
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 instal npm && npm ci && npm run build && popd | |
CIBW_BUILD: cp${{ matrix.python-version }}-manylinux_${{ matrix.arch }}* | |
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/cibuildwheel@v2.22.0 | |
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_* | |
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_linux_wheels, build_linux_wheels_aarch64] | |
runs-on: ubuntu-latest | |
environment: pypi | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: cibw-* | |
path: python/dist | |
merge-multiple: true | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: python/dist | |
upload_test_pypi: | |
needs: [build_macos_wheels, 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: | |
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/ |