diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 374f3c72733dcf7e4029684e7bd880535adaadbf..e765a938f676e5b6eb943d137a7552f74496ed03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,37 @@ -image: gitlab-registry.cern.ch/ci-tools/ci-worker:cc7 - -compilation: +LCG: stage: build tags: - cvmfs variables: TERM: xterm script: - - yum install -y cmake3 openssl-devel python3 zsh - - source ./setup + - yum install -y cmake python3 zsh which libtirpc libicu libglvnd-glx pcre2-utf16 libXrender libSM + - source /cvmfs/sft.cern.ch/lcg/views/LCG_104/x86_64-el9-gcc13-opt/setup.sh + - ./install.sh + - source tools/setup.sh + - (cd Darwin.build; ctest --output-junit ../test_report.xml) + - (cd Core.build; ctest --output-junit ../test_report.xml) + artifacts: + when: always + paths: + - test_report.xml + reports: + junit: test_report.xml + +micromamba: + stage: build + script: + - sh <(curl -L micro.mamba.pm/install.sh) + - source ~/.bashrc + - micromamba create -f prerequisites.yml -n DAS -y + - micromamba activate DAS - ./install.sh - - cd CMSSW*/ - - shopt -s expand_aliases # allows aliases like cmsenv to be used - - cmsenv - - python -c "import CRABAPI" - - scram b -j$(nproc) + - source tools/setup.sh + - (cd Darwin.build; ctest --output-junit ../test_report.xml) + - (cd Core.build; ctest --output-junit ../test_report.xml) + artifacts: + when: always + paths: + - test_report.xml + reports: + junit: test_report.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index b84c00f1ab9ace7ebfdb6d9fd1ca8807771c5aff..f4ce72ce584bc35f0227a2d645e837428f4272e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,6 @@ ExternalProject_Add(Darwin CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} BINARY_DIR "${CMAKE_SOURCE_DIR}/Darwin.build" INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" - TEST_AFTER_INSTALL ON ) configure_file(darwin.xml.in darwin.xml) install(FILES "${CMAKE_BINARY_DIR}/darwin.xml" TYPE SYSCONF) diff --git a/README.md b/README.md index 34acc8fb54a67d89d9b169c17687321f9c848800..beeb8f38dd3cd341c0f2b7c7f26788d5534bd041 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ cmake --build Core.build --target install It is good practice to check that your changes do not harm the rest of the code. For this, tests can be run as follows: ``` cd $DAS_BASE/Core.build -ctest . +ctest ``` (analog to `cd $CMSSW_BASE; scram b runtests`.) diff --git a/install.sh b/install.sh index 0e0570ef0ae9b80136837f69d78805ee22c7c965..71a50904f2ec79a89b69c98e46c69594f8be47f8 100755 --- a/install.sh +++ b/install.sh @@ -31,7 +31,7 @@ fi set -x # Download and build supporting tools -cmake -B build +cmake -B build $(correction config --cmake) cmake --build build --target install -j$(nproc) ## Get a CMSSW if we don't have one diff --git a/prerequisites.yml b/prerequisites.yml new file mode 100644 index 0000000000000000000000000000000000000000..7688d81f4479a5b79dadfde94e88621463e9e710 --- /dev/null +++ b/prerequisites.yml @@ -0,0 +1,16 @@ +channels: + - conda-forge +dependencies: + - zsh + - python >= 3.9 + - cmake >= 3.26 + - boost >= 1.78 + - libgit2 + - root + - gxx + - correctionlib + - eigen + - git-lfs + - doxygen + - pip: + - git+https://gitlab.cern.ch/RooUnfold/RooUnfold@master diff --git a/setup b/setup index 60acbf16b1850e0aa64358b1a21f9c8ba23f4e7b..da20ab3cd7f1a9f5771c4fcb923b9c80bdbd8cce 100644 --- a/setup +++ b/setup @@ -25,6 +25,11 @@ case "$(hostname)" in ;; esac +if [ "$CI" = "true" ] +then + return +fi + source /cvmfs/cms.cern.ch/rucio/setup-py3.sh source /cvmfs/cms.cern.ch/crab3/crab.sh