-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use GitHub Action to build nebula toolset automatically (#3)
* Use GitHub action to build nebula toolset automatically * Cleanup ossutil URL * Refactor * login firstly * Fix dockerfile * Test toolset emulator building * Fix this dir * Remove llvm 8.0.0 * Only use centos-7 and debian-8 * Fix debian Dockerfile * replace gcc 9.3.0 with 9.2.0 * Debug * Fix data directory exists * cancel in progress * cancel in workflow group * Fix buildx Dockerfile * Restore * cancel gcc 10.0.1 * Use self-hosted runners * split different jobs * Fix concurrency group * fix concurrency
- Loading branch information
Showing
19 changed files
with
250 additions
and
41 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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
gcc: | ||
name: gcc | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- centos-7 | ||
- debian-8 | ||
arch: | ||
- amd64 | ||
- arm64 | ||
version: | ||
# - 7.5.0 | ||
# - 8.3.0 | ||
# - 9.1.0 | ||
- 9.2.0 | ||
# - 9.3.0 | ||
# - 10.1.0 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- uses: docker/setup-qemu-action@v1 | ||
- uses: docker/setup-buildx-action@v1 | ||
- uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./docker/images/buildx/${{ matrix.os }}.Dockerfile | ||
platforms: linux/${{ matrix.arch }} | ||
tags: vesoft/toolset-build:${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.version }} | ||
push: false | ||
build-args: | | ||
BUILD_GCC_VERSIONS=${{ matrix.version }} | ||
secrets: | | ||
"ossutilconfig=${{ secrets.OSS_UTIL_CONFIG }}" | ||
llvm: | ||
name: llvm | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- centos-7 | ||
- debian-8 | ||
arch: | ||
- amd64 | ||
- arm64 | ||
version: | ||
# - 9.0.0 | ||
- 10.0.0 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- uses: docker/setup-qemu-action@v1 | ||
- uses: docker/setup-buildx-action@v1 | ||
- uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./docker/images/buildx/${{ matrix.os }}.Dockerfile | ||
platforms: linux/${{ matrix.arch }} | ||
tags: vesoft/toolset-build:${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.version }} | ||
push: false | ||
build-args: | | ||
BUILD_LLVM_VERSIONS=${{ matrix.version }} | ||
secrets: | | ||
"ossutilconfig=${{ secrets.OSS_UTIL_CONFIG }}" |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
name: | ||
|
||
jobs: | ||
build: | ||
name: Release | ||
|
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
FROM centos:7 | ||
|
||
ARG BUILD_LLVM_VERSIONS="" | ||
ARG BUILD_GCC_VERSIONS="" | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
RUN yum update -y | ||
RUN yum install -y make \ | ||
git \ | ||
m4 \ | ||
wget \ | ||
unzip \ | ||
bzip2 \ | ||
xz \ | ||
xz-devel \ | ||
patch \ | ||
python \ | ||
python-devel \ | ||
redhat-lsb-core \ | ||
zlib-devel \ | ||
gcc \ | ||
gcc-c++ \ | ||
libtool \ | ||
autoconf \ | ||
automake \ | ||
bison \ | ||
flex \ | ||
gperf \ | ||
gettext \ | ||
epel-release | ||
|
||
RUN yum install -y pxz || true | ||
|
||
ENV NG_URL=https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install | ||
ENV OSS_UTIL_URL=http://gosspublic.alicdn.com/ossutil/1.7.0 | ||
ENV PACKAGE_DIR=/usr/src | ||
RUN curl -s ${NG_URL} | bash | ||
|
||
RUN mkdir -p ${PACKAGE_DIR} | ||
WORKDIR ${PACKAGE_DIR} | ||
|
||
COPY . ${PACKAGE_DIR} | ||
|
||
RUN chmod +x ${PACKAGE_DIR}/docker/images/build-gcc.sh | ||
RUN chmod +x ${PACKAGE_DIR}/docker/images/build-llvm.sh | ||
RUN chmod +x ${PACKAGE_DIR}/docker/images/oss-upload.sh | ||
|
||
RUN [[ $(uname -m) = "aarch64" ]] && ARCH="arm"; wget -q -O /usr/bin/ossutil64 ${OSS_UTIL_URL}/ossutil${ARCH}64 | ||
RUN chmod +x /usr/bin/ossutil64 | ||
|
||
RUN --mount=type=secret,id=ossutilconfig,dst=/root/.ossutilconfig ${PACKAGE_DIR}/docker/images/run.sh |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM debian:8 | ||
|
||
ARG BUILD_LLVM_VERSIONS="" | ||
ARG BUILD_GCC_VERSIONS="" | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
RUN apt-get update | ||
RUN apt-get install -y make \ | ||
git \ | ||
m4 \ | ||
wget \ | ||
unzip \ | ||
curl \ | ||
xz-utils \ | ||
liblzma-dev \ | ||
python-dev \ | ||
patch \ | ||
lsb-core \ | ||
libz-dev \ | ||
build-essential \ | ||
libtool \ | ||
automake \ | ||
autoconf \ | ||
autoconf-archive \ | ||
autotools-dev \ | ||
bison \ | ||
flex \ | ||
gperf \ | ||
gettext --force-yes | ||
RUN apt-get install -y pxz | ||
|
||
ENV NG_URL=https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install | ||
ENV OSS_UTIL_URL=http://gosspublic.alicdn.com/ossutil/1.7.0 | ||
ENV PACKAGE_DIR=/usr/src | ||
RUN set -o pipefail && curl -s ${NG_URL} | bash | ||
|
||
RUN mkdir -p ${PACKAGE_DIR} | ||
WORKDIR ${PACKAGE_DIR} | ||
|
||
COPY . ${PACKAGE_DIR} | ||
|
||
RUN chmod +x ${PACKAGE_DIR}/docker/images/build-gcc.sh | ||
RUN chmod +x ${PACKAGE_DIR}/docker/images/build-llvm.sh | ||
RUN chmod +x ${PACKAGE_DIR}/docker/images/oss-upload.sh | ||
|
||
RUN [[ $(uname -m) = "aarch64" ]] && ARCH="arm"; wget -q -O /usr/bin/ossutil64 ${OSS_UTIL_URL}/ossutil${ARCH}64 | ||
RUN chmod +x /usr/bin/ossutil64 | ||
|
||
RUN --mount=type=secret,id=ossutilconfig,dst=/root/.ossutilconfig ${PACKAGE_DIR}/docker/images/run.sh |
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -e | ||
|
||
this_dir="$(cd "$(dirname "$0")" && pwd)" | ||
|
||
if [[ ! -z "${BUILD_GCC_VERSIONS}" ]]; then | ||
$this_dir/build-gcc.sh | ||
fi | ||
|
||
if [[ ! -z "${BUILD_LLVM_VERSIONS}" ]]; then | ||
$this_dir/build-llvm.sh | ||
fi |
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
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
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
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
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
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
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
Oops, something went wrong.