Skip to content

Commit

Permalink
Run workflow in parallel
Browse files Browse the repository at this point in the history
Signed-off-by: sule <[email protected]>
  • Loading branch information
xsuler committed Jan 24, 2025
1 parent 9394f9d commit ca8d3f6
Showing 1 changed file with 38 additions and 13 deletions.
51 changes: 38 additions & 13 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ant Ray PyPi Release (macos)
name: Ant Ray PyPi Release

on:
workflow_dispatch:
Expand All @@ -13,26 +13,51 @@ on:
- 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 npm && pip install "cython>=0.29.32" wheel && ./ci/env/install-bazel.sh && pushd python/ray/dashboard/client && npm -g instal [email protected] && 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 Linux wheels (${{ matrix.python-version }}, ${{ matrix.arch }})
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [39, 310, 311]
arch: [x86_64, aarch64]
arch: [x86_64]

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch || 'main' }}

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_BUILD_LINUX: 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 ci && npm run build && popd
CIBW_BUILD:|
cp${{ matrix.python-version }}-manylinux_${{ matrix.arch }}
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 [email protected] && npm ci && npm run build && popd
CIBW_BUILD: cp${{ matrix.python-version }}-manylinux_${{ matrix.arch }}*
with:
package-dir: ./python
output-dir: ./python/dist
Expand All @@ -42,6 +67,7 @@ jobs:
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 }}
Expand All @@ -59,8 +85,7 @@ jobs:
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_BUILD: cp${{ matrix.python-version }}-macosx_*
with:
package-dir: ./python
output-dir: ./python/dist
Expand All @@ -71,7 +96,7 @@ jobs:
path: ./python/dist/*.whl

upload_pypi:
needs: [build_macos_wheels, build_linux_wheels]
needs: [build_macos_wheels, build_linux_wheels, build_linux_wheels_aarch64]
runs-on: ubuntu-latest
environment: pypi
permissions:
Expand All @@ -88,7 +113,7 @@ jobs:
packages-dir: python/dist

upload_test_pypi:
needs: [build_macos_wheels, build_linux_wheels]
needs: [build_macos_wheels, build_linux_wheels, build_linux_wheels_aarch64]
runs-on: ubuntu-latest
environment: testpypi-publish
permissions:
Expand Down

0 comments on commit ca8d3f6

Please sign in to comment.