Skip to content

Commit

Permalink
Publish wheel packages on Linux arm64 platform nightly (#2732)
Browse files Browse the repository at this point in the history
## What do these changes do?

This file updates the GitHub workflow for building GraphScope wheels for
Linux. It adds support for ARM64 platforms and triggers the workflow on
main branch events.
  • Loading branch information
lidongze0629 authored May 24, 2023
1 parent 1e63e87 commit b03bc60
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/build-graphscope-wheels-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,77 @@ env:
REGISTRY: registry.cn-hongkong.aliyuncs.com

jobs:
build-wheels-for-arm64:
if: (github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope')
runs-on: [self-hosted, Linux, ARM64]

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Setup tmate session
if: false
uses: mxschmitt/action-tmate@v2

- name: Build Wheel Package
run: |
# change the version for nightly release
# 0.15.0 -> 0.15.0a20220808
time=$(date "+%Y%m%d")
version=$(cat ${GITHUB_WORKSPACE}/VERSION)
if [[ "${{ GITHUB.REF }}" == "refs/heads/main" ]]; then
echo "${version}a${time}" > ${GITHUB_WORKSPACE}/VERSION;
fi
cd ${GITHUB_WORKSPACE}/k8s/internal
# build graphscope wheels
sudo -E -u runner make graphscope-py3-package GRAPHSCOPE_HOME=/opt/graphscope INSTALL_PREFIX=/home/graphscope/graphscope-install
# build client wheels
sudo -E -u runner make graphscope-client-py3-package GRAPHSCOPE_HOME=/opt/graphscope
# package
cd ${GITHUB_WORKSPACE}
sudo chown $(id -u) -R .
tar -zcf client.tar.gz python/dist/wheelhouse/*.whl
tar -zcf graphscope.tar.gz coordinator/dist/
# move wheels into one floder to upload to PyPI
mkdir ${GITHUB_WORKSPACE}/upload_pypi
mv ${GITHUB_WORKSPACE}/python/dist/wheelhouse/*.whl ${GITHUB_WORKSPACE}/upload_pypi/
mv ${GITHUB_WORKSPACE}/coordinator/dist/wheelhouse/*.whl ${GITHUB_WORKSPACE}/upload_pypi/
# only wheel packages that platform aware need to be published.
# the wheel packages under the coordinator/dist directory are same to the amd64 platform
# mv ${GITHUB_WORKSPACE}/coordinator/dist/*.whl ${GITHUB_WORKSPACE}/upload_pypi/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: wheel-${{ github.sha }}
path: |
client.tar.gz
graphscope.tar.gz
retention-days: 5

# We do this, since failures on test.pypi aren't that bad
- name: Publish to Test PyPI
# the limit of graphscope package in test.pypi is still 100MB, which is not enough.
if: false
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository_url: https://test.pypi.org/legacy/
packages_dir: upload_pypi/

- name: Publish distribution to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: upload_pypi/

build-wheels:
if: (github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope')
runs-on: ubuntu-20.04
Expand Down

0 comments on commit b03bc60

Please sign in to comment.