Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nov22_patches] Fix HepMC url and update CI #546

Merged
merged 6 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2019-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# Copyright (C) 2019-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# #
# This software is distributed under the terms of the #
# GNU Lesser General Public Licence (LGPL) version 3, #
Expand Down Expand Up @@ -33,7 +33,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(${BUILD_METHOD})

find_program(BASH bash HINTS "/bin")
find_program(SINGULARITY singularity)
if(BASH AND SINGULARITY)
find_program(APPTAINER apptainer)
if(BASH AND APPTAINER)
add_subdirectory(test/container)
endif()
22 changes: 1 addition & 21 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,28 +145,8 @@ pipeline {
""")
}

if (env.CHANGE_ID != null) {
specs_list = [
[os: 'macOS'],
];
} else {
specs_list = [
[os: 'macos-11-x86_64'],
[os: 'macos-12-x86_64'],
[os: 'macos-12-arm64']
];
}

def macos_jobs = jobMatrix('macos', ctestcmd, specs_list)
{ spec, label, jobsh, ctest ->
sh """
hostname -f
export LABEL="${label}"
${ctest}
"""
}
throttle(['long']) {
parallel(linux_jobs + macos_jobs)
parallel(linux_jobs)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions cmake/legacy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ ExternalProject_Add(pythia6
list(APPEND packages hepmc)
set(hepmc_version "2.06.11")
ExternalProject_Add(hepmc
URL https://hepmc.web.cern.ch/hepmc/releases/hepmc${hepmc_version}.tgz
URL https://hepmc.web.cern.ch/releases/hepmc${hepmc_version}.tgz
URL_HASH SHA256=86b66ea0278f803cde5774de8bd187dd42c870367f1cbf6cdaec8dc7cf6afc10
${CMAKE_DEFAULT_ARGS} CMAKE_ARGS
"-Dlength:STRING=CM"
Expand Down Expand Up @@ -514,7 +514,7 @@ add_custom_target(source-cache

include(CTest)

foreach(ver IN ITEMS 18.4 18.6 18.8)
foreach(ver IN ITEMS 18.4 18.6 18.8 19.0)
set(TEST_VERSION v${ver}_patches)
configure_file(test/legacy/fairroot.sh.in ${CMAKE_BINARY_DIR}/test_fairroot_${ver}.sh @ONLY)
add_test(NAME FairRoot_${ver}
Expand Down
6 changes: 3 additions & 3 deletions repos/fairsoft-backports/packages/hepmc/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class Hepmc(CMakePackage):
"""The HepMC package is an object oriented, C++ event record for
High Energy Physics Monte Carlo generators and simulation."""

homepage = "https://hepmc.web.cern.ch/hepmc/"
url = "https://hepmc.web.cern.ch/hepmc/releases/hepmc2.06.11.tgz"
homepage = "https://hepmc.web.cern.ch/"
url = "https://hepmc.web.cern.ch/releases/hepmc2.06.11.tgz"

tags = ['hep']

Expand Down Expand Up @@ -38,5 +38,5 @@ def url_for_version(self, version):
if version <= Version("2.06.08"):
url = "http://lcgapp.cern.ch/project/simu/HepMC/download/HepMC-{0}.tar.gz"
else:
url = "https://hepmc.web.cern.ch/hepmc/releases/hepmc{0}.tgz"
url = "https://hepmc.web.cern.ch/releases/hepmc{0}.tgz"
return url.format(version)
2 changes: 1 addition & 1 deletion test/container/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function(fs_spack_container)

add_custom_command(OUTPUT ${target}
COMMAND ${CMAKE_COMMAND} -E env ${BASH} -c
"${SINGULARITY} build -f -F ${target} ${CMAKE_CURRENT_SOURCE_DIR}/${def} > ${log} 2>&1"
"${APPTAINER} build -f -F ${target} ${CMAKE_CURRENT_SOURCE_DIR}/${def} > ${log} 2>&1"
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building spack container ${target}, logging to ${CMAKE_CURRENT_BINARY_DIR}/${log}"
Expand Down
4 changes: 2 additions & 2 deletions test/container/legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2020-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# Copyright (C) 2020-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# #
# This software is distributed under the terms of the #
# GNU Lesser General Public Licence (LGPL) version 3, #
Expand Down Expand Up @@ -36,7 +36,7 @@ function(fs_legacy_container)

add_custom_command(OUTPUT ${target}
COMMAND ${CMAKE_COMMAND} -E env ${BASH} -c
"${SINGULARITY} build -f -F ${target} ${def} > ${log} 2>&1"
"${APPTAINER} build -f -F ${target} ${def} > ${log} 2>&1"
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building legacy container ${target}, logging to ${CMAKE_CURRENT_BINARY_DIR}/${log}"
Expand Down
6 changes: 3 additions & 3 deletions test/test-start-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ ctestcmd="$2"

# Some default paths:
: ${FS_INSTALLTREE_BASE:="/srv/alfaci/FairSoft/install-tree"}
: ${SINGULARITY_CONTAINER_ROOT:="/cvmfs/fairsoft_dev.gsi.de/ci/for-fairsoft/latest/container"}
: ${CONTAINER_ROOT:="/cvmfs/fairsoft_dev.gsi.de/ci/for-fairsoft/2022-11-24_1730/container"}

image="${SINGULARITY_CONTAINER_ROOT}/${container}"
image="${CONTAINER_ROOT}/${container}"
bindmounts="/etc/environment,/cvmfs,$PWD"

if [ -d "$FS_INSTALLTREE_BASE" ]
Expand Down Expand Up @@ -46,7 +46,7 @@ fi

(
set -x
singularity exec -B"$bindmounts" "$image" bash -l -c "${ctestcmd}"
apptainer exec --writable-tmpfs -B"$bindmounts" "$image" bash -l -c "${ctestcmd}"
)
retval=$?

Expand Down