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
......@@ -51,6 +51,7 @@ variables:
stages:
- config
- base ## base OS image
- generate ## spack ci generate
- jug ## jug container images
- deploy ## build/deploy singularity images
- test
......@@ -212,6 +213,28 @@ base:
containers/debian
- !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:
parallel:
matrix:
......
......@@ -34,8 +34,6 @@ RUN echo "Part 1: regular spack install (as in containerize)" \
&& if [ -n "$SPACK_CHERRYPICKS" ] ; then \
git -C ${SPACK_ROOT} cherry-pick -n $SPACK_CHERRYPICKS ; \
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 \
/usr/sbin/docker-shell \
&& ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
......@@ -43,18 +41,13 @@ RUN echo "Part 1: regular spack install (as in containerize)" \
&& ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
/usr/sbin/spack-env \
&& echo "Part 2: Set target to generic x86_64" \
&& echo "packages:" > $SPACK_ROOT/etc/spack/packages.yaml \
&& echo " all:" >> $SPACK_ROOT/etc/spack/packages.yaml \
&& echo " target: [x86_64]" >> $SPACK_ROOT/etc/spack/packages.yaml \
&& spack config --scope site add "packages:all:target:[x86_64]" \
&& cat $SPACK_ROOT/etc/spack/packages.yaml \
&& echo "Part 3: Set config to allow use of more cores for builds" \
&& echo "(and some other settings)" \
&& echo "config:" > $SPACK_ROOT/etc/spack/config.yaml \
&& echo " suppress_gpg_warnings: true" \
>> $SPACK_ROOT/etc/spack/config.yaml \
&& 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 \
&& spack config --scope site add "config:suppress_gpg_warnings:true" \
&& spack config --scope site add "config:build_jobs:64" \
&& spack config --scope site add "config:install_tree:root:/opt/software" \
&& cat $SPACK_ROOT/etc/spack/config.yaml
SHELL ["docker-shell"]
......
spack:
repos:
- $spack/var/spack/repos/eic-spack
specs:
- acts@19.10.0 +dd4hep +identification +json +tgeo +ipo +examples +fatras +geant4 +python
- actsvg@0.4.26 +examples
......@@ -48,11 +51,30 @@ spack:
- stow@2.3.1
- tensorflow-lite@2.8.0 -xnnpack
- xrootd@5.3.2 cxxstd=17 +python
concretizer:
unify: true
packages:
all:
compiler: [gcc]
target: [x86_64]
variants:
build_type=Release
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