Skip to content

Commit

Permalink
fix(common/engine_conf): multiple inheritence broken because of a mis… (
Browse files Browse the repository at this point in the history
#1680)

* fix(common/engine_conf): multiple inheritence broken because of a missing flag enabled
* fix(common/log_v2): segfault in centengine fixed
* fix(engine/config/applier): bad use of std::equal
* fix(tests/engine): new test
* fix(broker/neb): cbmod was linked with not needed libraries
*  fix(broker/lua): a memory leak introduced with the new openssl md5 fixed
* fix(tests/engine): a new test to validate the good behavior of inheritance
* enh(cmake): new option LEGACY_ENGINE to compile the legacy engine instead of the new one
* fix(gh/alma8): maxscale repo is disabled on alma8
* fix(cmake): issues with dependencies
* enh(gha): new possibility to save packages as artifacts

REFS: MON-147499
  • Loading branch information
bouda1 committed Sep 25, 2024
1 parent 64ff4d3 commit 7c6ae56
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/centreon-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ on:
required: true
default: false
type: boolean
legacy_engine:
description: 'Compile Engine with legacy configuration library'
required: true
default: false
type: boolean
packages_in_artifact:
description: 'Save packages in artifacts'
required: true
default: false
type: boolean
unit_tests:
description: 'Execute the unit tests'
required: true
default: true
type: boolean

schedule:
- cron: '30 0 * * 1-5'
pull_request:
Expand Down Expand Up @@ -110,7 +126,7 @@ jobs:

unit-test:
needs: [get-version]
if: ${{ ! contains(fromJson('["stable"]'), needs.get-version.outputs.stability) }}
if: ${{ github.event.inputs.unit_tests == 'true' && ! contains(fromJson('["stable"]'), needs.get-version.outputs.stability) }}

strategy:
fail-fast: false
Expand All @@ -125,6 +141,7 @@ jobs:
SCCACHE_REGION: "eu-west-1"
AWS_ACCESS_KEY_ID: ${{ secrets.COLLECT_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.COLLECT_S3_SECRET_KEY }}
LEGACY_ENGINE: ${{ github.event.inputs.legacy_engine == 'true' && 'ON' || 'OFF' }}

container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/centreon-collect-${{ matrix.distrib }}:${{ needs.get-version.outputs.img_version }}
Expand Down Expand Up @@ -195,7 +212,7 @@ jobs:
-DWITH_MODULE_SIMU=On \
-DCMAKE_C_COMPILER_LAUNCHER=${SCCACHE_PATH} \
-DCMAKE_CXX_COMPILER_LAUNCHER=${SCCACHE_PATH} \
-DLEGACY_ENGINE=ON \
-DLEGACY_ENGINE=${LEGACY_ENGINE} \
-S .
ninja -Cbuild
Expand Down Expand Up @@ -232,6 +249,8 @@ jobs:
release: ${{ needs.get-version.outputs.release }}
commit_hash: ${{ github.sha }}
stability: ${{ needs.get-version.outputs.stability }}
legacy_engine: ${{ github.event.inputs.legacy_engine == 'true' }}
packages_in_artifact: ${{ github.event.inputs.packages_in_artifact == 'true' }}
secrets: inherit

robot-test:
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/package-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ on:
stability:
required: true
type: string
legacy_engine:
required: true
type: boolean
packages_in_artifact:
required: true
type: boolean

jobs:
package:
Expand Down Expand Up @@ -135,6 +141,11 @@ jobs:
export TRIPLET=x64-linux-release
fi
if [ "${{ inputs.legacy_engine }}" == true ]; then
export LEGACY_ENGINE=ON
else
export LEGACY_ENGINE=OFF
fi
mv /root/.cache /github/home/
export VCPKG_ROOT="/vcpkg"
export PATH="$VCPKG_ROOT:$PATH"
Expand Down Expand Up @@ -162,7 +173,7 @@ jobs:
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER_LAUNCHER=${SCCACHE_PATH} \
-DCMAKE_CXX_COMPILER_LAUNCHER=${SCCACHE_PATH} \
-DLEGACY_ENGINE=ON \
-DLEGACY_ENGINE=$LEGACY_ENGINE \
-S .
ninja -Cbuild
Expand Down Expand Up @@ -222,7 +233,7 @@ jobs:
run: rm -rf *-debuginfo*.${{ matrix.package_extension }}

# set condition to true if artifacts are needed
- if: ${{ false }}
- if: inputs.packages_in_artifact == true
name: Upload package artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
Expand Down
2 changes: 1 addition & 1 deletion engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ include_directories(enginerpc ${CMAKE_SOURCE_DIR}/common/src

# centenginestats target.
add_executable(centenginestats "${SRC_DIR}/centenginestats.cc")
add_dependencies(centenginestats centreon_clib pb_neb_lib)
add_dependencies(centenginestats centreon_clib)
target_link_libraries(centenginestats centreon_clib fmt::fmt)
target_precompile_headers(centenginestats PRIVATE ${PRECOMP_HEADER})

Expand Down

0 comments on commit 7c6ae56

Please sign in to comment.