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

Refactor CSCS CI to avoid duplications #975

Merged
merged 5 commits into from
Jan 24, 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
62 changes: 6 additions & 56 deletions .gitlab/includes/clang11_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,75 +21,25 @@ include:
-DPIKA_WITH_SPINLOCK_DEADLOCK_DETECTION=ON"

clang11_spack_compiler_image:
stage: spack_compiler
needs: [base_spack_image]
extends:
- .container-builder
- .variables_clang11_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$ARCH-$BASE_IMAGE-$COMPILER | sha256sum - | head -c 16`
- compiler=${COMPILER/@/-}
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler:$CONFIG_TAG
- echo -e "compiler=$compiler" >> compiler.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler
DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER"]'
artifacts:
reports:
dotenv: compiler.env
- .compiler_image_template

clang11_spack_image:
stage: spack_dependencies
needs: [clang11_spack_compiler_image]
extends:
- .container-builder
- .variables_clang11_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$BASE_IMAGE-$SPACK_SPEC | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler-dependencies:$CONFIG_TAG
- echo -e "compiler=$compiler" >> dependencies.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> dependencies.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_dependencies
DOCKER_BUILD_ARGS: '["BASE_IMAGE","SPACK_SPEC"]'
artifacts:
reports:
dotenv: dependencies.env
- .dependencies_image_template

clang11_debug_build:
stage: build
needs: [clang11_spack_image]
extends:
- .container-builder
- .variables_clang11_config
- .build_variables_common
- .cmake_variables_common
needs:
- clang11_spack_image
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'`
- configuration=$DOCKERFILE_SHA-$BASE_IMAGE-$BUILD_DIR-$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA-$SOURCE_DIR
- configuration=${configuration//-D/}
- CONFIG_TAG=`echo $configuration | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/pika-$compiler-$build_type-build:$CONFIG_TAG
- echo -e "PERSIST_IMAGE_NAME=$PERSIST_IMAGE_NAME" >> build.env
artifacts:
reports:
dotenv: build.env
- .build_template

clang11_debug_test:
needs: [clang11_debug_build]
extends:
- .variables_clang11_config
- .test_common_mc
- .cmake_variables_common
needs:
- clang11_debug_build
script:
- spack arch
- export CTEST_XML=$PWD/ctest.xml
- trap "${SOURCE_DIR}/.gitlab/scripts/collect_ctest_metrics.sh ${CTEST_XML}" EXIT
- spack -e pika_ci build-env $spack_spec -- bash -c "ctest --output-junit ${CTEST_XML} --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(($(nproc)/2)) --timeout 120 --output-on-failure --no-compress-output --no-tests=error"
image: $PERSIST_IMAGE_NAME
- .test_template
63 changes: 6 additions & 57 deletions .gitlab/includes/clang12_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,76 +25,25 @@ include:
-DPIKA_WITH_THREAD_STEALING_COUNTS=ON"

clang12_spack_compiler_image:
stage: spack_compiler
needs: [base_spack_image]
extends:
- .container-builder
- .variables_clang12_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$ARCH-$BASE_IMAGE-$COMPILER | sha256sum - | head -c 16`
- compiler=${COMPILER/@/-}
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler:$CONFIG_TAG
- echo -e "compiler=$compiler" >> compiler.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler
DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER"]'
artifacts:
reports:
dotenv: compiler.env
- .compiler_image_template

clang12_spack_image:
stage: spack_dependencies
needs: [clang12_spack_compiler_image]
extends:
- .container-builder
- .variables_clang12_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$BASE_IMAGE-$SPACK_SPEC | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler-dependencies:$CONFIG_TAG
- echo -e "compiler=$compiler" >> dependencies.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> dependencies.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_dependencies
DOCKER_BUILD_ARGS: '["BASE_IMAGE","SPACK_SPEC"]'
artifacts:
reports:
dotenv: dependencies.env

- .dependencies_image_template

clang12_debug_build:
stage: build
needs: [clang12_spack_image]
extends:
- .container-builder
- .variables_clang12_config
- .build_variables_common
- .cmake_variables_common
needs:
- clang12_spack_image
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'`
- configuration=$DOCKERFILE_SHA-$BASE_IMAGE-$BUILD_DIR-$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA-$SOURCE_DIR
- configuration=${configuration//-D/}
- CONFIG_TAG=`echo $configuration | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/pika-$compiler-$build_type-build:$CONFIG_TAG
- echo -e "PERSIST_IMAGE_NAME=$PERSIST_IMAGE_NAME" >> build.env
artifacts:
reports:
dotenv: build.env
- .build_template

clang12_debug_test:
needs: [clang12_debug_build]
extends:
- .variables_clang12_config
- .test_common_mc
- .cmake_variables_common
needs:
- clang12_debug_build
script:
- spack arch
- export CTEST_XML=$PWD/ctest.xml
- trap "${SOURCE_DIR}/.gitlab/scripts/collect_ctest_metrics.sh ${CTEST_XML}" EXIT
- spack -e pika_ci build-env $spack_spec -- bash -c "ctest --output-junit ${CTEST_XML} --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(($(nproc)/2)) --timeout 120 --output-on-failure --no-compress-output --no-tests=error"
image: $PERSIST_IMAGE_NAME
- .test_template
62 changes: 6 additions & 56 deletions .gitlab/includes/clang13_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,75 +22,25 @@ include:
-DPIKA_WITH_SPINLOCK_DEADLOCK_DETECTION=ON -DPIKA_WITH_STDEXEC=ON"

clang13_spack_compiler_image:
stage: spack_compiler
needs: [base_spack_image]
extends:
- .container-builder
- .variables_clang13_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$ARCH-$BASE_IMAGE-$COMPILER | sha256sum - | head -c 16`
- compiler=${COMPILER/@/-}
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler:$CONFIG_TAG
- echo -e "compiler=$compiler" >> compiler.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler
DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER"]'
artifacts:
reports:
dotenv: compiler.env
- .compiler_image_template

clang13_spack_image:
stage: spack_dependencies
needs: [clang13_spack_compiler_image]
extends:
- .container-builder
- .variables_clang13_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$BASE_IMAGE-$SPACK_SPEC | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler-dependencies:$CONFIG_TAG
- echo -e "compiler=$compiler" >> dependencies.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> dependencies.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_dependencies
DOCKER_BUILD_ARGS: '["BASE_IMAGE","SPACK_SPEC"]'
artifacts:
reports:
dotenv: dependencies.env
- .dependencies_image_template

clang13_debug_build:
stage: build
needs: [clang13_spack_image]
extends:
- .container-builder
- .variables_clang13_config
- .build_variables_common
- .cmake_variables_common
needs:
- clang13_spack_image
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'`
- configuration=$DOCKERFILE_SHA-$BASE_IMAGE-$BUILD_DIR-$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA-$SOURCE_DIR
- configuration=${configuration//-D/}
- CONFIG_TAG=`echo $configuration | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/pika-$compiler-$build_type-build:$CONFIG_TAG
- echo -e "PERSIST_IMAGE_NAME=$PERSIST_IMAGE_NAME" >> build.env
artifacts:
reports:
dotenv: build.env
- .build_template

clang13_debug_test:
needs: [clang13_debug_build]
extends:
- .variables_clang13_config
- .test_common_mc
- .cmake_variables_common
needs:
- clang13_debug_build
script:
- spack arch
- export CTEST_XML=$PWD/ctest.xml
- trap "${SOURCE_DIR}/.gitlab/scripts/collect_ctest_metrics.sh ${CTEST_XML}" EXIT
- spack -e pika_ci build-env $spack_spec -- bash -c "ctest --output-junit ${CTEST_XML} --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(($(nproc)/2)) --timeout 120 --output-on-failure --no-compress-output --no-tests=error"
image: $PERSIST_IMAGE_NAME
- .test_template
63 changes: 6 additions & 57 deletions .gitlab/includes/clang14_cuda11_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,76 +23,25 @@ include:
-DCMAKE_CUDA_ARCHITECTURES=80 -DPIKA_WITH_CXX_LAMBDA_CAPTURE_DECLTYPE=OFF"

clang14_cuda11_spack_compiler_image:
stage: spack_compiler
timeout: 2 hours
aurianer marked this conversation as resolved.
Show resolved Hide resolved
needs: [base_spack_image]
extends:
- .container-builder
- .variables_clang14_cuda11_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$ARCH-$BASE_IMAGE-$COMPILER | sha256sum - | head -c 16`
- compiler=${COMPILER/@/-}
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler:$CONFIG_TAG
- echo -e "compiler=$compiler" >> compiler.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler
DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER"]'
artifacts:
reports:
dotenv: compiler.env
- .compiler_image_template

clang14_cuda11_spack_image:
stage: spack_dependencies
needs: [clang14_cuda11_spack_compiler_image]
extends:
- .container-builder
- .variables_clang14_cuda11_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$BASE_IMAGE-$SPACK_SPEC | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler-dependencies:$CONFIG_TAG
- echo -e "compiler=$compiler" >> dependencies.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> dependencies.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_dependencies
DOCKER_BUILD_ARGS: '["BASE_IMAGE","SPACK_SPEC"]'
artifacts:
reports:
dotenv: dependencies.env
- .dependencies_image_template

clang14_cuda11_debug_build:
stage: build
needs: [clang14_cuda11_spack_image]
extends:
- .container-builder
- .variables_clang14_cuda11_config
- .build_variables_common
- .cmake_variables_common
needs:
- clang14_cuda11_spack_image
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'`
- configuration=$DOCKERFILE_SHA-$BASE_IMAGE-$BUILD_DIR-$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA-$SOURCE_DIR
- configuration=${configuration//-D/}
- CONFIG_TAG=`echo $configuration | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/pika-$compiler-$build_type-build:$CONFIG_TAG
- echo -e "PERSIST_IMAGE_NAME=$PERSIST_IMAGE_NAME" >> build.env
artifacts:
reports:
dotenv: build.env
- .build_template

clang14_cuda11_debug_test:
needs: [clang14_cuda11_debug_build]
extends:
- .variables_clang14_cuda11_config
- .test_common_gpu_clariden_cuda
- .cmake_variables_common
needs:
- clang14_cuda11_debug_build
script:
- spack arch
- export CTEST_XML=$PWD/ctest.xml
- trap "${SOURCE_DIR}/.gitlab/scripts/collect_ctest_metrics.sh ${CTEST_XML}" EXIT
- spack -e pika_ci build-env $spack_spec -- bash -c "ctest --output-junit ${CTEST_XML} --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(($(nproc)/2)) --timeout 120 --output-on-failure --no-compress-output --no-tests=error"
image: $PERSIST_IMAGE_NAME
- .test_template
Loading
Loading