Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scitas-software-stacks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
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
SCITAS
Software stack
scitas-software-stacks
Commits
ba470a00
Commit
ba470a00
authored
1 year ago
by
Nicolas Richart
Browse files
Options
Downloads
Patches
Plain Diff
Trying to use caches it is more portable to other types of runners
parent
82c1e6cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+23
-14
23 additions, 14 deletions
.gitlab-ci.yml
with
23 additions
and
14 deletions
.gitlab-ci.yml
+
23
−
14
View file @
ba470a00
...
...
@@ -35,33 +35,39 @@ variables:
-
stack
variables
:
COMMAND_OPTIONS_SBATCH
:
${slurm_options}
APPTAINER_EXEC_OPTIONS
:
${apptainer_options} --bind ${BUILDCACHE}:/buildcache:rw --bind
${SPACK_PATH}:/spack:rw --bind
${STACK_PATH}:/stack:rw --writable-tmpfs
APPTAINER_EXEC_OPTIONS
:
${apptainer_options} --bind ${BUILDCACHE}:/buildcache:rw --bind ${STACK_PATH}:/stack:rw --writable-tmpfs
SPACK_DISABLE_LOCAL_CONFIG
:
"
true"
SPACK_USER_CACHE_PATH
:
"
/tmp/spack_cache_${CI_JOB_ID}"
SPACK_SITE_CONFIG_PATH
:
"
/stack/spack/etc"
BUILDCACHE
:
"
/work/scitas-ge/richart/ci/buildcache"
SPACK_PATH
:
"
/work/scitas-ge/richart/ci/${environment}/spack"
STACK_PATH
:
"
/work/scitas-ge/richart/ci/${environment}/stack"
.spack_cache
:
-
key
:
${environment}-spack-cache
policy
:
pull-push
untracked
:
true
# ------------------------------------------------------------------------------
spack:setup
:
stage
:
environment
extends
:
-
.spack_cache
-
.parallel_job
script
:
-
SPACK_VERSION=$(jq -r .spack.version config.json)
-
|
if [ ! -d
/spack/
spack ]; then
git clone https://github.com/spack/spack.git -b $SPACK_VERSION
/spack/
spack
if [ ! -d spack ]; then
git clone https://github.com/spack/spack.git -b $SPACK_VERSION spack
else
cd
/spack/
spack
cd spack
git fetch
git checkout $SPACK_VERSION
cd -
fi
-
/spack/
spack/bin/spack gpg trust $GPG_PRIVATE_KEY
-
spack/bin/spack gpg trust $GPG_PRIVATE_KEY
-
|
mkdir -p /stack/extra_repos/
...
...
@@ -86,7 +92,7 @@ spack:setup:
-
|
if [ ! -d /buildcache/build_cache ]; then
/spack/
spack/bin/spack gpg publish -d /buildcache
spack/bin/spack gpg publish -d /buildcache
fi
-
mkdir -p /stack/spack/etc
...
...
@@ -103,19 +109,20 @@ spack:setup:
spack:install_compilers
:
stage
:
compilers
extends
:
-
.spack_cache
-
.parallel_job
script
:
-
COMPILER_LIST_SPECS=$(jq -r '.stack | .core_compiler as $core | .compilers | map("\(.spec)@\(.version) %\($core)")[]' config.json)
-
echo "Compilers to install ${COMPILER_LIST_SPECS}"
-
/spack/
spack/bin/spack spec
-
spack/bin/spack spec
--install-status
--namespaces
--long
--types
${COMPILER_LIST_SPECS}
-
/spack/
spack/bin/spack install
-
spack/bin/spack install
--log-file spack-install.xml
--log-format junit
--fail-fast
...
...
@@ -123,7 +130,7 @@ spack:install_compilers:
--use-cache
${COMPILER_LIST_SPECS}
-
/spack/
spack/bin/spack buildcache create
-
spack/bin/spack buildcache create
--update-index
--key EDC904DCE3D2E84E
/buildcache ${COMPILER_LIST_SPECS}
...
...
@@ -131,12 +138,12 @@ spack:install_compilers:
-
|
echo 'definitions: [ compilers: [' ${COMPILER_LIST_SPECS} ']]' > compiler_definitions.yaml
-
/spack/
spack/bin/spack compiler find --scope site /usr
-
spack/bin/spack compiler find --scope site /usr
-
|
while read -r compiler
do
/spack/
spack/bin/spack compiler find --scope site $(
/spack/
spack/bin/spack location -i ${compiler})
spack/bin/spack compiler find --scope site $(spack/bin/spack location -i ${compiler})
done <<< $(echo "${COMPILER_LIST_SPECS}")
artifacts
:
reports
:
...
...
@@ -147,9 +154,10 @@ spack:install_compilers:
spack:concretize
:
stage
:
concretize
extends
:
-
.spack_cache
-
.parallel_job
script
:
-
/spack/
spack/bin/spack -e . concretize
-
spack/bin/spack -e . concretize
needs
:
-
job
:
spack:install_compilers
artifacts
:
...
...
@@ -159,9 +167,10 @@ spack:concretize:
spack:install
:
stage
:
install
extends
:
-
.spack_cache
-
.parallel_job
script
:
-
/spack/
spack/bin/spack -e . install
-
spack/bin/spack -e . install
--log-file spack-install.xml
--log-format junit
--only-concrete
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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