Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
35
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
ebrains-spack-builds
Commits
90629a74
Commit
90629a74
authored
2 years ago
by
Eleni Mathioulaki
Browse files
Options
Downloads
Patches
Plain Diff
update to Spack v0.19.2
parent
802d3bbc
No related branches found
No related tags found
2 merge requests
!330
create new experimental release
,
!320
use Spack v0.19.2
Pipeline
#22435
failed with stage
in 1 day, 10 hours, 4 minutes, and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+12
-15
12 additions, 15 deletions
.gitlab-ci.yml
with
12 additions
and
15 deletions
.gitlab-ci.yml
+
12
−
15
View file @
90629a74
...
...
@@ -2,8 +2,9 @@ stages:
-
build
variables
:
SPACK_VERSION
:
v0.19.0
BUILD_ENV_DOCKER_IMAGE
:
docker-registry.ebrains.eu/tc/ebrains-spack-build-env/okd:okd_22.12
SPACK_VERSION
:
v0.19.2
SPACK_PATH_GITLAB
:
/mnt/spack_v0.19.2
# start an OpenShift Job that will build the Spack environment
.deploy-build-environment
:
...
...
@@ -168,16 +169,14 @@ build-spack-env-on-runner:
script
:
-
git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch $SPACK_VERSION https://github.com/spack/spack $SPACK_DEV_PATH
-
cp packages.yaml $SPACK_DEV_PATH/etc/spack/packages.yaml
# SPACK PATCH: see https://github.com/spack/spack/pull/35290
-
sed -i 's/solver.solve(abstract_specs)/solver.solve(abstract_specs, tests=kwargs.get("tests", False))/g' $SPACK_DEV_PATH/lib/spack/spack/concretize.py
# SPACK PATCH: the post-build logs on install-time-test-logs.txt gets ovewritten by the post-install logs.
# quick fix for that: (TODO: investigate more and open PR)
-
sed -i "s/self.file_like,
'w'
/self.file_like,
'a'
/g" $SPACK_DEV_PATH/lib/spack/llnl/util/tty/log.py
-
sed -i "s/self.file_like,
\"w\"
/self.file_like,
\"a\"
/g" $SPACK_DEV_PATH/lib/spack/llnl/util/tty/log.py
-
|
cat <<EOF > $SPACK_DEV_PATH/etc/spack/defaults/upstreams.yaml
upstreams:
ebrains-gitlab-spack-instance:
install_tree:
/mnt/spack_v0.19.0
/opt/spack
install_tree:
$SPACK_PATH_GITLAB/spack
/opt/spack
EOF
-
. $SPACK_DEV_PATH/share/spack/setup-env.sh
-
spack find
...
...
@@ -228,25 +227,23 @@ sync-gitlab-spack-instance:
image
:
docker-registry.ebrains.eu/tc/ebrains-spack-build-env/gitlab_runners_nfs:devel
variables
:
SPACK_NFS_ENV
:
ebrains-runner-build
SPACK_PATH
:
/mnt/spack_v0.19.0
SPACK_PATH
:
$SPACK_PATH_GITLAB
SPACK_USER_CACHE_PATH
:
$SPACK_PATH/.spack
SPACK_USER_CONFIG_PATH
:
$SPACK_PATH/.spack
SPACK_REPO_PATH
:
$SPACK_PATH/ebrains-spack-builds
script
:
# clone spack if it doesn't exist
-
|
if [ ! -d $SPACK_PATH ]; then
git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch $SPACK_VERSION https://github.com/spack/spack $SPACK_PATH
if [ ! -d $SPACK_PATH
/spack
]; then
git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch $SPACK_VERSION https://github.com/spack/spack $SPACK_PATH
/spack
fi
# SPACK PATCH: see https://github.com/spack/spack/pull/35290
-
sed -i 's/solver.solve(abstract_specs)/solver.solve(abstract_specs, tests=kwargs.get("tests", False))/g' $SPACK_PATH/lib/spack/spack/concretize.py
# SPACK PATCH: the post-build logs on install-time-test-logs.txt gets ovewritten by the post-install logs.
# quick fix for that: (TODO: investigate more and open PR)
-
sed -i "s/self.file_like,
'w'
/self.file_like,
'a'
/g" $SPACK_PATH/lib/spack/llnl/util/tty/log.py
-
sed -i "s/self.file_like,
\"w\"
/self.file_like,
\"a\"
/g" $SPACK_PATH/
spack/
lib/spack/llnl/util/tty/log.py
# copy package settings
-
cp $CI_PROJECT_DIR/packages.yaml $SPACK_PATH/etc/spack/packages.yaml
-
cp $CI_PROJECT_DIR/packages.yaml $SPACK_PATH/
spack/
etc/spack/packages.yaml
# activate spack
-
. $SPACK_PATH/share/spack/setup-env.sh
-
. $SPACK_PATH/
spack/
share/spack/setup-env.sh
# install compiler (if not already installed)
-
EBRAINS_SPACK_COMPILER=$(grep 'compiler' $CI_PROJECT_DIR/packages.yaml | awk -F'[][]' '{ print $2 }')
-
spack compiler find
...
...
@@ -272,7 +269,7 @@ sync-gitlab-spack-instance:
-
|
# succesfully installed packages: keep the spack logs for any package modified during this CI job
# (we use repo.yaml, that is modified at each start of the pipeline, as a reference file)
SPACK_PACKAGES_DIR=$SPACK_PATH/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
SPACK_PACKAGES_DIR=$SPACK_PATH/
spack/
opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
if find $SPACK_PACKAGES_DIR/*/.spack/*.txt -newer $SPACK_REPO_PATH/repo.yaml -exec cp --parents -r "{}" ./ \;; then
mv .$SPACK_PACKAGES_DIR spack_logs/installed
else
...
...
@@ -289,5 +286,5 @@ sync-gitlab-spack-instance:
-
spack_logs
when
:
always
rules
:
-
if
:
$CI_COMMIT_BRANCH == 'spack-0.19.
0
' && $CI_PROJECT_NAMESPACE =~ /technical-coordination/
-
if
:
$CI_COMMIT_BRANCH == 'spack-0.19.
2
' && $CI_PROJECT_NAMESPACE =~ /technical-coordination/
when
:
manual
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment