2021-03-30 18:08:51 +08:00
|
|
|
name: Release Ubuntu 20.04
|
2020-09-21 18:22:40 +08:00
|
|
|
|
2021-03-16 16:13:50 +08:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
2023-02-01 06:20:49 +08:00
|
|
|
- cron: "0 22 * * *"
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
community_build:
|
|
|
|
name: "Community build"
|
2021-03-16 16:13:50 +08:00
|
|
|
runs-on: [self-hosted, Linux, X64, Ubuntu20.04]
|
2020-09-21 18:22:40 +08:00
|
|
|
env:
|
|
|
|
THREADS: 24
|
2021-10-03 17:09:57 +08:00
|
|
|
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
|
|
|
|
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
|
2020-09-21 18:22:40 +08:00
|
|
|
timeout-minutes: 960
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up repository
|
2022-11-09 17:48:34 +08:00
|
|
|
uses: actions/checkout@v3
|
2020-09-21 18:22:40 +08:00
|
|
|
with:
|
|
|
|
# Number of commits to fetch. `0` indicates all history for all
|
|
|
|
# branches and tags. (default: 1)
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Build community binaries
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Initialize dependencies.
|
|
|
|
./init
|
|
|
|
|
|
|
|
# Build community binaries.
|
|
|
|
cd build
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=release -DMG_ENTERPRISE=OFF ..
|
|
|
|
make -j$THREADS
|
|
|
|
|
|
|
|
- name: Run unit tests
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Run unit tests.
|
|
|
|
cd build
|
|
|
|
ctest -R memgraph__unit --output-on-failure
|
|
|
|
|
|
|
|
coverage_build:
|
|
|
|
name: "Coverage build"
|
2021-03-16 16:13:50 +08:00
|
|
|
runs-on: [self-hosted, Linux, X64, Ubuntu20.04]
|
2020-09-21 18:22:40 +08:00
|
|
|
env:
|
|
|
|
THREADS: 24
|
2021-10-03 17:09:57 +08:00
|
|
|
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
|
|
|
|
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up repository
|
2022-11-09 17:48:34 +08:00
|
|
|
uses: actions/checkout@v3
|
2020-09-21 18:22:40 +08:00
|
|
|
with:
|
|
|
|
# Number of commits to fetch. `0` indicates all history for all
|
|
|
|
# branches and tags. (default: 1)
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Build coverage binaries
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Initialize dependencies.
|
|
|
|
./init
|
|
|
|
|
|
|
|
# Build coverage binaries.
|
|
|
|
cd build
|
|
|
|
cmake -DTEST_COVERAGE=ON ..
|
|
|
|
make -j$THREADS memgraph__unit
|
|
|
|
|
|
|
|
- name: Run unit tests
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Run unit tests.
|
|
|
|
cd build
|
|
|
|
ctest -R memgraph__unit --output-on-failure
|
|
|
|
|
|
|
|
- name: Compute code coverage
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Compute code coverage.
|
|
|
|
cd tools/github
|
|
|
|
./coverage_convert
|
|
|
|
|
|
|
|
# Package code coverage.
|
|
|
|
cd generated
|
|
|
|
tar -czf code_coverage.tar.gz coverage.json html report.json summary.rmu
|
|
|
|
|
|
|
|
- name: Save code coverage
|
2022-11-09 17:48:34 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-09-21 18:22:40 +08:00
|
|
|
with:
|
|
|
|
name: "Code coverage"
|
|
|
|
path: tools/github/generated/code_coverage.tar.gz
|
|
|
|
|
|
|
|
debug_build:
|
|
|
|
name: "Debug build"
|
2021-03-16 16:13:50 +08:00
|
|
|
runs-on: [self-hosted, Linux, X64, Ubuntu20.04]
|
2020-09-21 18:22:40 +08:00
|
|
|
env:
|
|
|
|
THREADS: 24
|
2021-10-03 17:09:57 +08:00
|
|
|
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
|
|
|
|
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up repository
|
2022-11-09 17:48:34 +08:00
|
|
|
uses: actions/checkout@v3
|
2020-09-21 18:22:40 +08:00
|
|
|
with:
|
|
|
|
# Number of commits to fetch. `0` indicates all history for all
|
|
|
|
# branches and tags. (default: 1)
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Build debug binaries
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Initialize dependencies.
|
|
|
|
./init
|
|
|
|
|
|
|
|
# Build debug binaries.
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make -j$THREADS
|
|
|
|
|
|
|
|
- name: Run leftover CTest tests
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Run leftover CTest tests (all except unit and benchmark tests).
|
|
|
|
cd build
|
|
|
|
ctest -E "(memgraph__unit|memgraph__benchmark)" --output-on-failure
|
|
|
|
|
|
|
|
- name: Run drivers tests
|
|
|
|
run: |
|
|
|
|
./tests/drivers/run.sh
|
|
|
|
|
|
|
|
- name: Run integration tests
|
|
|
|
run: |
|
2023-06-16 05:10:52 +08:00
|
|
|
tests/integration/run.sh
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
- name: Run cppcheck and clang-format
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Run cppcheck and clang-format.
|
|
|
|
cd tools/github
|
|
|
|
./cppcheck_and_clang_format diff
|
|
|
|
|
|
|
|
- name: Save cppcheck and clang-format errors
|
2022-11-09 17:48:34 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-09-21 18:22:40 +08:00
|
|
|
with:
|
|
|
|
name: "Code coverage"
|
|
|
|
path: tools/github/cppcheck_and_clang_format.txt
|
|
|
|
|
|
|
|
release_build:
|
|
|
|
name: "Release build"
|
2021-03-16 16:13:50 +08:00
|
|
|
runs-on: [self-hosted, Linux, X64, Ubuntu20.04]
|
2020-09-21 18:22:40 +08:00
|
|
|
env:
|
|
|
|
THREADS: 24
|
2021-10-03 17:09:57 +08:00
|
|
|
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
|
|
|
|
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
|
2020-09-21 18:22:40 +08:00
|
|
|
timeout-minutes: 960
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up repository
|
2022-11-09 17:48:34 +08:00
|
|
|
uses: actions/checkout@v3
|
2020-09-21 18:22:40 +08:00
|
|
|
with:
|
|
|
|
# Number of commits to fetch. `0` indicates all history for all
|
|
|
|
# branches and tags. (default: 1)
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Build release binaries
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Initialize dependencies.
|
|
|
|
./init
|
|
|
|
|
|
|
|
# Build release binaries.
|
|
|
|
cd build
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=release ..
|
|
|
|
make -j$THREADS
|
|
|
|
|
2021-03-16 16:13:50 +08:00
|
|
|
- name: Create enterprise DEB package
|
2020-09-21 18:22:40 +08:00
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
cd build
|
2021-05-26 17:59:36 +08:00
|
|
|
|
|
|
|
# create mgconsole
|
|
|
|
# we use the -B to force the build
|
|
|
|
make -j$THREADS -B mgconsole
|
|
|
|
|
|
|
|
# Create enterprise DEB package.
|
2020-09-21 18:22:40 +08:00
|
|
|
mkdir output && cd output
|
2021-03-16 16:13:50 +08:00
|
|
|
cpack -G DEB --config ../CPackConfig.cmake
|
2020-09-21 18:22:40 +08:00
|
|
|
|
2021-03-16 16:13:50 +08:00
|
|
|
- name: Save enterprise DEB package
|
2022-11-09 17:48:34 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-09-21 18:22:40 +08:00
|
|
|
with:
|
2021-03-16 16:13:50 +08:00
|
|
|
name: "Enterprise DEB package"
|
|
|
|
path: build/output/memgraph*.deb
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
- name: Run micro benchmark tests
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2020-09-21 18:22:40 +08:00
|
|
|
|
|
|
|
# Run micro benchmark tests.
|
|
|
|
cd build
|
|
|
|
# The `eval` benchmark needs a large stack limit.
|
|
|
|
ulimit -s 262144
|
|
|
|
ctest -R memgraph__benchmark -V
|
|
|
|
|
|
|
|
- name: Run macro benchmark tests
|
|
|
|
run: |
|
|
|
|
cd tests/macro_benchmark
|
|
|
|
./harness QuerySuite MemgraphRunner \
|
|
|
|
--groups aggregation 1000_create unwind_create dense_expand match \
|
|
|
|
--no-strict
|
|
|
|
|
|
|
|
- name: Run parallel macro benchmark tests
|
|
|
|
run: |
|
|
|
|
cd tests/macro_benchmark
|
|
|
|
./harness QueryParallelSuite MemgraphRunner \
|
|
|
|
--groups aggregation_parallel create_parallel bfs_parallel \
|
|
|
|
--num-database-workers 9 --num-clients-workers 30 \
|
|
|
|
--no-strict
|
|
|
|
|
2020-11-24 20:09:14 +08:00
|
|
|
- name: Run GQL Behave tests
|
2020-09-21 18:22:40 +08:00
|
|
|
run: |
|
2020-11-24 20:09:14 +08:00
|
|
|
cd tests/gql_behave
|
2020-09-21 18:22:40 +08:00
|
|
|
./continuous_integration
|
|
|
|
|
|
|
|
- name: Save quality assurance status
|
2022-11-09 17:48:34 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-09-21 18:22:40 +08:00
|
|
|
with:
|
2020-11-24 20:09:14 +08:00
|
|
|
name: "GQL Behave Status"
|
|
|
|
path: |
|
|
|
|
tests/gql_behave/gql_behave_status.csv
|
|
|
|
tests/gql_behave/gql_behave_status.html
|
2020-09-21 18:22:40 +08:00
|
|
|
|
2021-10-08 20:36:17 +08:00
|
|
|
- name: Run unit tests
|
|
|
|
run: |
|
|
|
|
# Activate toolchain.
|
2022-01-18 19:51:27 +08:00
|
|
|
source /opt/toolchain-v4/activate
|
2021-10-08 20:36:17 +08:00
|
|
|
|
|
|
|
# Run unit tests.
|
|
|
|
cd build
|
|
|
|
ctest -R memgraph__unit --output-on-failure
|
|
|
|
|
2021-05-19 00:28:17 +08:00
|
|
|
- name: Run e2e tests
|
2021-01-16 02:04:44 +08:00
|
|
|
run: |
|
|
|
|
cd tests
|
2023-08-01 23:13:47 +08:00
|
|
|
./setup.sh /opt/toolchain-v4/activate
|
|
|
|
source ve3/bin/activate_e2e
|
2021-01-16 02:04:44 +08:00
|
|
|
cd e2e
|
2023-07-20 03:18:43 +08:00
|
|
|
./run.sh
|
2021-03-19 15:43:48 +08:00
|
|
|
|
2020-09-21 18:22:40 +08:00
|
|
|
- name: Run stress test (plain)
|
|
|
|
run: |
|
|
|
|
cd tests/stress
|
|
|
|
./continuous_integration
|
|
|
|
|
|
|
|
- name: Run stress test (SSL)
|
|
|
|
run: |
|
|
|
|
cd tests/stress
|
|
|
|
./continuous_integration --use-ssl
|
|
|
|
|
|
|
|
- name: Run stress test (large)
|
|
|
|
run: |
|
|
|
|
cd tests/stress
|
|
|
|
./continuous_integration --large-dataset
|
|
|
|
|
|
|
|
- name: Run durability test (plain)
|
|
|
|
run: |
|
|
|
|
cd tests/stress
|
|
|
|
source ve3/bin/activate
|
|
|
|
python3 durability --num-steps 5
|
|
|
|
|
|
|
|
- name: Run durability test (large)
|
|
|
|
run: |
|
|
|
|
cd tests/stress
|
|
|
|
source ve3/bin/activate
|
|
|
|
python3 durability --num-steps 20
|