Skip to content

Commit 6f79f20

Browse files
authored
ci: Add interactive arm64 image nightly building (#4455)
Add image building for Interactive on arm platform.
1 parent 9c11778 commit 6f79f20

File tree

2 files changed

+65
-4
lines changed

2 files changed

+65
-4
lines changed

.github/workflows/release.yml

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,16 @@ jobs:
7373
steps:
7474
- uses: actions/checkout@v4
7575

76+
- name: Add envs to GITHUB_ENV
77+
run: |
78+
short_sha=$(git rev-parse --short HEAD)
79+
echo "SHORT_SHA=${short_sha}" >> $GITHUB_ENV
80+
7681
- name: Build Interactive Image
7782
run: |
7883
cd ${GITHUB_WORKSPACE}
7984
python3 -m pip install --upgrade pip && python3 -m pip install click
80-
python3 ./gsctl.py flexbuild interactive --app docker
85+
python3 ./gsctl.py flexbuild interactive --app docker --version ${SHORT_SHA}
8186
8287
- name: Release Nightly Image
8388
if: ${{ github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope' }}
@@ -86,7 +91,10 @@ jobs:
8691
docker_username: ${{ secrets.DOCKER_USER }}
8792
run: |
8893
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
89-
sudo docker tag graphscope/interactive:latest ${{ env.INTERACTIVE_IMAGE }}:latest-amd64
94+
sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:${SHORT_SHA}-amd64
95+
sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${SHORT_SHA}-amd64
96+
97+
sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:latest-amd64
9098
sudo docker push ${{ env.INTERACTIVE_IMAGE }}:latest-amd64
9199
92100
- name: Extract Tag Name
@@ -101,9 +109,55 @@ jobs:
101109
docker_username: ${{ secrets.DOCKER_USER }}
102110
run: |
103111
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
104-
sudo docker tag graphscope/interactive:latest ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-amd64
112+
sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-amd64
105113
sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-amd64
106114
115+
build-interactive-image-arm64:
116+
if: (github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope')
117+
runs-on: ubuntu-22.04-arm
118+
119+
steps:
120+
- uses: actions/checkout@v4
121+
122+
- name: Add envs to GITHUB_ENV
123+
run: |
124+
short_sha=$(git rev-parse --short HEAD)
125+
echo "SHORT_SHA=${short_sha}" >> $GITHUB_ENV
126+
127+
- name: Build Interactive Image
128+
run: |
129+
cd ${GITHUB_WORKSPACE}
130+
python3 -m pip install --upgrade pip && python3 -m pip install click
131+
python3 ./gsctl.py flexbuild interactive --app docker --version ${SHORT_SHA}
132+
133+
- name: Release Nightly Image
134+
if: ${{ github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope' }}
135+
env:
136+
docker_password: ${{ secrets.DOCKER_PASSWORD }}
137+
docker_username: ${{ secrets.DOCKER_USER }}
138+
run: |
139+
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
140+
sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:${SHORT_SHA}-arm64
141+
sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${SHORT_SHA}-arm64
142+
143+
sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:latest-arm64
144+
sudo docker push ${{ env.INTERACTIVE_IMAGE }}:latest-arm64
145+
146+
- name: Extract Tag Name
147+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope' }}
148+
id: tag
149+
run: echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
150+
151+
- name: Release Image
152+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope' }}
153+
env:
154+
docker_password: ${{ secrets.DOCKER_PASSWORD }}
155+
docker_username: ${{ secrets.DOCKER_USER }}
156+
run: |
157+
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
158+
sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-arm64
159+
sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-arm64
160+
107161
build-gss-image-amd64:
108162
if: (github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope')
109163
runs-on: ubuntu-20.04

python/graphscope/gsctl/commands/dev.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ def insight(app, graphscope_repo):
131131
required=False,
132132
help="GraphScope code repo location.",
133133
)
134-
def interactive(app, graphscope_repo):
134+
@click.option(
135+
"--version",
136+
required=False,
137+
help="The version of the built image",
138+
)
139+
def interactive(app, graphscope_repo, version):
135140
"""Build Interactive for high throughput scenarios"""
136141
if graphscope_repo is None:
137142
graphscope_repo = default_graphscope_repo_path
@@ -145,6 +150,8 @@ def interactive(app, graphscope_repo):
145150
)
146151
return
147152
cmd = ["make", "flex-interactive", "ENABLE_COORDINATOR=true"]
153+
if version is not None:
154+
cmd.extend(["VERSION=" + version])
148155
sys.exit(run_shell_cmd(cmd, os.path.join(graphscope_repo, interactive_build_dir)))
149156

150157

0 commit comments

Comments
 (0)