-
Notifications
You must be signed in to change notification settings - Fork 448
173 lines (158 loc) · 7.14 KB
/
build-graphscope-dev-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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: Build GraphScope Dev Images
# build images for:
# 1) graphscope-dev: including all dependencies for graphscope development env.
# 2) vineyard-dev: including all vineyard-related dependencies that could compile graphscope analytical engine.
# 3) vineyard-runtime: including all vineyard-related running dependencies.
# 4) `graphscope-dev:wheel`: including all dependencies for building graphscope wheel package
on:
workflow_dispatch:
inputs:
v6d_version:
description: 'Version for Vineyard (v6d)'
required: true
default: 'main'
build_graphscope_dev:
description: 'Whether to build graphscope-dev image'
required: true
default: true
type: boolean
build_vineyard_dev:
description: 'Whether to build vineyard-dev(runtime) image'
required: true
default: true
type: boolean
build_graphscope_dev_wheel:
description: 'Whether to build graphscope-dev:wheel image'
required: true
default: true
type: boolean
pull_request:
branches:
- main
paths:
- 'python/graphscope/gsctl/scripts/**'
- '.github/workflows/build-graphscope-dev-images.yml'
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-graphscope-dev-wheel-image-amd64:
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.build_graphscope_dev_wheel == 'true') || (github.event_name == 'pull_request')
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build Image
run: |
# build wheel image with specified v6d's version
cd ${GITHUB_WORKSPACE}/k8s
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
if [[ -n ${VINEYARD_VERSION} ]]; then
# graphscope/graphscope-dev:wheel-<v6d_version>-amd64
make dev-wheel VINEYARD_VERSION=${VINEYARD_VERSION}
else
# pull_request: use default vineyard_version
make dev-wheel
fi
- 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
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
sudo docker tag graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-amd64 ${{ env.REGISTRY }}/graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-amd64
sudo docker push ${{ env.REGISTRY }}/graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-amd64
build-graphscope-dev-image-amd64:
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.build_graphscope_dev == 'true') || (github.event_name == 'pull_request')
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build Image
run: |
# build graphscope dev image with specified v6d version
cd ${GITHUB_WORKSPACE}/k8s
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
if [[ -n ${VINEYARD_VERSION} ]]; then
# graphscope/graphscope-dev:<v6d_version>-amd64
make graphscope-dev VINEYARD_VERSION=${VINEYARD_VERSION}
else
# pull_request: use default vineyard_version
make graphscope-dev
fi
- 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
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
sudo docker tag graphscope/graphscope-dev:${VINEYARD_VERSION}-amd64 ${{ env.REGISTRY }}/graphscope/graphscope-dev:${VINEYARD_VERSION}-amd64
sudo docker push ${{ env.REGISTRY }}/graphscope/graphscope-dev:${VINEYARD_VERSION}-amd64
build-vineyard-dev-image-amd64:
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.build_vineyard_dev == 'true') || (github.event_name == 'pull_request')
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build Image
run: |
# build vineyard dev image with specified v6d version
cd ${GITHUB_WORKSPACE}/k8s
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
if [[ -n ${VINEYARD_VERSION} ]]; then
# graphscope/vineyard-dev:<v6d_version>-amd64
make vineyard-dev VINEYARD_VERSION=${VINEYARD_VERSION}
else
# pull_request: use default vineyard_version
make vineyard-dev
fi
- 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
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
sudo docker tag graphscope/vineyard-dev:${VINEYARD_VERSION}-amd64 ${{ env.REGISTRY }}/graphscope/vineyard-dev:${VINEYARD_VERSION}-amd64
sudo docker push ${{ env.REGISTRY }}/graphscope/vineyard-dev:${VINEYARD_VERSION}-amd64
build-vineyard-runtime-image-amd64:
# only trigger this step in 'workflow_dispatch' event, since the 'vineyard-dev' image isn't actually pushed in 'pull_request'
if: ${{ github.event_name == 'workflow_dispatch' }} && ${{ github.event.inputs.build_vineyard_dev == 'true' }} || (github.event_name == 'pull_request')
runs-on: ubuntu-20.04
needs: [build-vineyard-dev-image-amd64]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build Image
run: |
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
# build vineyard runtime image with specified v6d version
cd ${GITHUB_WORKSPACE}/k8s
if [[ -n ${VINEYARD_VERSION} ]]; then
# graphscope/vineyard-runtime:<v6d_version>-amd64
make vineyard-runtime VINEYARD_VERSION=${VINEYARD_VERSION}
else
# pull_request: use default vineyard_version
make vineyard-runtime
fi
- 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
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
sudo docker tag graphscope/vineyard-runtime:${VINEYARD_VERSION}-amd64 ${{ env.REGISTRY }}/graphscope/vineyard-runtime:${VINEYARD_VERSION}-amd64
sudo docker push ${{ env.REGISTRY }}/graphscope/vineyard-runtime:${VINEYARD_VERSION}-amd64