Skip to content
Snippets Groups Projects
Unverified Commit da25d510 authored by Yee's avatar Yee Committed by GitHub
Browse files

Add docker workflow and fix required checks skipped error (#220)

parent 9d10f78c
No related branches found
No related tags found
No related merge requests found
*.md
LICENSES/
docs/
modules/
*.swp
*.so
*.DS_Store
# build
build/
_build/
_build.log
_install/
install_manifest.txt
# ccls
.ccls
.ccls-cache
compile_commands.json
.ccache
src/common/base/Base.h.gch
gen-*
CPackConfig.cmake
CPackSourceConfig.cmake
CMakeCache.txt
Makefile
cmake_install.cmake
CTestTestfile.cmake
CMakeFiles/
Testing/
target/
cluster.id
pids/
name: docker
on:
schedule:
- cron: '0 18 * * *'
jobs:
docker:
name: build docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: vesoft/nebula-graphd
tags: v2-preview-nightly
cache_froms: vesoft/nebula-dev:centos7
add_git_labels: true
......@@ -16,8 +16,6 @@ jobs:
name: lint
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready-for-testing') }}
runs-on: ubuntu-latest
outputs:
has_source_files: ${{ steps.filter-source-files.outputs.has_source_files }}
steps:
- uses: actions/checkout@v2
with:
......@@ -38,16 +36,10 @@ jobs:
PYTHON_PYLINT_CONFIG_FILE: ${{ github.workspace }}/tests/.pylintrc
VALIDATE_PYTHON_FLAKE8: false
GITHUB_TOKEN: ${{ github.token }}
- name: Filter source files
id: filter-source-files
run: |
source_files=$(echo ${{ steps.diff.outputs.all }} | sed 's/ /\n/g' | grep '^src\|^tests\|^CMakeLists.txt\|^cmake\|^.github/workflows' || true)
echo "::set-output name=has_source_files::$([[ "$source_files" == "" ]] && echo 0 || echo 1)"
build:
name: build
needs: lint
if: ${{ needs.lint.outputs.has_source_files != 0 }}
runs-on: self-hosted
strategy:
fail-fast: false
......@@ -67,7 +59,6 @@ jobs:
TOOLSET_DIR: /opt/vesoft/toolset/clang/9.0.0
CCACHE_DIR: /tmp/ccache/nebula-graph/${{ matrix.os }}-${{ matrix.compiler }}
CCACHE_MAXSIZE: 1G
PYPI_MIRROR: https://mirrors.aliyun.com/pypi/simple/
volumes:
- /tmp/ccache/nebula-graph/${{ matrix.os }}-${{ matrix.compiler }}:/tmp/ccache/nebula-graph/${{ matrix.os }}-${{ matrix.compiler }}
options: --mount type=tmpfs,destination=/tmp/ccache/nebula-graph,tmpfs-size=1073741824 --cap-add=SYS_PTRACE
......@@ -77,6 +68,8 @@ jobs:
fetch-depth: 1
- name: Prepare environment
id: prepare
env:
PYPI_MIRROR: https://mirrors.aliyun.com/pypi/simple/
run: |
[ -d build/ ] && rm -rf build/* || mkdir -p build
pip3 install -U setuptools -i $PYPI_MIRROR
......
FROM vesoft/nebula-dev:centos7 as builder
COPY . /home/nebula/BUILD
RUN cd /home/nebula/BUILD/package \
&& ./package.sh -v $(git rev-parse --short HEAD) -n OFF
FROM centos:7
COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-graph.rpm /usr/local/nebula/nebula-graphd.rpm
WORKDIR /usr/local/nebula
RUN rpm -ivh *.rpm \
&& mkdir -p ./{logs,data,pids} \
&& rm -rf *.rpm
EXPOSE 3699 13000 13002
ENTRYPOINT ["./bin/nebula-graphd", "--flagfile=./etc/nebula-graphd.conf", "--daemonize=false"]
......@@ -4,14 +4,8 @@
<br>A distributed, scalable, lightning-fast graph database<br>
</p>
<p align="center">
<a href="https://github.com/vesoft-inc/nebula/actions?workflow=build">
<img src="https://github.com/vesoft-inc/nebula/workflows/build/badge.svg" alt="build and test workflow"/>
</a>
<a href="https://github.com/vesoft-inc/nebula/actions?workflow=docker">
<img src="https://github.com/vesoft-inc/nebula/workflows/docker/badge.svg" alt="build docker image workflow"/>
</a>
<a href="https://github.com/vesoft-inc/nebula/actions?workflow=package">
<img src="https://github.com/vesoft-inc/nebula/workflows/package/badge.svg" alt="make nebula packages workflow"/>
<a href="https://github.com/vesoft-inc/nebula-graph/actions?workflow=docker">
<img src="https://github.com/vesoft-inc/nebula-graph/workflows/docker/badge.svg" alt="build docker image workflow"/>
</a>
<a href="http://githubbadges.com/star.svg?user=vesoft-inc&repo=nebula&style=default">
<img src="http://githubbadges.com/star.svg?user=vesoft-inc&repo=nebula&style=default" alt="nebula star"/>
......
......@@ -9,13 +9,14 @@
#
# usage: ./package.sh -v <version> -n <ON/OFF> -s <TRUE/FALSE>
#
set -ex
set -e
version=""
package_one=ON
strip_enable="FALSE"
usage="Usage: ${0} -v <version> -n <ON/OFF> -s <TRUE/FALSE>"
project_dir="$(cd "$(dirname "$0")" && pwd)"/../
project_dir="$(cd "$(dirname "$0")" && pwd)/.."
build_dir=${project_dir}/build
enablesanitizer="OFF"
static_sanitizer="OFF"
......@@ -164,4 +165,3 @@ function package {
# The main
build $version $enablesanitizer $static_sanitizer $build_type
package $strip_enable
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment