Skip to content
Snippets Groups Projects

add spack post-installation testing

Merged Eleni Mathioulaki requested to merge test-spacktests-workaround into master
1 file
+ 15
13
Compare changes
  • Side-by-side
  • Inline
+ 15
13
@@ -169,10 +169,8 @@ build-spack-env-on-runner:
SPACK_DEV_PATH: $CI_PROJECT_DIR/spack
SPACK_USER_CACHE_PATH: $CI_PROJECT_DIR/.spack
SPACK_USER_CONFIG_PATH: $CI_PROJECT_DIR/.spack
TMP: $CI_PROJECT_DIR/.spack-tmp
script:
- git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch $SPACK_VERSION https://github.com/spack/spack $SPACK_DEV_PATH
- mkdir $TMP
- cp packages.yaml $SPACK_DEV_PATH/etc/spack/packages.yaml
- |
cat <<EOF > $SPACK_DEV_PATH/etc/spack/defaults/upstreams.yaml
@@ -191,18 +189,20 @@ build-spack-env-on-runner:
- spack concretize -f --fresh || (echo "Concretization failed"; exit 1)
- rm $SPACK_ROOT/var/spack/environments/$SPACK_DEV_ENV/spack.lock
- spack config --scope env:$SPACK_DEV_ENV add concretizer:unify:when_possible
- spack install -y --fresh --no-check-signature --test root
- spack install -y --fresh --no-check-signature --test root --keep-stage
after_script:
- cp --parents /tmp/$(whoami)/spack-stage/*/*.txt ./
- mv ./tmp/$(whoami)/spack-stage spack-logs
artifacts:
paths:
- spack-logs
when: always
# cache:
# key: spack-cache-$CI_COMMIT_REF_SLUG
# paths:
# - "$SPACK_DEV_PATH"
# - "$SPACK_USER_CONFIG_PATH"
# when: always
timeout: 1 day
artifacts:
paths:
- .spack-tmp/root/spack-stage/spack-stage-*/*.txt
when: on_failure
sync-gitlab-spack-instance:
stage: build
@@ -231,7 +231,7 @@ sync-gitlab-spack-instance:
- spack load gcc@10.3.0
- spack compiler find
- spack compiler list
- spack install python@3.8.11 %gcc@10.3.0 || (cp -r /tmp/spack/spack-stage $CI_PROJECT_DIR/build_logs; exit 1)
- spack install --keep-stage python@3.8.11 %gcc@10.3.0
# - for section in $(spack config list); do spack config blame $section; done
- mkdir -p $SPACK_REPO_PATH && cp -r -t $SPACK_REPO_PATH $CI_PROJECT_DIR/{packages,repo.yaml}
- spack repo list | grep -q ebrains-spack-builds && echo "Repository registered already" || spack repo add $SPACK_REPO_PATH
@@ -250,15 +250,17 @@ sync-gitlab-spack-instance:
- spack concretize -f --fresh || (echo "Concretization failed"; exit 1)
- rm $SPACK_ROOT/var/spack/environments/$SPACK_NFS_ENV/spack.lock
- spack config --scope env:$SPACK_NFS_ENV add concretizer:unify:when_possible
- spack install -y --fresh --no-check-signature --test root || (cp -r /tmp/spack/spack-stage $CI_PROJECT_DIR/build_logs; exit 1)
- spack install -y --fresh --no-check-signature --test root --keep-stage
- spack module tcl refresh -y
- spack reindex
- spack env loads -r
timeout: 2 days
after_script:
- cp --parents /tmp/$(whoami)/spack-stage/*/*.txt ./
- mv ./tmp/$(whoami)/spack-stage spack-logs
artifacts:
paths:
- build_logs/spack-stage-*/*.txt
when: on_failure
- spack-logs
when: always
rules:
- if: '$CI_COMMIT_BRANCH =~ /test-spacktests-workaround/ && $CI_PROJECT_NAMESPACE =~ /technical-coordination/'
when: manual