Skip to content

Commit

Permalink
Merge branch 'master' into fix/remove-debug-code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie-Xie authored Apr 11, 2022
2 parents b9d7603 + d949faf commit 64f35c9
Show file tree
Hide file tree
Showing 316 changed files with 2,754 additions and 4,154 deletions.
14 changes: 7 additions & 7 deletions .github/actions/tagname-action/action.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: 'Extract tag information'
description: 'Extract tag information'
name: "Extract tag information"
description: "Extract tag information"
outputs:
tag:
description: 'tag name'
description: "tag name"
value: ${{ steps.tag.outputs.tag }}
tagnum:
description: 'tag number'
description: "tag number"
value: ${{ steps.tag.outputs.tagnum }}
majorver:
description: 'major version'
description: "major version"
value: ${{ steps.tag.outputs.majorver }}
runs:
using: "composite"
steps:
- id: tag
run: |
tag=$(echo ${{ github.ref }} | rev | cut -d/ -f1 | rev)
tagnum=$(echo $tag | sed 's/^v//')
majorver=$(echo $tag | cut -d '.' -f 1)
tagnum=$(echo $tag | sed "s/^v//")
majorver=$(echo $tag | cut -d "." -f 1)
echo "::set-output name=tag::$tag"
echo "::set-output name=tagnum::$tagnum"
echo "::set-output name=majorver::$majorver"
Expand Down
33 changes: 16 additions & 17 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
find pkg-build/cpack_output -type f \( -iname \*.deb -o -iname \*.rpm -o -iname \*.tar.gz \) -exec bash -c "sha256sum {} > {}.sha256sum.txt" \;
subdir=$(date -u +%Y.%m.%d)
echo "::set-output name=subdir::$subdir"
- uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}-nightly
path: pkg-build/cpack_output
# - uses: actions/upload-artifact@v1
# with:
# name: ${{ matrix.os }}-nightly
# path: pkg-build/cpack_output
- uses: ./.github/actions/upload-to-oss-action
with:
key-id: ${{ secrets.OSS_ID }}
Expand All @@ -75,12 +75,12 @@ jobs:
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v2
- 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/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
with:
context: .
Expand All @@ -97,9 +97,9 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu2004
- centos7
compiler:
- gcc-9.2
- gcc-9.3
container:
image: vesoft/nebula-dev:${{ matrix.os }}
env:
Expand All @@ -114,26 +114,25 @@ jobs:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v2
- name: Prepare environment
id: prepare
run: |
[ -d build/ ] && rm -rf build/* || mkdir -p build
make init -C tests
- name: CMake
id: cmake
run: |
cmake \
-DCMAKE_CXX_COMPILER=$TOOLSET_CLANG_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_CLANG_DIR/bin/gcc \
-DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_TESTING=on \
-DENABLE_COVERAGE=on \
-GNinja \
-B build
echo "::set-output name=j::8"
- name: Make
run: |
ccache -z
cmake --build build/ -j $(nproc)
ninja -j $(nproc)
ccache -s
working-directory: build/
- name: CTest
env:
ASAN_OPTIONS: fast_unwind_on_malloc=1
Expand All @@ -147,12 +146,12 @@ jobs:
timeout-minutes: 2
- name: Pytest
run: |
make RM_DIR=false DEBUG=false J=${{ steps.cmake.outputs.j }} test
make RM_DIR=false DEBUG=false J=8 test
working-directory: tests/
timeout-minutes: 15
- name: TCK
run: |
make RM_DIR=false DEBUG=false J=${{ steps.cmake.outputs.j }} tck
make RM_DIR=false DEBUG=false J=8 tck
working-directory: tests/
timeout-minutes: 60
- name: Down cluster
Expand All @@ -162,7 +161,7 @@ jobs:
timeout-minutes: 2
- name: coverage
run: |
~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include --exclude=/opt/vesoft --exclude scanner.lex
~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include --exclude=/opt/vesoft --exclude scanner.lex
- uses: codecov/codecov-action@v2
with:
files: fastcov.info
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [synchronize, reopened, labeled]
branches:
- master
- 'v[0-9]+.*'
- 'release-**'

concurrency:
group: ${{ github.head_ref }}
Expand Down Expand Up @@ -183,11 +183,11 @@ jobs:
working-directory: tests/
timeout-minutes: 2
- name: coverage
if: ${{ matrix.compiler == 'gcc-9.2' && matrix.os == 'ubuntu2004' }}
if: ${{ matrix.compiler == 'gcc-9.3' && matrix.os == 'ubuntu2004' }}
run: |
~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include --exclude=/opt/vesoft --exclude scanner.lex
- uses: codecov/codecov-action@v2
if: ${{ matrix.compiler == 'gcc-9.2' && matrix.os == 'ubuntu2004' }}
if: ${{ matrix.compiler == 'gcc-9.3' && matrix.os == 'ubuntu2004' }}
with:
files: fastcov.info
fail_ci_if_error: false
Expand Down Expand Up @@ -227,7 +227,6 @@ jobs:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v2
- name: Prepare environment
id: prepare
run: |
[ -d build/ ] && rm -rf build/* || mkdir -p build
make init -C tests
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: rc

on:
push:
branches:
- 'v[0-9]+.*'
workflow_dispatch:
inputs:
version:
description: "version such as '3.1.0'"
required: true

concurrency:
group: rc
Expand Down Expand Up @@ -40,8 +42,8 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '^1.16.7'
- uses: ./.github/actions/tagname-action
id: tag
- id: tag
run: echo ::set-output name=tagnum::${{ github.event.inputs.version }}
- name: package
run: ./package/package.sh -v ${{ steps.tag.outputs.tagnum }} -t RelWithDebInfo -r OFF -p ON -s TRUE -k ON
- name: output some vars
Expand Down Expand Up @@ -81,8 +83,11 @@ jobs:
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v2
- uses: ./.github/actions/tagname-action
id: tagname
- id: tagname
run: |
echo ::set-output name=tag::"v${{ github.event.inputs.version }}"
echo ::set-output name=tagnum::"${{ github.event.inputs.version }}"
echo ::set-output name=majorver::"v$(echo ${{ github.event.inputs.version }} | cut -f1 -d'.')"
- id: docker
run: |
majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d".")
Expand Down Expand Up @@ -110,7 +115,7 @@ jobs:
push: true
build-args: |
BRANCH=${{ steps.tagname.outputs.tag }}
VERSON=${{ steps.tagname.outputs.tagnum }}
VERSION=${{ steps.tagname.outputs.tagnum }}
test:
name: test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
id: tagname
- id: docker
run: |
majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d'.')
majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d".")
tag=""
if [[ $majorver == ${{ steps.tagname.outputs.majorver }} ]]; then
tag="latest"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ modules/

# tests
!tests/Makefile
tests/secrets
reformat-gherkin
nebula-python

Expand Down
1 change: 0 additions & 1 deletion .linters/cpp/checkKeyword.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
'KW_ADD',
'KW_CREATE',
'KW_DROP',
'KW_CLEAR',
'KW_REMOVE',
'KW_IF',
'KW_NOT',
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/nebula)

include(BreakPadConfig)
include(PlatformCheck)
include(NebulaCMakeMacros)
include(GeneralCMakeOptions)
Expand Down
12 changes: 0 additions & 12 deletions cmake/nebula/BreakPadConfig.cmake

This file was deleted.

13 changes: 13 additions & 0 deletions cmake/nebula/ThirdPartyConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ else()
set(GETTIME_LIB)
endif()

# Breakpad
if (ENABLE_BREAKPAD)
if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND NOT ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
MESSAGE(FATAL_ERROR "Breakpad need debug info.")
endif()
endif()
if (NOT ${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "x86_64")
set(ENABLE_BREAKPAD OFF)
endif()
if (ENABLE_BREAKPAD)
add_compile_options(-DENABLE_BREAKPAD=1)
endif()

message("")

find_package(Bzip2 REQUIRED)
Expand Down
5 changes: 1 addition & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ ARG VERSION=
COPY . /home/nebula/BUILD

RUN cd /home/nebula/BUILD/package \
&& [[ -z "${VERSION}" ]] \
&& ./package.sh -n OFF -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON \
|| ./package.sh -n OFF -v ${VERSION} -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON

&& ./package.sh -n OFF -v "${VERSION}" -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON
FROM centos:7 as graphd

COPY --from=builder /home/nebula/BUILD/pkg-build/cpack_output/nebula-*-common.rpm /usr/local/nebula/nebula-common.rpm
Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile.graphd
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ ARG VERSION=
COPY . /home/nebula/BUILD

RUN cd /home/nebula/BUILD/package \
&& [[ -z "${VERSION}" ]] \
&& ./package.sh -n OFF -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON \
|| ./package.sh -n OFF -v ${VERSION} -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON
&& ./package.sh -n OFF -v "${VERSION}" -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON

FROM centos:7

Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile.metad
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ ARG VERSION=
COPY . /home/nebula/BUILD

RUN cd /home/nebula/BUILD/package \
&& [[ -z "${VERSION}" ]] \
&& ./package.sh -n OFF -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON \
|| ./package.sh -n OFF -v ${VERSION} -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON
&& ./package.sh -n OFF -v "${VERSION}" -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON

FROM centos:7

Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile.storaged
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ ARG VERSION=
COPY . /home/nebula/BUILD

RUN cd /home/nebula/BUILD/package \
&& [[ -z "${VERSION}" ]] \
&& ./package.sh -n OFF -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON \
|| ./package.sh -n OFF -v ${VERSION} -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON
&& ./package.sh -n OFF -v "${VERSION}" -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON

FROM centos:7

Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile.tools
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ ARG VERSION=
COPY . /home/nebula/BUILD

RUN cd /home/nebula/BUILD/package \
&& [[ -z "${VERSION}" ]] \
&& ./package.sh -n OFF -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON \
|| ./package.sh -n OFF -v ${VERSION} -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON
&& ./package.sh -n OFF -v "${VERSION}" -b ${BRANCH} -t RelWithDebInfo -s TRUE -c OFF -k ON

FROM centos:7

Expand Down
2 changes: 1 addition & 1 deletion package/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build_dir=${project_dir}/pkg-build
enablesanitizer="OFF"
static_sanitizer="OFF"
build_type="Release"
build_console="ON"
build_console="OFF"
branch=$(git rev-parse --abbrev-ref HEAD)
jobs=$(nproc)
enable_compressed_debug_info=ON
Expand Down
4 changes: 4 additions & 0 deletions scripts/nebula.service
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ function status_daemon {
port=${GREEN}${port}${NC}
else
port=${BLINK}${RED}${port}${NC}
if [[ $daemon_name == nebula-storaged ]]; then
WARN "${daemon_name} after v3.0.0 will not start service until it is added to cluster."
WARN "See Manage Storage hosts:${RED}ADD HOSTS${NC} in https://docs.nebula-graph.io/"
fi
fi
INFO "${daemon_name}(${daemon_version}): Running as $(cat ${pid_file}), Listening on ${port}"
else
Expand Down
Loading

0 comments on commit 64f35c9

Please sign in to comment.