diff --git a/.github/workflows/release_centos8.yaml b/.github/workflows/release_centos8.yaml index a72a1c053..d1dd2c6d9 100644 --- a/.github/workflows/release_centos8.yaml +++ b/.github/workflows/release_centos8.yaml @@ -40,9 +40,13 @@ jobs: # Initialize dependencies. ./init + # Set default build_type to Release + INPUT_BUILD_TYPE=${{ github.event.inputs.build_type }} + BUILD_TYPE=${INPUT_BUILD_TYPE:-"Release"} + # Build community binaries. cd build - cmake -DCMAKE_BUILD_TYPE=${{ github.event.inputs.build_type }} -DMG_ENTERPRISE=OFF .. + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DMG_ENTERPRISE=OFF .. make -j$THREADS - name: Run unit tests @@ -197,11 +201,15 @@ jobs: # Initialize dependencies. ./init + # Set default build_type to Release + INPUT_BUILD_TYPE=${{ github.event.inputs.build_type }} + BUILD_TYPE=${INPUT_BUILD_TYPE:-"Release"} + # Build release binaries. cd build - cmake -DCMAKE_BUILD_TYPE=${{ github.event.inputs.build_type }} .. + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. make -j$THREADS - + - name: Create enterprise RPM package run: | # Activate toolchain. diff --git a/.github/workflows/release_debian10.yaml b/.github/workflows/release_debian10.yaml index 88d623b0e..277d4c55e 100644 --- a/.github/workflows/release_debian10.yaml +++ b/.github/workflows/release_debian10.yaml @@ -40,9 +40,13 @@ jobs: # Initialize dependencies. ./init + # Set default build_type to Release + INPUT_BUILD_TYPE=${{ github.event.inputs.build_type }} + BUILD_TYPE=${INPUT_BUILD_TYPE:-"Release"} + # Build community binaries. cd build - cmake -DCMAKE_BUILD_TYPE=${{ github.event.inputs.build_type }} -DMG_ENTERPRISE=OFF .. + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DMG_ENTERPRISE=OFF .. make -j$THREADS - name: Run unit tests @@ -197,9 +201,13 @@ jobs: # Initialize dependencies. ./init + # Set default build_type to Release + INPUT_BUILD_TYPE=${{ github.event.inputs.build_type }} + BUILD_TYPE=${INPUT_BUILD_TYPE:-"Release"} + # Build release binaries. cd build - cmake -DCMAKE_BUILD_TYPE=${{ github.event.inputs.build_type }} .. + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. make -j$THREADS - name: Create enterprise DEB package @@ -329,9 +337,14 @@ jobs: source /opt/toolchain-v4/activate # Initialize dependencies. ./init + + # Set default build_type to Release + INPUT_BUILD_TYPE=${{ github.event.inputs.build_type }} + BUILD_TYPE=${INPUT_BUILD_TYPE:-"Release"} + # Build only memgraph release binary. cd build - cmake -DCMAKE_BUILD_TYPE=${{ github.event.inputs.build_type }} .. + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. make -j$THREADS memgraph - name: Run Jepsen tests diff --git a/.github/workflows/release_ubuntu2004.yaml b/.github/workflows/release_ubuntu2004.yaml index cb788e58e..a2eb97c06 100644 --- a/.github/workflows/release_ubuntu2004.yaml +++ b/.github/workflows/release_ubuntu2004.yaml @@ -40,9 +40,13 @@ jobs: # Initialize dependencies. ./init + # Set default build_type to Release + INPUT_BUILD_TYPE=${{ github.event.inputs.build_type }} + BUILD_TYPE=${INPUT_BUILD_TYPE:-"Release"} + # Build community binaries. cd build - cmake -DCMAKE_BUILD_TYPE=${{ github.event.inputs.build_type }} -DMG_ENTERPRISE=OFF .. + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DMG_ENTERPRISE=OFF .. make -j$THREADS - name: Run unit tests @@ -197,9 +201,13 @@ jobs: # Initialize dependencies. ./init + # Set default build_type to Release + INPUT_BUILD_TYPE=${{ github.event.inputs.build_type }} + BUILD_TYPE=${INPUT_BUILD_TYPE:-"Release"} + # Build release binaries. cd build - cmake -DCMAKE_BUILD_TYPE=${{ github.event.inputs.build_type }} .. + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. make -j$THREADS - name: Create enterprise DEB package diff --git a/CMakeLists.txt b/CMakeLists.txt index f04f079bd..1933689fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,6 +239,9 @@ else() endif() # ----------------------------------------------------------------------------- +if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) + message(FATAL_ERROR "CMake build type was set as empty, most likely a mistake") +endif() # default build type is debug if (NOT CMAKE_BUILD_TYPE)