forked from alibaba/GraphScope
-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (95 loc) · 3.55 KB
/
build-graphscope-manylinux-ext-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Build GraphScope Manylinux-Ext Images
# build graphscope-dev-base image is based on manylinux2014, including all necessary
# dependencies except vineyard for graphscope's wheel package.
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- 'python/graphscope/gsctl/scripts/**'
concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
env:
REGISTRY: registry.cn-hongkong.aliyuncs.com
jobs:
build-manylinux-ext-image-x86-64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build Image
run: |
cd ${GITHUB_WORKSPACE}/k8s
# output: graphscope/manylinux:ext-x86_64
make manylinux2014-ext
- name: Release Image
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.REGISTRY }} --password-stdin
# x86_64
arch=$(uname -m)
# image tag
tag=ext-${arch}
# manylinux2014 image
sudo docker tag graphscope/manylinux2014:${tag} ${{ env.REGISTRY }}/graphscope/manylinux2014:ext
sudo docker push ${{ env.REGISTRY }}/graphscope/manylinux2014:ext
build-manylinux-ext-image-aarch64:
runs-on: [self-hosted, Linux, ARM64]
if: false
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build Image
run: |
cd ${GITHUB_WORKSPACE}/k8s
# output: graphscope/manylinux2014:ext-aarch64
make manylinux2014-ext
- name: Release Image
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.REGISTRY }} --password-stdin
# aarch64
arch=$(uname -m)
# image tag
tag=ext-${arch}
# manylinux2014 image
sudo docker tag graphscope/manylinux2014:${tag} ${{ env.REGISTRY }}/graphscope/manylinux2014:${tag}
sudo docker push ${{ env.REGISTRY }}/graphscope/manylinux2014:${tag}
- name: Clean Image
run: |
# aarch64
arch=$(uname -m)
# image tag
tag=ext-${arch}
# clean
sudo docker rmi -f graphscope/manylinux2014:${tag} || true
sudo docker rmi -f ${{ env.REGISTRY }}/graphscope/manylinux2014:${tag} || true
manifest_push_manylinux-ext-image:
runs-on: ubuntu-20.04
if: false
needs: [build-manylinux-ext-image-x86-64, build-manylinux-ext-image-aarch64]
steps:
- name: Create and Push Docker Manifest
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.REGISTRY }} --password-stdin
# create
sudo docker manifest create \
${{ env.REGISTRY }}/graphscope/manylinux2014:ext \
${{ env.REGISTRY }}/graphscope/manylinux2014:ext-x86_64 \
${{ env.REGISTRY }}/graphscope/manylinux2014:ext-aarch64
# push
sudo docker manifest push ${{ env.REGISTRY }}/graphscope/manylinux2014:ext