Skip to content
Snippets Groups Projects
Commit f816f992 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: use spack ci generate to setup build pipeline

parent 76284b4f
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !410. Comments created here will be created in the context of that merge request.
...@@ -51,6 +51,7 @@ variables: ...@@ -51,6 +51,7 @@ variables:
stages: stages:
- config - config
- base ## base OS image - base ## base OS image
- generate ## spack ci generate
- jug ## jug container images - jug ## jug container images
- deploy ## build/deploy singularity images - deploy ## build/deploy singularity images
- test - test
...@@ -212,6 +213,28 @@ base: ...@@ -212,6 +213,28 @@ base:
containers/debian containers/debian
- !reference [.build, script] - !reference [.build, script]
generate-pipeline:
stage: generate
tags:
- docker-new
image:
name: eicweb.phy.anl.gov:4567/containers/eic_container/debian_testing_base
entrypoint: [""]
before_script:
- git clone ${SPACK_REPO} spack
- git -C spack checkout ${SPACK_VERSION}
- . "./spack/share/spack/setup-env.sh"
- git clone ${EICSPACK_REPO} ${SPACK_ROOT}/var/spack/repos/eic-spack
- git -C ${SPACK_ROOT}/var/spack/repos/eic-spack checkout ${EICSPACK_VERSION}
script:
- spack env activate --without-view .
- spack -d ci generate
--artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
--output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/pipeline.yml"
artifacts:
paths:
- "${CI_PROJECT_DIR}/jobs_scratch_dir"
jug_dev:default: jug_dev:default:
parallel: parallel:
matrix: matrix:
......
...@@ -34,8 +34,6 @@ RUN echo "Part 1: regular spack install (as in containerize)" \ ...@@ -34,8 +34,6 @@ RUN echo "Part 1: regular spack install (as in containerize)" \
&& if [ -n "$SPACK_CHERRYPICKS" ] ; then \ && if [ -n "$SPACK_CHERRYPICKS" ] ; then \
git -C ${SPACK_ROOT} cherry-pick -n $SPACK_CHERRYPICKS ; \ git -C ${SPACK_ROOT} cherry-pick -n $SPACK_CHERRYPICKS ; \
fi \ fi \
&& echo 'export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH'\
>> $SPACK_ROOT/share/setup-env.sh \
&& ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
/usr/sbin/docker-shell \ /usr/sbin/docker-shell \
&& ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
...@@ -43,18 +41,13 @@ RUN echo "Part 1: regular spack install (as in containerize)" \ ...@@ -43,18 +41,13 @@ RUN echo "Part 1: regular spack install (as in containerize)" \
&& ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
/usr/sbin/spack-env \ /usr/sbin/spack-env \
&& echo "Part 2: Set target to generic x86_64" \ && echo "Part 2: Set target to generic x86_64" \
&& echo "packages:" > $SPACK_ROOT/etc/spack/packages.yaml \ && spack config --scope site add "packages:all:target:[x86_64]" \
&& echo " all:" >> $SPACK_ROOT/etc/spack/packages.yaml \
&& echo " target: [x86_64]" >> $SPACK_ROOT/etc/spack/packages.yaml \
&& cat $SPACK_ROOT/etc/spack/packages.yaml \ && cat $SPACK_ROOT/etc/spack/packages.yaml \
&& echo "Part 3: Set config to allow use of more cores for builds" \ && echo "Part 3: Set config to allow use of more cores for builds" \
&& echo "(and some other settings)" \ && echo "(and some other settings)" \
&& echo "config:" > $SPACK_ROOT/etc/spack/config.yaml \ && spack config --scope site add "config:suppress_gpg_warnings:true" \
&& echo " suppress_gpg_warnings: true" \ && spack config --scope site add "config:build_jobs:64" \
>> $SPACK_ROOT/etc/spack/config.yaml \ && spack config --scope site add "config:install_tree:root:/opt/software" \
&& echo " build_jobs: 64" >> $SPACK_ROOT/etc/spack/config.yaml \
&& echo " install_tree:" >> $SPACK_ROOT/etc/spack/config.yaml \
&& echo " root: /opt/software" >> $SPACK_ROOT/etc/spack/config.yaml \
&& cat $SPACK_ROOT/etc/spack/config.yaml && cat $SPACK_ROOT/etc/spack/config.yaml
SHELL ["docker-shell"] SHELL ["docker-shell"]
......
spack: spack:
repos:
- $spack/var/spack/repos/eic-spack
specs: specs:
- acts@19.10.0 +dd4hep +identification +json +tgeo +ipo +examples +fatras +geant4 +python - acts@19.10.0 +dd4hep +identification +json +tgeo +ipo +examples +fatras +geant4 +python
- actsvg@0.4.26 +examples - actsvg@0.4.26 +examples
...@@ -48,11 +51,30 @@ spack: ...@@ -48,11 +51,30 @@ spack:
- stow@2.3.1 - stow@2.3.1
- tensorflow-lite@2.8.0 -xnnpack - tensorflow-lite@2.8.0 -xnnpack
- xrootd@5.3.2 cxxstd=17 +python - xrootd@5.3.2 cxxstd=17 +python
concretizer: concretizer:
unify: true unify: true
packages: packages:
all: all:
compiler: [gcc] compiler: [gcc]
target: [x86_64]
variants: variants:
build_type=Release build_type=Release
view: /usr/local view: /usr/local
mirrors: { "eic-spack": "s3://eictest/EPIC/spack" }
gitlab-ci:
before_script:
- git clone ${SPACK_REPO} spack
- git -C spack checkout ${SPACK_VERSION}
- . "./spack/share/spack/setup-env.sh"
- git clone ${EICSPACK_REPO} ${SPACK_ROOT}/var/spack/repos/eic-spack
- git -C ${SPACK_ROOT}/var/spack/repos/eic-spack checkout ${EICSPACK_VERSION}
script:
- pushd ${SPACK_CONCRETE_ENV_DIR} && spack env activate --without-view . && popd
- spack -d ci rebuild
enable-artifacts-buildcache: False
rebuild-index: True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment