-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish wheel packages on Linux arm64 platform nightly (#2732)
## 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
1 parent
1e63e87
commit b03bc60
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|