diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 1826788f9a197..4b45b18db0193 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -1,4 +1,4 @@ -name: Ant Ray PyPi Release (macos) +name: Ant Ray PyPi Release on: workflow_dispatch: @@ -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/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@8.19.4 && 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/cibuildwheel@v2.22.0 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 npm@8.19.4 && npm ci && npm run build && popd + CIBW_BUILD: cp${{ matrix.python-version }}-manylinux_${{ matrix.arch }}* with: package-dir: ./python output-dir: ./python/dist @@ -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 }} @@ -59,8 +85,7 @@ jobs: 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_* + CIBW_BUILD: cp${{ matrix.python-version }}-macosx_* with: package-dir: ./python output-dir: ./python/dist @@ -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: @@ -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: