Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
- ubuntu2004
compiler:
- gcc-9.3
include:
- language: c-cpp
build-mode: "manual"
language: c-cpp
configuration: [debug]
build-mode: "manual"
env:
CCACHE_DIR: /tmp/ccache/nebula/${{ matrix.os }}-${{ matrix.compiler }}
CCACHE_MAXSIZE: 8G
Expand All @@ -60,7 +60,12 @@ jobs:
- uses: webiny/action-post-run@3.0.0
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- uses: lukka/get-cmake@latest

- name: Prepare environment
id: prepare
run: |
Expand All @@ -80,23 +85,17 @@ jobs:
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

- name: CMake
id: cmake
run: |
cmake \
-DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \
-DNEBULA_USE_LINKER=gold \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_TESTING=on \
-GNinja \
-B build
- name: Make
run: |
ccache -z
ninja -j $(nproc)
ccache -s
working-directory: build/
- name: Restore from cache and setup vcpkg executable and data files.
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'

- name: Run CMake+vcpkg+Ninja+CTest to build packages and generate/build/test the code.
uses: lukka/run-cmake@v10
with:
configurePreset: 'ninja-multi-vcpkg-${{ matrix.compiler }}'
buildPreset: '${{ matrix.compiler }}-${{ matrix.configuration }}'
testPreset: 'test-${{ matrix.compiler }}-${{ matrix.configuration }}'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
104 changes: 50 additions & 54 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
with:
go-version: "^1.16.7"
Expand Down Expand Up @@ -70,6 +72,8 @@ jobs:
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v4
with:
submodules: true
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down Expand Up @@ -130,6 +134,7 @@ jobs:
- centos7
compiler:
- gcc-9.3
configuration: [debug]
container:
image: vesoft/nebula-dev:${{ matrix.os }}
env:
Expand All @@ -143,32 +148,33 @@ jobs:
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v4
with:
submodules: true

- uses: lukka/get-cmake@latest

- name: Prepare environment
run: |
[ -d build/ ] && rm -rf build/* || mkdir -p build
[ -d build/ ] && rm -rf build/* || mkdir -p build/
make init -C tests
- name: CMake
run: |
cmake \
-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
- name: Make
run: |
ccache -z
ninja -j $(($(nproc)/2+1))
- name: Restore from cache and setup vcpkg executable and data files.
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'

- name: Run CMake+vcpkg+Ninja+CTest to build packages and generate/build/test the code.
uses: lukka/run-cmake@v10
with:
configurePreset: "ninja-multi-vcpkg-${{ matrix.compiler }}"
configurePresetAdditionalArgs: "[`-DENABLE_COVERAGE=on`]"
buildPreset: "${{ matrix.compiler }}-${{ matrix.configuration }}"
testPreset: "test-${{ matrix.compiler }}-${{ matrix.configuration }}"
testPresetAdditionalArgs: "[`--timeout 400 `,`--output-on-failure`]"
timeout-minutes: 120
- name: ccache stats
run: |
ccache -s
working-directory: build/
- name: CTest
env:
ASAN_OPTIONS: fast_unwind_on_malloc=1
run: ctest -j $(($(nproc)/2+1)) --timeout 400 --output-on-failure
working-directory: build/
timeout-minutes: 20
- name: Setup cluster
run: |
make CONTAINERIZED=true ENABLE_SSL=true CA_SIGNED=true up
Expand Down Expand Up @@ -239,6 +245,8 @@ jobs:
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v4
with:
submodules: true
- name: output some vars
id: vars
env:
Expand Down Expand Up @@ -320,6 +328,7 @@ jobs:
- centos7
compiler:
- gcc-9.3
configuration: [Release]
env:
CCACHE_DIR: /tmp/ccache/nebula/${{ matrix.os }}-${{ matrix.compiler }}
CCACHE_MAXSIZE: 8G
Expand All @@ -333,46 +342,33 @@ jobs:
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v4
with:
submodules: true
- name: Prepare environment
id: prepare
run: |
[ -d build/ ] && rm -rf build/* || mkdir -p build
make init -C tests
- name: CMake
id: cmake
run: |
case ${{ matrix.compiler }} in
gcc-*)
case ${{ matrix.os }} in
centos7)
# build with Release type
cmake \
-DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_TESTING=on \
-DENABLE_STANDALONE_VERSION=on \
-GNinja \
-B build
echo "::set-output name=j::8"
;;
esac
;;
esac
- name: Make
run: |
ccache -z
ninja -j $(nproc)
ccache -s
working-directory: build/
- name: CTest
env:
ASAN_OPTIONS: fast_unwind_on_malloc=1
- name: Restore from cache and setup vcpkg executable and data files.
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'
- name: Run CMake+vcpkg+Ninja+CTest to build packages and generate/build/test the code.
uses: lukka/run-cmake@v10
with:
configurePreset: 'ninja-multi-vcpkg-${{ matrix.compiler }}'
configurePresetAdditionalArgs: "[`-DENABLE_STANDALONE_VERSION=on`]"
buildPreset: '${{ matrix.compiler }}-${{ matrix.configuration }}'
testPreset: 'test-${{ matrix.compiler }}-${{ matrix.configuration }}'
testPresetAdditionalArgs: "[`--timeout 400`,`--output-on-failure`,`-LE segment_id_test`]"
testPreset: 'test-${{ matrix.compiler }}-${{ matrix.configuration }}'
testPresetAdditionalArgs: "[`--timeout 400`,`--output-on-failure`,`-L segment_id_test`]"

timeout-minutes: 120
- name: ccache stats
run: |
ctest -j $(($(nproc)/2+1)) --timeout 400 --output-on-failure -LE segment_id_test
ctest -j $(($(nproc)/2+1)) --timeout 400 --output-on-failure -L segment_id_test
working-directory: build/
timeout-minutes: 20
ccache -s
- name: Setup Cluster
run: |
make standalone-up
Expand Down
111 changes: 31 additions & 80 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}
submodules: true
- uses: actions/checkout@v4
with:
clean: false
submodules: true
- name: Check License Header
uses: apache/skywalking-eyes/header@main
- name: Ensure clang-format-10 is available
Expand Down Expand Up @@ -90,91 +92,40 @@ jobs:
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v4
with:
submodules: true

- uses: lukka/get-cmake@latest

- name: Prepare environment
id: prepare
run: |
[ -d build/ ] && rm -rf build/* || mkdir -p build
[ d build/ ] && rm -rf build/* || mkdir -p build
make init -C tests
- name: CMake
id: cmake
run: |
case ${{ matrix.compiler }} in
gcc-*)
case ${{ matrix.os }} in
centos7)
# build with Release type
cmake \
-DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \
-DNEBULA_USE_LINKER=mold \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_TESTING=on \
-GNinja \
-B build
;;
ubuntu2004)
# build with Debug type
cmake \
-DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \
-DNEBULA_USE_LINKER=mold \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_TESTING=on \
-DENABLE_COVERAGE=on \
-GNinja \
-B build
;;
esac
;;
clang-*)
# build with Sanitizer
cmake \
-DCMAKE_CXX_COMPILER=$TOOLSET_CLANG_DIR/bin/clang++ \
-DCMAKE_C_COMPILER=$TOOLSET_CLANG_DIR/bin/clang \
-DNEBULA_USE_LINKER=mold \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_MEMORY_TRACKER=off \
-DENABLE_ASAN=on \
-DENABLE_TESTING=on \
-GNinja \
-B build
;;
esac
- name: Make
run: |
case ${{ matrix.compiler }} in
gcc-*)
case ${{ matrix.os }} in
centos7)
# build with Release type
ccache -z
ninja -j $(nproc)
ccache -s
;;
ubuntu2004)
# build with Debug type
ccache -z
ninja -j $(nproc)
ccache -s
;;
esac
;;
clang-*)
# build with Sanitizer
ccache -z
ninja -j $(nproc)
ccache -s
;;
esac
working-directory: build/
- name: CTest
env:
ASAN_OPTIONS: fast_unwind_on_malloc=1
if [[ "${{ matrix.configuration }}" == "debug" ]]; then
echo "COVERAGE_ARGS=-DENABLE_COVERAGE=ON" >> $GITHUB_ENV
else
echo "COVERAGE_ARGS=-DENABLE_COVERAGE=OFF" >> $GITHUB_ENV
fi
- name: Restore from cache and setup vcpkg executable and data files.
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'

- name: Run CMake+vcpkg+Ninja+CTest to build packages and generate/build/test the code.
uses: lukka/run-cmake@v10
with:
configurePreset: "ninja-multi-vcpkg-${{ matrix.compiler }}"
configurePresetAdditionalArgs: "[`-DNEBULA_USE_LINKER=mold`, `${{env.COVERAGE_ARGS}}` ]"
buildPreset: "${{ matrix.compiler }}-${{ matrix.configuration }}"
testPreset: "test-${{ matrix.compiler }}-${{ matrix.configuration }}"
testPresetAdditionalArgs: "[`--timeout 400`,`--output-on-failure`,`-LE segment_id_test`]"
testPreset: "test-${{ matrix.compiler }}-${{ matrix.configuration }}"
testPresetAdditionalArgs: "[`--timeout 400`,`--output-on-failure`,`-L segment_id_test`]"
timeout-minutes: 480
- name: ccache stats
run: |
ctest -j $(($(nproc)/2+1)) --timeout 400 --output-on-failure -LE segment_id_test
ctest -j $(($(nproc)/2+1)) --timeout 400 --output-on-failure -L segment_id_test
working-directory: build/
timeout-minutes: 20
ccache -s
- name: Setup cluster
run: |
case ${{ matrix.compiler }} in
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,9 @@ venv/

#ctags
.tags
/.vs
.vs
vcpkg-manifest-install.log
vcpkg_installed/*
vcpkg_installed/vcpkg
builds/
vcpkg_installed/vcpkg/compiler-file-hash-cache.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/microsoft/vcpkg.git
Loading