variables: GIT_STRATEGY: "clone" BUILD_PADDING_PREFIX: /tmp/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX/ BUILD_IMAGE_CENTOS7: "git.mesalab.cn:7443/mesa_platform/build-env:centos7-for-sapp" BUILD_IMAGE_CENTOS8: "git.mesalab.cn:7443/mesa_platform/build-env:rocky8-for-sapp" INSTALL_DEPENDENCY_LIBRARY: libMESA_htable-devel libMESA_prof_load-devel libcjson-devel libMESA_field_stat2-devel framework_env libMESA_handle_logger-devel libbreakpad_mini-devel libMESA_jump_layer-devel libfieldstat3-devel libMESA_htable libMESA_prof_load libMESA_field_stat2 libMESA_handle_logger libcjson libbreakpad_mini libMESA_jump_layer libfieldstat3 mrzcpd-corei7 hasp-tools SYMBOL_TARGET: sapp TEST_NAME: gtest_sapp_v4 INSTALL_PREFIX: "/home/mesasoft/sapp_run/" stages: - cppcheck - build - test - envelope - upload .everything_before_script: &everything_before_script - mkdir -p $BUILD_PADDING_PREFIX/$CI_PROJECT_NAMESPACE/ - ln -s $CI_PROJECT_DIR $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH - cd $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH - chmod +x ./ci/travis.sh - yum makecache --disablerepo="*" --enablerepo="framework,platform" - yum install -y $INSTALL_DEPENDENCY_LIBRARY - source /etc/profile.d/framework.sh; source /etc/profile.d/mrzcpd.sh ############################################################################### # cppcheck ############################################################################### .cppcheck_script: variables: BUILD_TYPE: Debug CAPTURE_MODE: MARSIO PLATFORM_MODE: INLINE stage: cppcheck script: - cd build; cmake3 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. - > cppcheck --project=compile_commands.json --enable=all --error-exitcode=1 --suppress=unusedFunction --suppress=missingInclude --suppress=uselessAssignmentPtrArg --suppress=unmatchedSuppression --suppress=variableScope --suppress=unreadVariable --suppress=cstyleCast --suppress=memleakOnRealloc --suppress=constParameter --suppress=uselessAssignmentArg --suppress=uninitvar --suppress=unusedStructMember --suppress=preprocessorErrorDirective --suppress=syntaxError tags: - share run_cppcheck_for_centos7: extends: .cppcheck_script image: $BUILD_IMAGE_CENTOS7 run_cppcheck_for_centos8: extends: .cppcheck_script image: $BUILD_IMAGE_CENTOS8 ############################################################################### # build ############################################################################### .build_before_script: before_script: *everything_before_script script: - ./ci/travis.sh variables: BUILD_TEST: "ON" BUILD_TYPE: Debug CAPTURE_MODE: MARSIO PLATFORM_MODE: INLINE tags: - share .build_by_travis_for_centos7: extends: .build_before_script stage: build image: $BUILD_IMAGE_CENTOS7 develop_build_for_centos7: extends: .build_by_travis_for_centos7 variables: BUILD_TYPE: RelWithDebInfo artifacts: name: "$SYMBOL_TARGET-$CI_COMMIT_REF_NAME-debug" paths: - build/* except: - tags release_build_debug_for_centos7: extends: .build_by_travis_for_centos7 variables: BUILD_TYPE: Debug PACKAGE: 1 ASAN_OPTION: "ADDRESS" script: - source /opt/rh/devtoolset-7/enable || true - ./ci/travis.sh artifacts: name: "$SYMBOL_TARGET-$CI_COMMIT_REF_NAME-release" paths: - build/* only: - tags release_build_for_centos7: extends: .build_by_travis_for_centos7 variables: BUILD_TYPE: RelWithDebInfo MEM_POOL: JEMALLOC_STATIC PACKAGE: 1 artifacts: name: "$SYMBOL_TARGET-$CI_COMMIT_REF_NAME-release" paths: - build/* only: - tags .build_by_travis_for_centos8: stage: build image: $BUILD_IMAGE_CENTOS8 extends: .build_before_script develop_build_for_centos8: extends: .build_by_travis_for_centos8 variables: BUILD_TYPE: RelWithDebInfo artifacts: name: "$SYMBOL_TARGET-$CI_COMMIT_REF_NAME-debug" paths: - build/* except: - tags release_build_debug_for_centos8: extends: .build_by_travis_for_centos8 variables: BUILD_TYPE: Debug PACKAGE: 1 ASAN_OPTION: "ADDRESS" artifacts: name: "$SYMBOL_TARGET-$CI_COMMIT_REF_NAME-release" paths: - build/* only: - tags release_build_for_centos8: extends: .build_by_travis_for_centos8 variables: BUILD_TYPE: RelWithDebInfo MEM_POOL: JEMALLOC_STATIC PACKAGE: 1 artifacts: name: "$SYMBOL_TARGET-$CI_COMMIT_REF_NAME-release" paths: - build/* only: - tags ############################################################################### # envelope ############################################################################### .define_before_envelope_centos8: stage: envelope extends: .build_by_travis_for_centos8 variables: BUILD_TEST : "OFF" BUILD_TYPE: RelWithDebInfo MEM_POOL: JEMALLOC_STATIC HASP_ENABLED: "ON" FEATURE_ID: 100 HASP_INTERNAL_S: 3600 PACKAGE: 1 only: - tags tags: - share envelope_rpm_for_centos8: extends: .define_before_envelope_centos8 image: $BUILD_IMAGE_CENTOS8 artifacts: name: "$SYMBOL_TARGET-pr-$CI_COMMIT_REF_NAME-release" paths: - build/*-pr-*.rpm dependencies: - release_build_for_centos8 ############################################################################### # test ############################################################################### .setup_test_env_for_centos8: stage: test image: $BUILD_IMAGE_CENTOS8 allow_failure: false before_script: - *everything_before_script - ls -l /opt/MESA/lib && echo "/opt/MESA/lib" >> /etc/ld.so.conf - ldconfig && sysctl -w net.ipv6.conf.all.disable_ipv6=0 && ifconfig && ulimit -c unlimited - ip neigh show && ip -6 neigh show - cd build; ctest3; pwd - cd testing/ && ldd $TEST_NAME dependencies: - develop_build_for_centos8 - release_build_for_centos8 tags: - share benchmark_test_for_centos8: extends: .setup_test_env_for_centos8 script: #run module v2.0 with death test - ./$TEST_NAME -s -f control.* - ./$TEST_NAME -s -f fake_marsio.* #run module v3.0 - ./$TEST_NAME -s -f benchmark_drop.* - ./$TEST_NAME -s -f benchmark_forward.* - ./$TEST_NAME -s -f benchmark_inject.tcp* - ./$TEST_NAME -s -f benchmark_inject.inline_same_dir - ./$TEST_NAME -s -f benchmark_inject.inline_reverse_dir inline_test_for_centos8: extends: .setup_test_env_for_centos8 script: #run module v2.0 with death test - ./$TEST_NAME -s -f inline_mode.* # - ./$TEST_NAME -s -f transparent.* basic_test_for_centos8: extends: .setup_test_env_for_centos8 script: #run module v2.0 immediately - ./$TEST_NAME -s -f ipv4.* - ./$TEST_NAME -s -f ipv6.* - ./$TEST_NAME -s -f udp.* - ./$TEST_NAME -s -f appstate.* - ./$TEST_NAME -s -f timer.* - ./$TEST_NAME -s -f proxy.* - ./$TEST_NAME -s -f asymmetric.* - ./$TEST_NAME -s -f pkt_dump.* - ./$TEST_NAME -s -f project.* - ./$TEST_NAME -s -f stream_bridge.* - ./$TEST_NAME -s -f tunnel.* - ./$TEST_NAME -s -f plug_ctrl.* - ./$TEST_NAME -s -f jump_layer.* - ./$TEST_NAME -s -f hybrid.* # - ./$TEST_NAME -s -f inject.* - ./$TEST_NAME -s -f offload.* - ./$TEST_NAME -s -f tcp.* - ./$TEST_NAME -s -f tcpall.* ############################################################################### # upload ############################################################################### .define_before_upload_centos7: stage: upload image: $BUILD_IMAGE_CENTOS7 before_script: - pwd; ls -l ; cd build ; ls -l - cp /root/rpm_upload_tools.py ./ variables: PULP3_REPO_NAME: platform-stable-x86_64.el7 PULP3_DIST_NAME: platform-stable-x86_64.el7 only: - tags tags: - share rpm_upload_for_centos7: extends: .define_before_upload_centos7 dependencies: - release_build_debug_for_centos7 - release_build_for_centos7 script: - python3 rpm_upload_tools.py $PULP3_REPO_NAME $PULP3_DIST_NAME *.rpm .define_before_upload_centos8: stage: upload image: $BUILD_IMAGE_CENTOS8 before_script: - pwd; ls -l ; cd build ; ls -l - cp /root/rpm_upload_tools.py ./ variables: PULP3_REPO_NAME: platform-stable-x86_64.el8 PULP3_DIST_NAME: platform-stable-x86_64.el8 only: - tags tags: - share rpm_upload_for_centos8: extends: .define_before_upload_centos8 dependencies: - release_build_debug_for_centos8 - release_build_for_centos8 script: - python3 rpm_upload_tools.py $PULP3_REPO_NAME $PULP3_DIST_NAME *.rpm envelope_rpm_upload_for_centos8: extends: .define_before_upload_centos8 dependencies: - envelope_rpm_for_centos8 script: - python3 rpm_upload_tools.py $PULP3_REPO_NAME $PULP3_DIST_NAME *-pr-*.rpm