|
| 1 | +include: |
| 2 | + - remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml' |
| 3 | + |
| 4 | +stages: |
| 5 | + - build_deps |
| 6 | + - build |
| 7 | + - test |
| 8 | + |
| 9 | +variables: |
| 10 | + # The base image is the py26.01 alps3 image from docs.cscs.ch |
| 11 | + BASE_IMAGE: ghcr.io/eth-cscs/alps-images:py26.01-alps3-base |
| 12 | + SPACK_SHA: develop |
| 13 | + SPACK_PACKAGES_SHA: main |
| 14 | + FF_TIMESTAMPS: true |
| 15 | + |
| 16 | +.build_deps_template: |
| 17 | + stage: build_deps |
| 18 | + timeout: 1 hours |
| 19 | + before_script: |
| 20 | + - echo $DOCKERHUB_TOKEN | podman login docker.io -u $DOCKERHUB_USERNAME --password-stdin || true |
| 21 | + - export DOCKERFILE_SHA=`sha256sum .cscs-ci/container/deps.Containerfile | head -c 16` |
| 22 | + - export ENV_FILE_SHA=`sha256sum ${SPACK_ENV_FILE} | head -c 16` |
| 23 | + - export CONFIG_TAG=`echo $DOCKERFILE_SHA-$BASE_IMAGE-$SPACK_SHA-$SPACK_PACKAGES_SHA-$ENV_FILE_SHA | sha256sum - | head -c 16` |
| 24 | + - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/oomph-spack-deps-$BACKEND:$CONFIG_TAG |
| 25 | + - echo -e "CONFIG_TAG=$CONFIG_TAG" >> base-${BACKEND}.env |
| 26 | + - echo -e "DEPS_IMAGE=$PERSIST_IMAGE_NAME" >> base-${BACKEND}.env |
| 27 | + variables: |
| 28 | + DOCKERFILE: .cscs-ci/container/deps.Containerfile |
| 29 | + DOCKER_BUILD_ARGS: '["SPACK_SHA", "SPACK_PACKAGES_SHA", "SPACK_ENV_FILE"]' |
| 30 | + artifacts: |
| 31 | + reports: |
| 32 | + dotenv: base-${BACKEND}.env |
| 33 | + |
| 34 | +build_deps_nccl: |
| 35 | + extends: |
| 36 | + - .container-builder-cscs-gh200 |
| 37 | + - .build_deps_template |
| 38 | + variables: |
| 39 | + BACKEND: nccl |
| 40 | + SPACK_ENV_FILE: .cscs-ci/spack/nccl.yaml |
| 41 | + |
| 42 | +build_deps_mpi: |
| 43 | + extends: |
| 44 | + - .container-builder-cscs-gh200 |
| 45 | + - .build_deps_template |
| 46 | + variables: |
| 47 | + BACKEND: mpi |
| 48 | + SPACK_ENV_FILE: .cscs-ci/spack/mpi.yaml |
| 49 | + |
| 50 | +build_deps_ucx: |
| 51 | + extends: |
| 52 | + - .container-builder-cscs-gh200 |
| 53 | + - .build_deps_template |
| 54 | + variables: |
| 55 | + BACKEND: ucx |
| 56 | + SPACK_ENV_FILE: .cscs-ci/spack/ucx.yaml |
| 57 | + |
| 58 | +build_deps_libfabric: |
| 59 | + extends: |
| 60 | + - .container-builder-cscs-gh200 |
| 61 | + - .build_deps_template |
| 62 | + variables: |
| 63 | + BACKEND: libfabric |
| 64 | + SPACK_ENV_FILE: .cscs-ci/spack/libfabric.yaml |
| 65 | + |
| 66 | +.build_template: |
| 67 | + stage: build |
| 68 | + extends: .container-builder-cscs-gh200 |
| 69 | + timeout: 1 hours |
| 70 | + before_script: |
| 71 | + - echo $DOCKERHUB_TOKEN | podman login docker.io -u $DOCKERHUB_USERNAME --password-stdin || true |
| 72 | + - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/oomph-build-$BACKEND:$CI_COMMIT_SHA |
| 73 | + - echo -e "BUILD_IMAGE=$PERSIST_IMAGE_NAME" >> build-${BACKEND}.env |
| 74 | + variables: |
| 75 | + DOCKERFILE: .cscs-ci/container/build.Containerfile |
| 76 | + DOCKER_BUILD_ARGS: '["DEPS_IMAGE"]' |
| 77 | + artifacts: |
| 78 | + reports: |
| 79 | + dotenv: build-${BACKEND}.env |
| 80 | + |
| 81 | +build_nccl: |
| 82 | + extends: .build_template |
| 83 | + needs: |
| 84 | + - job: build_deps_nccl |
| 85 | + artifacts: true |
| 86 | + variables: |
| 87 | + BACKEND: nccl |
| 88 | + |
| 89 | +build_mpi: |
| 90 | + extends: .build_template |
| 91 | + needs: |
| 92 | + - job: build_deps_mpi |
| 93 | + artifacts: true |
| 94 | + variables: |
| 95 | + BACKEND: mpi |
| 96 | + |
| 97 | +build_ucx: |
| 98 | + extends: .build_template |
| 99 | + needs: |
| 100 | + - job: build_deps_ucx |
| 101 | + artifacts: true |
| 102 | + variables: |
| 103 | + BACKEND: ucx |
| 104 | + |
| 105 | +build_libfabric: |
| 106 | + extends: .build_template |
| 107 | + needs: |
| 108 | + - job: build_deps_libfabric |
| 109 | + artifacts: true |
| 110 | + variables: |
| 111 | + BACKEND: libfabric |
| 112 | + |
| 113 | +.test_serial_template: |
| 114 | + stage: test |
| 115 | + extends: .container-runner-clariden-gh200 |
| 116 | + variables: |
| 117 | + SLURM_JOB_NUM_NODES: 1 |
| 118 | + SLURM_NTASKS: 1 |
| 119 | + SLURM_TIMELIMIT: '00:15:00' |
| 120 | + SLURM_PARTITION: normal |
| 121 | + script: |
| 122 | + - ctest --test-dir build -L "serial" --output-on-failure |
| 123 | + |
| 124 | +.test_parallel_template: |
| 125 | + stage: test |
| 126 | + extends: .container-runner-clariden-gh200 |
| 127 | + variables: |
| 128 | + SLURM_JOB_NUM_NODES: 1 |
| 129 | + SLURM_NTASKS: 4 |
| 130 | + SLURM_TIMELIMIT: '00:15:00' |
| 131 | + SLURM_PARTITION: normal |
| 132 | + SLURM_MPI: pmix |
| 133 | + MPICH_GPU_SUPPORT_ENABLED: 1 |
| 134 | + script: |
| 135 | + - srun -n 4 ctest --test-dir build -L "parallel-ranks-4" --output-on-failure |
| 136 | + |
| 137 | +test_serial_nccl: |
| 138 | + extends: .test_serial_template |
| 139 | + needs: |
| 140 | + - job: build_nccl |
| 141 | + artifacts: true |
| 142 | + image: $BUILD_IMAGE |
| 143 | + |
| 144 | +test_parallel_nccl: |
| 145 | + extends: .test_parallel_template |
| 146 | + needs: |
| 147 | + - job: build_nccl |
| 148 | + artifacts: true |
| 149 | + image: $BUILD_IMAGE |
| 150 | + |
| 151 | +test_serial_mpi: |
| 152 | + extends: .test_serial_template |
| 153 | + needs: |
| 154 | + - job: build_mpi |
| 155 | + artifacts: true |
| 156 | + image: $BUILD_IMAGE |
| 157 | + |
| 158 | +test_parallel_mpi: |
| 159 | + extends: .test_parallel_template |
| 160 | + needs: |
| 161 | + - job: build_mpi |
| 162 | + artifacts: true |
| 163 | + image: $BUILD_IMAGE |
| 164 | + |
| 165 | +test_serial_ucx: |
| 166 | + extends: .test_serial_template |
| 167 | + needs: |
| 168 | + - job: build_ucx |
| 169 | + artifacts: true |
| 170 | + image: $BUILD_IMAGE |
| 171 | + |
| 172 | +test_parallel_ucx: |
| 173 | + extends: .test_parallel_template |
| 174 | + needs: |
| 175 | + - job: build_ucx |
| 176 | + artifacts: true |
| 177 | + image: $BUILD_IMAGE |
| 178 | + |
| 179 | +test_serial_libfabric: |
| 180 | + extends: .test_serial_template |
| 181 | + needs: |
| 182 | + - job: build_libfabric |
| 183 | + artifacts: true |
| 184 | + image: $BUILD_IMAGE |
| 185 | + |
| 186 | +test_parallel_libfabric: |
| 187 | + extends: .test_parallel_template |
| 188 | + needs: |
| 189 | + - job: build_libfabric |
| 190 | + artifacts: true |
| 191 | + image: $BUILD_IMAGE |
0 commit comments