Skip to content

Using build‐spack‐env.sh from the command line

Patrick Gartung edited this page Feb 4, 2024 · 2 revisions

Building larsoft environment:

Checkout build-framework

git clone -b larsoft-v09_81_00-spack-reqs https://cdcvs.fnal.gov/projects/build-framework
mkdir bundle
cd bundle
cmake ../build-framework

Update versions as needed, check concretization of generated environment yaml files, commit changes to branch and push to repo

Checkout fermi-spack-tools

git clone https://github.com/FNALssi/fermi-spack-tools

Run build-spack-env.sh script with generated environment yaml files.

./fermi-spack-tools/bin/build-spack-env.sh \
--ups=plain --clear-mirrors --cache-write-binaries=all \
'--spack-config-cmd=--scope=site add config:install_tree:padded_length:255' \
--cache-write-sources '--with-cache=scisoft_mirror_sources|https://scisoft.fnal.gov/scisoft/spack-mirror/spack-packages/sources' \ 
--clear-mirrors --with-padding --query-packages --verbosity=DEBUG_4 --spack-version=v0.21.0-fermi \
--fermi-spack-tools-version=main '--spack-repo=https://github.com/FNALssi/fnal_art|larsoft-build' \
'--spack-repo=https://github.com/art-daq/artdaq-spack|develop' '--spack-repo=https://github.com/Mu2e/mu2e-spack|main' \
--cache-write-binaries=roots --no-view /scratch/workspace/SE-667/label1/gcc-11.4.1/bundle/gcc@12.2.0-gcc@11.4.1.yaml \
/scratch/workspace/SE-667/label1/gcc-11.4.1/bundle/critic@2.12.04-gcc@12.2.0-cxx17-prof-gcc@11.4.1.yaml \
/scratch/workspace/SE-667/label1/gcc-11.4.1/bundle/nulite@3.15.04-gcc@12.2.0-cxx17-prof-gcc@11.4.1.yaml \
/scratch/workspace/SE-667/label1/gcc-11.4.1/bundle/larsoft@09.81.00-gcc@12.2.0-cxx17-prof-gcc@11.4.1.yaml

Building mu2e environment:

Checkout build-framework

git clone -b mu2e-3.14.03-spack -spack-reqs https://cdcvs.fnal.gov/projects/build-framework
mkdir bundle
cd bundle
cmake ../build-framework

Update versions as needed, check concretization of generated environment yaml files, commit changes to branch and push to repo

Checkout fermi-spack-tools

git clone https://github.com/FNALssi/fermi-spack-tools

Run build-spack-env.sh script with generated environment yaml files.

./fermi-spack-tools/bin/build-spack-env.sh \
--ups=unified --clear-mirrors --cache-write-binaries=all \
'--spack-config-cmd=--scope=site add config:install_tree:padded_length:255' \
--cache-write-sources '--with-cache=scisoft_mirror_sources|https://scisoft.fnal.gov/scisoft/spack-mirror/spack-packages/sources' \
--clear-mirrors --with-padding --no-query-packages --verbosity=DEBUG_4 --spack-version=v0.21.0-fermi \
'--spack-repo=https://github.com/FNALssi/fnal_art|mu2e-build' '--spack-repo=https://github.com/art-daq/artdaq-spack|develop' '--spack-repo=https://github.com/Mu2e/mu2e-spack|main' --fermi-spack-tools-version=main --cache-write-binaries=roots --no-view \
/scratch/workspace/SE-668/label1/gcc-11.4.1/bundle/gcc@13.1.0-gcc@11.4.1.yaml \
/scratch/workspace/SE-668/label1/gcc-11.4.1/bundle/critic@2.13.03-gcc@13.1.0-cxx20-prof-gcc@11.4.1.yaml \
/scratch/workspace/SE-668/label1/gcc-11.4.1/bundle/mu@3.14.03-gcc@13.1.0-cxx20-prof-gcc@11.4.1.yaml \
/scratch/workspace/SE-668/label1/gcc-11.4.1/bundle/muse-ext@p052-gcc@13.1.0-cxx20-prof-gcc@11.4.1.yaml

Run the Jenkins job the build-spack-env.sh script here with the appropiate parameters. Note: the command lines above are generated from the parameters of the Jenkins job.