Skip to content
Snippets Groups Projects
Commit c248f55d authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

Merge branch 'lintao/ci/split-build-test' into 'master'

Split the build and test tasks to reduce the artifacts size.

See merge request !100
parents 05215aa1 69508114
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,7 @@ workflow: ...@@ -26,6 +26,7 @@ workflow:
stages: stages:
- build - build
- test
############################################################################## ##############################################################################
# Template for Build and Test # Template for Build and Test
...@@ -34,14 +35,22 @@ stages: ...@@ -34,14 +35,22 @@ stages:
# the test job will be failed if it is executed on a different nodes. # the test job will be failed if it is executed on a different nodes.
# Therefore, put the build script and test script together. # Therefore, put the build script and test script together.
.envvar_template:
variables:
CEPCSW_LCG_RELEASE: LCG
CEPCSW_LCG_PLATFORM: x86_64-centos7-gcc11-opt
CEPCSW_LCG_VERSION: 103.0.2
.build_template: .build_template:
extends: .envvar_template
stage: build stage: build
variables:
CEPCSW_LCG_RELEASE:
CEPCSW_LCG_PLATFORM:
CEPCSW_LCG_VERSION:
script: script:
- bash ./.build.ci.sh - bash ./.build.ci.sh
.test_template:
extends: .envvar_template
stage: test
script:
- bash ./.test.ci.sh - bash ./.test.ci.sh
############################################################################## ##############################################################################
...@@ -49,19 +58,28 @@ stages: ...@@ -49,19 +58,28 @@ stages:
############################################################################## ##############################################################################
build:lcg:el7: build:lcg:el7:
extends: .build_template extends: .build_template
variables:
CEPCSW_LCG_RELEASE: LCG
CEPCSW_LCG_PLATFORM: x86_64-centos7-gcc11-opt
CEPCSW_LCG_VERSION: 103.0.2
tags: tags:
- centos7 - centos7
artifacts: artifacts:
paths: paths:
- InstallArea - InstallArea
- build.${CEPCSW_LCG_VERSION}.${CEPCSW_LCG_PLATFORM}
##############################################################################
# Test CentOS 7 (LCG)
##############################################################################
test:lcg:el7:
extends: .test_template
tags:
- centos7
artifacts:
paths:
- TDR_o1_v01.tgeo.root - TDR_o1_v01.tgeo.root
- TDR_o1_v02.tgeo.root - TDR_o1_v02.tgeo.root
reports: reports:
junit: build.${CEPCSW_LCG_VERSION}.${CEPCSW_LCG_PLATFORM}/cepcsw-ctest-result.xml junit: build.${CEPCSW_LCG_VERSION}.${CEPCSW_LCG_PLATFORM}/cepcsw-ctest-result.xml
dependencies:
- build:lcg:el7
############################################################################## ##############################################################################
# Build the docs # Build the docs
...@@ -74,4 +92,4 @@ build:docs: ...@@ -74,4 +92,4 @@ build:docs:
- bash ./.build.ci.sh docs - bash ./.build.ci.sh docs
artifacts: artifacts:
paths: paths:
- docs/build/html/ - docs/build/html/
\ No newline at end of file
...@@ -43,4 +43,9 @@ echo "CEPCSW_BLDTOOL: ${CEPCSW_BLDTOOL}" ...@@ -43,4 +43,9 @@ echo "CEPCSW_BLDTOOL: ${CEPCSW_BLDTOOL}"
source setup.sh source setup.sh
# reconfigure if directory change
pushd $(build-dir)
cmake ..
popd
ctest --output-junit $(junit-output) --test-dir $(build-dir) ctest --output-junit $(junit-output) --test-dir $(build-dir)
...@@ -38,7 +38,7 @@ endif() ...@@ -38,7 +38,7 @@ endif()
# By default, it is RelWithDebInfo since Sept 6th, 2024. # By default, it is RelWithDebInfo since Sept 6th, 2024.
if (NOT CMAKE_CONFIGURATION_TYPES) if (NOT CMAKE_CONFIGURATION_TYPES)
if (NOT CMAKE_BUILD_TYPE) if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo set(CMAKE_BUILD_TYPE Release
CACHE STRING "Choose the type of build, options are: None|Release|MinSizeRel|Debug|RelWithDebInfo" FORCE) CACHE STRING "Choose the type of build, options are: None|Release|MinSizeRel|Debug|RelWithDebInfo" FORCE)
else() else()
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment