Skip to content

Commit

Permalink
ci: Use new apptainer executable
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisklein committed Jul 3, 2024
1 parent 57ec82e commit 16cdd6f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
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-2023 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 @@ -32,7 +32,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()
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
2 changes: 1 addition & 1 deletion test/test-start-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fi

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

Expand Down

0 comments on commit 16cdd6f

Please sign in to comment.