🐎 ci(add aarch64 el9 jobs): remove ./ci scripts

This commit is contained in:
yangwei
2024-11-27 19:50:50 +08:00
parent 3202b9ae31
commit 405a62826e
5 changed files with 205 additions and 183 deletions

View File

@@ -2,9 +2,13 @@ variables:
GIT_STRATEGY: "clone"
BUILD_PADDING_PREFIX: /tmp/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX/
INSTALL_PREFIX: "/opt/tsg/stellar"
INSTALL_DEPENDENCY_LIBRARY: mrzcpd-corei7 framework_env libfieldstat4-devel
INSTALL_DEPENDENCY_LIBRARY: framework_env libfieldstat4-devel
MRZCPD: mrzcpd-corei7
TESTING_VERSION_BUILD: 0
BUILD_IMAGE_ROCKYLINUX: "git.mesalab.cn:7443/mesa_platform/build-env:rocky8-for-stellar"
BUILD_IMAGE_X86_64_ROCKY8: "git.mesalab.cn:7443/mesa_platform/build-env:rocky8-for-stellar"
BUILD_IMAGE_AARCH64_ROCKY9: "git.mesalab.cn:7443/mesa_platform/build-env:rocky9-aarch64"
stages:
- cppcheck
@@ -17,10 +21,9 @@ stages:
- ln -s $CI_PROJECT_DIR $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH
- cd $BUILD_PADDING_PREFIX/$CI_PROJECT_PATH
- yum makecache --disablerepo="*" --enablerepo="framework,platform"
- yum install -y $INSTALL_DEPENDENCY_LIBRARY
- yum install -y $INSTALL_DEPENDENCY_LIBRARY $MRZCPD
- source /etc/profile.d/mrzcpd.sh
- source /etc/profile.d/framework.sh
- chmod +x ./ci/travis.sh
###############################################################################
# cppcheck
@@ -52,31 +55,48 @@ stages:
--suppress=unreachableCode
--suppress=internalAstError
--suppress=integerOverflow
--suppress=*:${CI_PROJECT_DIR}/deps/*
--suppress=*:${CI_PROJECT_DIR}/infra/monitor/stellar-dump/*
--suppress=*:${CI_PROJECT_DIR}/deps/yyjson/*
--suppress=*:${CI_PROJECT_DIR}/deps/mpack/*
--suppress=*:${CI_PROJECT_DIR}/decoders/lpi_plus/libprotoident/*
tags:
- share
run_cppcheck_for_rockylinux:
run_cppcheck_for_x86_64_rocky8:
extends: .cppcheck_script
image: $BUILD_IMAGE_ROCKYLINUX
image: $BUILD_IMAGE_X86_64_ROCKY8
tags:
- tsg-os-builder-el8
run_cppcheck_for_aarch64_rocky9:
extends: .cppcheck_script
image: $BUILD_IMAGE_AARCH64_ROCKY9
tags:
- tsg-os-builder-aarch64
###############################################################################
# build
###############################################################################
.build_by_travis_for_rockylinux:
image: $BUILD_IMAGE_ROCKYLINUX
.build_before_script:
stage: build
before_script: *everything_before_script
script:
- ./ci/travis.sh
- mkdir build || true
- cd build
- >
cmake3 -DCMAKE_CXX_FLAGS=$CXX_FLAGS
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DASAN_OPTION=$ASAN_OPTION
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX
-DVERSION_DAILY_BUILD=$TESTING_VERSION_BUILD ..
- make -j4 VERBOSE=1
.build_for_x86_64_rocky8:
image: $BUILD_IMAGE_X86_64_ROCKY8
extends: .build_before_script
tags:
- share
- tsg-os-builder-el8
branch_build_debug_for_rockylinux:
stage: build
extends: .build_by_travis_for_rockylinux
branch_build_debug_for_x86_64_rocky8:
extends: .build_for_x86_64_rocky8
variables:
BUILD_TYPE: Debug
except:
@@ -84,99 +104,195 @@ branch_build_debug_for_rockylinux:
- /^release-.*$/i
- tags
branch_build_release_for_rockylinux:
stage: build
branch_build_release_for_x86_64_rocky8:
extends: .build_for_x86_64_rocky8
variables:
BUILD_TYPE: RelWithDebInfo
extends: .build_by_travis_for_rockylinux
except:
- /^develop-.*$/i
- /^release-.*$/i
- tags
develop_build_debug_for_rockylinux:
stage: build
extends: .build_by_travis_for_rockylinux
variables:
TESTING_VERSION_BUILD: 1
BUILD_TYPE: Debug
#ASAN_OPTION: ADDRESS
only:
- /^develop-.*$/i
- /^release-.*$/i
develop_build_release_for_rockylinux:
stage: build
extends: .build_by_travis_for_rockylinux
variables:
TESTING_VERSION_BUILD: 1
BUILD_TYPE: RelWithDebInfo
#ASAN_OPTION: ADDRESS
only:
- /^develop-.*$/i
- /^release-.*$/i
release_build_debug_for_rockylinux:
stage: build
variables:
BUILD_TYPE: Debug
extends: .build_by_travis_for_rockylinux
only:
- tags
release_build_release_for_rockylinux:
stage: build
variables:
BUILD_TYPE: RelWithDebInfo
extends: .build_by_travis_for_rockylinux
artifacts:
name: "stellar-install-$CI_COMMIT_REF_NAME-release"
name: "stellar-branch_build-$CI_COMMIT_REF_NAME-release"
paths:
- build/infra/*.rpm
- build/*
except:
- /^develop-.*$/i
- /^release-.*$/i
- tags
develop_build_debug_for_x86_64_rocky8:
extends: .build_for_x86_64_rocky8
variables:
TESTING_VERSION_BUILD: 1
BUILD_TYPE: Debug
#ASAN_OPTION: ADDRESS
only:
- /^develop-.*$/i
- /^release-.*$/i
develop_build_release_for_x86_64_rocky8:
extends: .build_for_x86_64_rocky8
variables:
TESTING_VERSION_BUILD: 1
BUILD_TYPE: RelWithDebInfo
#ASAN_OPTION: ADDRESS
artifacts:
name: "stellar-develop_build-$CI_COMMIT_REF_NAME-release"
paths:
- build/*
only:
- /^develop-.*$/i
- /^release-.*$/i
release_build_debug_for_x86_64_rocky8:
extends: .build_for_x86_64_rocky8
variables:
BUILD_TYPE: Debug
only:
- tags
release_build_release_for_x86_64_rocky8:
extends: .build_for_x86_64_rocky8
variables:
BUILD_TYPE: RelWithDebInfo
artifacts:
name: "stellar-release_build-$CI_COMMIT_REF_NAME-release"
paths:
- build/*
only:
- tags
.build_for_aarch64_rocky9:
image: $BUILD_IMAGE_AARCH64_ROCKY9
extends: .build_before_script
variables:
MRZCPD: mrzcpd
tags:
- tsg-os-builder-aarch64
branch_build_debug_for_aarch64_rocky9:
extends: .build_for_aarch64_rocky9
variables:
BUILD_TYPE: Debug
except:
- /^develop-.*$/i
- /^release-.*$/i
- tags
branch_build_release_for_aarch64_rocky9:
extends: .build_for_aarch64_rocky9
variables:
BUILD_TYPE: RelWithDebInfo
artifacts:
name: "stellar-branch_build-$CI_COMMIT_REF_NAME-release"
paths:
- build/*
except:
- /^develop-.*$/i
- /^release-.*$/i
- tags
develop_build_debug_for_aarch64_rocky9:
extends: .build_for_aarch64_rocky9
variables:
TESTING_VERSION_BUILD: 1
BUILD_TYPE: Debug
#ASAN_OPTION: ADDRESS
only:
- /^develop-.*$/i
- /^release-.*$/i
develop_build_release_for_aarch64_rocky9:
extends: .build_for_aarch64_rocky9
variables:
TESTING_VERSION_BUILD: 1
BUILD_TYPE: RelWithDebInfo
#ASAN_OPTION: ADDRESS
artifacts:
name: "stellar-develop_build-$CI_COMMIT_REF_NAME-release"
paths:
- build/*
only:
- /^develop-.*$/i
- /^release-.*$/i
release_build_debug_for_aarch64_rocky9:
extends: .build_for_aarch64_rocky9
variables:
BUILD_TYPE: Debug
only:
- tags
release_build_release_for_aarch64_rocky9:
extends: .build_for_aarch64_rocky9
variables:
BUILD_TYPE: RelWithDebInfo
artifacts:
name: "stellar-release_build-$CI_COMMIT_REF_NAME-release"
paths:
- build/*
only:
- tags
###############################################################################
# test
###############################################################################
test_in_rockylinux:
.setup_test_env:
stage: test
image: $BUILD_IMAGE_ROCKYLINUX
extends: .build_by_travis_for_rockylinux
variables:
BUILD_TYPE: Debug
ASAN_OPTION: ADDRESS
allow_failure: false
before_script:
- *everything_before_script
script:
- ./ci/travis.sh
- cd build; ctest -V
test_for_x86_64_rocky8:
extends: .setup_test_env
image: $BUILD_IMAGE_X86_64_ROCKY8
dependencies:
- branch_build_release_for_rockylinux
- develop_build_release_for_rockylinux
- release_build_release_for_rockylinux
- branch_build_release_for_x86_64_rocky8
- develop_build_release_for_x86_64_rocky8
- release_build_release_for_x86_64_rocky8
tags:
- share
- tsg-os-builder-el8
test_for_aarch64_rocky9:
extends: .setup_test_env
image: $BUILD_IMAGE_AARCH64_ROCKY9
dependencies:
- branch_build_release_for_aarch64_rocky9
- develop_build_release_for_aarch64_rocky9
- release_build_release_for_aarch64_rocky9
tags:
- tsg-os-builder-aarch64
###############################################################################
# upload
###############################################################################
.define_before_upload_rockylinux:
.define_before_upload:
stage: upload
image: $BUILD_IMAGE_ROCKYLINUX
before_script:
- pwd; ls -l ; cd build ; ls -l
- cp /root/rpm_upload_tools.py ./
script:
- python3 rpm_upload_tools.py $PULP3_REPO_NAME $PULP3_DIST_NAME *.rpm
only:
- tags
rpm_upload_for_x86_64_rocky8:
extends: .define_before_upload
image: $BUILD_IMAGE_X86_64_ROCKY8
variables:
PULP3_REPO_NAME: stellar-stable-x86_64.el8
PULP3_DIST_NAME: stellar-stable-x86_64.el8
only:
- tags
tags:
- share
rpm_upload_for_rockylinux:
extends: .define_before_upload_rockylinux
dependencies:
- release_build_release_for_rockylinux
script:
- python3 rpm_upload_tools.py $PULP3_REPO_NAME $PULP3_DIST_NAME *.rpm
- release_build_release_for_x86_64_rocky8
tags:
- tsg-os-builder-el8
rpm_upload_for_aarch64_rocky9:
extends: .define_before_upload
image: $BUILD_IMAGE_AARCH64_ROCKY9
variables:
PULP3_REPO_NAME: stellar-stable-aarch64.el9
PULP3_DIST_NAME: stellar-stable-aarch64.el9
dependencies:
- release_build_release_for_aarch64_rocky9
tags:
- tsg-os-builder-aarch64

View File

@@ -47,8 +47,10 @@ if (CMAKE_CXX_CPPCHECK)
"--suppress=unreachableCode"
"--suppress=internalAstError"
"--suppress=integerOverflow"
"--suppress=*:${CMAKE_SOURCE_DIR}/infra/monitor/stellar-dump/*"
"--suppress=redundantInitialization"
"--suppress=*:${CMAKE_SOURCE_DIR}/infra/monitor/stellar-dump/*"
"--suppress=*:${CMAKE_SOURCE_DIR}/decoders/lpi_plus/libprotoident/*"
"--suppress=*:${CMAKE_SOURCE_DIR}/deps/*"
)
set(CMAKE_C_CPPCHECK ${CMAKE_CXX_CPPCHECK})
else()

View File

@@ -1,48 +0,0 @@
#!/usr/bin/env bash
# Copyright 2017 Google Inc.
# All Rights Reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# This file is typically sourced by another script.
# if possible, ask for the precise number of processors,
# otherwise take 2 processors as reasonable default; see
# https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization
if [ -x /usr/bin/getconf ]; then
NPROCESSORS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
else
NPROCESSORS=2
fi
# as of 2017-09-04 Travis CI reports 32 processors, but GCC build
# crashes if parallelized too much (maybe memory consumption problem),
# so limit to 4 processors for the time being.
if [ $NPROCESSORS -gt 4 ]; then
echo "$0:Note: Limiting processors to use by make from $NPROCESSORS to 4."
NPROCESSORS=4
fi

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env sh
set -evx
echo "machine ${PULP3_SERVER_URL}\nlogin ${PULP3_SERVER_LOGIN}\npassword ${PULP3_SERVER_PASSWORD}\n" >~/.netrc

View File

@@ -1,45 +0,0 @@
#!/usr/bin/env sh
set -evx
chmod +x ci/get-nprocessors.sh
. ci/get-nprocessors.sh
# If possible, ask for the precise number of processors,
# otherwise take 2 processors as reasonable default; see
# https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization
if [ -x /usr/bin/getconf ]; then
NPROCESSORS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
else
NPROCESSORS=2
fi
# As of 2017-09-04 Travis CI reports 32 processors, but GCC build
# crashes if parallelized too much (maybe memory consumption problem),
# so limit to 4 processors for the time being.
if [ $NPROCESSORS -gt 4 ]; then
echo "$0:Note: Limiting processors to use by make from $NPROCESSORS to 4."
NPROCESSORS=4
fi
# Tell make to use the processors. No preceding '-' required.
MAKEFLAGS="j${NPROCESSORS}"
export MAKEFLAGS
env | sort
# Set default values to OFF for these variables if not specified.
: "${NO_EXCEPTION:=OFF}"
: "${NO_RTTI:=OFF}"
: "${COMPILER_IS_GNUCXX:=OFF}"
mkdir build || true
cd build
cmake3 -DCMAKE_CXX_FLAGS=$CXX_FLAGS \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DASAN_OPTION=$ASAN_OPTION \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
-DVERSION_DAILY_BUILD=$TESTING_VERSION_BUILD \
..
make -j $NPROCESSORS