Skip to content

Commit

Permalink
Support ARM platform (#58)
Browse files Browse the repository at this point in the history
* Use github action to build multiple platform docker images

* change third party library
  • Loading branch information
yixinglu committed Nov 1, 2021
1 parent 5340eae commit f874bbe
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 38 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: docker

on:
push:
branches:
- master

defaults:
run:
shell: bash

jobs:
docker:
name: docker
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- {"name": "centos7", "version": 7, "file": "centos"}
- {"name": "centos8", "version": 8, "file": "centos"}
- {"name": "ubuntu1604", "version": "xenial", "file": "ubuntu"}
- {"name": "ubuntu1804", "version": "bionic", "file": "ubuntu"}
- {"name": "ubuntu2004", "version": "focal", "file": "ubuntu"}
steps:
- uses: actions/checkout@v1
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile.${{ matrix.os.file }}
platforms: linux/amd64,linux/arm64
tags: vesoft/nebula-dev:${{ matrix.os.name }}
push: true
build-args: VERSION=${{ matrix.os.version }}
18 changes: 8 additions & 10 deletions Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN yum update -y && yum install -y epel-release \
wget \
xz \
zlib-devel \
# client
# client
libatomic \
&& yum clean all \
&& rm -rf /var/cache/yum
Expand Down Expand Up @@ -76,15 +76,13 @@ RUN wget -qO- https://github.com/git/git/archive/v2.25.0.tar.gz | tar zxf - -C .
&& make -j$(nproc) && make install \
&& cd ../ && rm -rf git-2.25.0

# Install nebula third-party 1.0
RUN git clone --depth 1 --branch v1-head --single-branch https://github.com/vesoft-inc/nebula.git \
&& ./nebula/third-party/install-third-party.sh \
&& rm -rf nebula

# Install nebula third-party 2.0
RUN git clone --depth 1 --branch master --single-branch https://github.com/vesoft-inc/nebula-third-party.git \
&& ./nebula-third-party/install-third-party.sh \
&& rm -rf nebula-third-party
# Install nebula third-party 1.0 and 2.0
RUN git clone https://github.com/vesoft-inc/nebula-third-party.git \
&& cd nebula-third-party \
&& ./install-third-party.sh \
&& git checkout v1.0 \
&& ./install-third-party.sh \
&& cd .. && rm -rf nebula-third-party

# Install ccache
RUN wget -qO- https://github.com/ccache/ccache/releases/download/v3.7.7/ccache-3.7.7.tar.gz | tar zxf - -C ./ \
Expand Down
16 changes: 7 additions & 9 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,13 @@ RUN wget -qO- https://github.com/git/git/archive/v2.25.0.tar.gz | tar zxf - -C .
&& make -j$(nproc) && make install \
&& cd ../ && rm -rf git-2.25.0

# Install nebula third-party 1.0
RUN git clone --branch v1-head --single-branch --depth 1 https://github.com/vesoft-inc/nebula.git \
&& ./nebula/third-party/install-third-party.sh \
&& rm -rf nebula

# Install nebula third-party 2.0
RUN git clone --depth 1 --branch master --single-branch https://github.com/vesoft-inc/nebula-third-party.git \
&& ./nebula-third-party/install-third-party.sh \
&& rm -rf nebula-third-party
# Install nebula third-party 1.0 and 2.0
RUN git clone https://github.com/vesoft-inc/nebula-third-party.git \
&& cd nebula-third-party \
&& ./install-third-party.sh \
&& git checkout v1.0 \
&& ./install-third-party.sh \
&& cd .. && rm -rf nebula-third-party

# Install ccache
RUN wget -qO- https://github.com/ccache/ccache/releases/download/v3.7.7/ccache-3.7.7.tar.gz | tar zxf - -C ./ \
Expand Down
19 changes: 0 additions & 19 deletions hooks/build

This file was deleted.

0 comments on commit f874bbe

Please sign in to comment.