328 lines
9.3 KiB
YAML
328 lines
9.3 KiB
YAML
name: Testflow-mgbuild
|
|
concurrency:
|
|
group: ${{ github.head_ref || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
# UNCOMMENT THIS BEFORE MERGE
|
|
pull_request:
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "**/*.md"
|
|
- ".clang-format"
|
|
- "CODEOWNERS"
|
|
- "licenses/*"
|
|
|
|
jobs:
|
|
community_build:
|
|
name: "Community build"
|
|
runs-on: [self-hosted, deadpool]
|
|
env:
|
|
THREADS: 24
|
|
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
|
|
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
|
|
OS: debian-11
|
|
TOOLCHAIN: v5
|
|
ARCH: amd
|
|
BUILD_TYPE: RelWithDebInfo
|
|
|
|
steps:
|
|
- name: Set up repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# Number of commits to fetch. `0` indicates all history for all
|
|
# branches and tags. (default: 1)
|
|
fetch-depth: 0
|
|
|
|
- name: Spin up mgbuild container
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
run
|
|
|
|
- name: Build release binaries
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--build-type $BUILD_TYPE \
|
|
--threads $THREADS \
|
|
build-memgraph --community
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--threads $THREADS \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph unit
|
|
|
|
- name: Stop mgbuild container
|
|
if: always()
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
stop --remove
|
|
|
|
debug_build:
|
|
name: "Debug build"
|
|
runs-on: [self-hosted, hulk]
|
|
env:
|
|
THREADS: 24
|
|
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
|
|
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
|
|
OS: debian-11
|
|
TOOLCHAIN: v5
|
|
ARCH: amd
|
|
BUILD_TYPE: Debug
|
|
|
|
steps:
|
|
- name: Set up repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# Number of commits to fetch. `0` indicates all history for all
|
|
# branches and tags. (default: 1)
|
|
fetch-depth: 0
|
|
|
|
- name: Spin up mgbuild container
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
run
|
|
|
|
- name: Build release binaries
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--build-type $BUILD_TYPE \
|
|
--threads $THREADS \
|
|
build-memgraph
|
|
|
|
- name: Run leftover CTest tests
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--threads $THREADS \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph leftover-CTest
|
|
|
|
- name: Run drivers tests
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--threads $THREADS \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph drivers
|
|
|
|
- name: Run integration tests
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--threads $THREADS \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph integration
|
|
|
|
- name: Run cppcheck and clang-format
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--threads $THREADS \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph cppcheck-and-clang-format
|
|
|
|
# - name: Save cppcheck and clang-format errors
|
|
# uses: actions/upload-artifact@v4
|
|
# with:
|
|
# name: "Code coverage(Debug build)"
|
|
# path: tools/github/cppcheck_and_clang_format.txt
|
|
|
|
- name: Stop mgbuild container
|
|
if: always()
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
stop --remove
|
|
|
|
release_build:
|
|
name: "Release build"
|
|
runs-on: [self-hosted, black-widow]
|
|
env:
|
|
THREADS: 24
|
|
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
|
|
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
|
|
OS: debian-11
|
|
TOOLCHAIN: v5
|
|
ARCH: amd
|
|
BUILD_TYPE: Release
|
|
|
|
steps:
|
|
- name: Set up repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# Number of commits to fetch. `0` indicates all history for all
|
|
# branches and tags. (default: 1)
|
|
fetch-depth: 0
|
|
|
|
- name: Spin up mgbuild container
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
run
|
|
|
|
- name: Build release binaries
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--build-type $BUILD_TYPE \
|
|
--threads $THREADS \
|
|
build-memgraph
|
|
|
|
- name: Run GQL Behave tests
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph gql-behave
|
|
|
|
# - name: Save quality assurance status
|
|
# uses: actions/upload-artifact@v4
|
|
# with:
|
|
# name: "GQL Behave Status"
|
|
# path: |
|
|
# tests/gql_behave/gql_behave_status.csv
|
|
# tests/gql_behave/gql_behave_status.html
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--threads $THREADS \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph unit
|
|
|
|
# - name: Ensure Kafka and Pulsar are up
|
|
# run: |
|
|
# cd tests/e2e/streams/kafka
|
|
# docker-compose up -d
|
|
# cd ../pulsar
|
|
# docker-compose up -d
|
|
#
|
|
# - name: Run e2e tests
|
|
# run: |
|
|
# cd tests
|
|
# ./setup.sh /opt/toolchain-v4/activate
|
|
# source ve3/bin/activate_e2e
|
|
# cd e2e
|
|
# ./run.sh
|
|
#
|
|
# - name: Ensure Kafka and Pulsar are down
|
|
# run: |
|
|
# cd tests/e2e/streams/kafka
|
|
# docker-compose down
|
|
# cd ../pulsar
|
|
# docker-compose down
|
|
|
|
- name: Run stress test (plain)
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph stress-plain
|
|
|
|
- name: Run stress test (SSL)
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph stress-ssl
|
|
|
|
- name: Run durability test
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
--enterprise-license $MEMGRAPH_ENTERPRISE_LICENSE \
|
|
--organization-name $MEMGRAPH_ORGANIZATION_NAME \
|
|
test-memgraph durability
|
|
|
|
# - name: Create enterprise DEB package
|
|
# run: |
|
|
# # Activate toolchain.
|
|
# source /opt/toolchain-v4/activate
|
|
# cd build
|
|
#
|
|
# # create mgconsole
|
|
# # we use the -B to force the build
|
|
# make -j$THREADS -B mgconsole
|
|
#
|
|
# # Create enterprise DEB package.
|
|
# mkdir output && cd output
|
|
# cpack -G DEB --config ../CPackConfig.cmake
|
|
#
|
|
# - name: Save enterprise DEB package
|
|
# uses: actions/upload-artifact@v4
|
|
# with:
|
|
# name: "Enterprise DEB package"
|
|
# path: build/output/memgraph*.deb
|
|
#
|
|
# - name: Save test data
|
|
# uses: actions/upload-artifact@v4
|
|
# if: always()
|
|
# with:
|
|
# name: "Test data(Release build)"
|
|
# path: |
|
|
# # multiple paths could be defined
|
|
# build/logs
|
|
|
|
- name: Stop mgbuild container
|
|
if: always()
|
|
run: |
|
|
./release/package/run2.sh \
|
|
--toolchain $TOOLCHAIN \
|
|
--os $OS \
|
|
--arch $ARCH \
|
|
stop --remove
|