Skip to content

Commit

Permalink
Merge pull request #5 from MuonColliderSoft/master
Browse files Browse the repository at this point in the history
Frozen stack configuration for release 2.8
  • Loading branch information
bartosik-hep authored Jun 17, 2023
2 parents 52b41f7 + ec0017f commit 65314d4
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 8 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/concretize-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: concretize-template

on:
workflow_call:
inputs:
target:
required: true
type: string
jobs:
concretize:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Checkout Spack
uses: actions/checkout@v3
with:
repository: spack/spack
path: spack

- name: Checkout Key4hep
uses: actions/checkout@v3
with:
repository: key4hep/key4hep-spack
path: key4hep-spack

- name: Checkout this repo
uses: actions/checkout@v3
with:
path: mucoll-spack

- name: Concretize mucoll-common
run: |
source spack/share/spack/setup-env.sh
spack --version
spack repo add key4hep-spack
spack repo add mucoll-spack
spack compiler find
spack env activate mucoll-spack/environments/mucoll-${{ inputs.target }}
spack add mucoll-stack %gcc@11:
spack concretize
spack spec -Nt > ${GITHUB_WORKSPACE}/spec-${{ inputs.target }}.log
- name: Store artifacts
uses: actions/upload-artifact@v3
with:
name: spec-list
path: ${GITHUB_WORKSPACE}/spec-${{ inputs.target }}.log
13 changes: 13 additions & 0 deletions .github/workflows/concretize.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: concretize-ubuntu

on: [push, pull_request]

jobs:
concretize:
strategy:
matrix:
target: [common, release, release-debug]
uses: ./.github/workflows/concretize-template.yaml
with:
target: ${{ matrix.target }}

12 changes: 9 additions & 3 deletions environments/mucoll-common/packages.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# Very loose requirements for nightly builds
packages:
geant4:
variants: +qt+opengl+vecgeom cxxstd=17
variants: ~qt+opengl+vecgeom cxxstd=17
root:
variants: +davix+gsl+math~memstat+minuit+mlp+opengl~postgres~pythia6+pythia8+python~qt4+r+root7+roofit+rpath~shadow+sqlite+ssl~table+tbb+threads+tmva+unuran+vc+vdt+x+xml+xrootd cxxstd=17 build_type=RelWithDebInfo
variants: +davix+fftw+gsl+math+minuit+mlp+opengl~postgres~pythia6+pythia8+python+r+root7+roofit+rpath~shadow+sqlite+ssl+tbb+threads+tmva+unuran+vc+vdt+x+xml+xrootd cxxstd=17 build_type=RelWithDebInfo
dd4hep:
variants: +lcio+xercesc+hepmc3+edm4hep
whizard:
variants: ~fastjet~latex+lcio~lhapdf+openloops~openmp+pythia8 hepmc=3
pythia8:
variants: ~hepmc+hepmc3
k4simdelphes:
variants: ~delphes_hepmc
all:
target: [x86_64]
variants: build_type=Release cxxstd=17
buildable: true
providers:
gl: [mesa]
glu: [mesa]
glu: [mesa]
1 change: 1 addition & 0 deletions environments/mucoll-release-debug/packages.yaml
6 changes: 6 additions & 0 deletions environments/mucoll-release-debug/spack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
spack:
include:
- packages.yaml
packages:
all:
variants: build_type=Debug cxxstd=17
4 changes: 2 additions & 2 deletions environments/mucoll-release/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
geant4:
require: '@10.6.3 ~qt+opengl+vecgeom cxxstd=17'
root:
require: '@6.26.6 +davix+gsl+math~memstat+minuit+mlp+opengl~postgres~pythia6+pythia8+python~qt4~r+root7+roofit+rpath~shadow+sqlite+ssl~table+tbb+threads+tmva+unuran+vc+vdt+x+xml+xrootd cxxstd=17 build_type=RelWithDebInfo'
require: '@6.26.6 +davix+fftw+gsl+math+minuit+mlp+opengl~postgres~pythia6+pythia8+python+r+root7+roofit+rpath~shadow+sqlite+ssl+tbb+threads+tmva+unuran+vc+vdt+x+xml+xrootd cxxstd=17 build_type=RelWithDebInfo'
dd4hep:
require: '@1.23 +lcio+xercesc+hepmc3+edm4hep'
whizard:
Expand Down Expand Up @@ -84,7 +84,7 @@ packages:
overlay:
require: '@0.24'
lcgeo:
require: '@0.17'
require: '@0.18.1'
lcio:
require: '@2.19.1'
gear:
Expand Down
3 changes: 3 additions & 0 deletions packages/lcgeo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class Lcgeo(CMakePackage, MCIlcsoftpackage):
maintainers = ['gianelle', 'pandreetto']

version('master', branch='master')
version("0.18.1", sha256="5fcfcbd6110792bb607aba82a8dcbf887b40065aa12835f720af700f26c53bcc")
version("0.18", sha256="271062288aac419ce6affc98e199c597c340be57830c30f3b3e1d774cccc608b")
version('0.17', sha256='5ab33aaf5bc37deba82c2dde78cdce6c0041257222ed7ea052ecdd388a41cf9b')
version('0.16.8', sha256='03417825f5bf242e0cd3ba24f7b4e7c3030126bcbb961f6d2e045e3d9404abfe')
version('0.16.7', sha256='8090819e1e35b0e5f439bcf1cd0940bb861ac2bbba7a2d2a19858ed9fa5c6ccb')
Expand Down Expand Up @@ -52,6 +54,7 @@ def install_compact(self):
install_tree('fieldmaps', self.prefix.share.lcgeo.compact.fieldmaps)
install_tree('ILD', self.prefix.share.lcgeo.compact.ILD)
install_tree('SiD', self.prefix.share.lcgeo.compact.Sid)
install_tree('MuColl', self.prefix.share.lcgeo.compact.MuColl)

def setup_run_environment(self, env):
env.set('LCGEO', self.prefix.share.lcgeo.compact)
Expand Down
29 changes: 26 additions & 3 deletions packages/mucoll-stack/package.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from datetime import datetime
import os

# import common methods for use in recipe from mucoll_utils.py
Expand All @@ -12,7 +13,7 @@


class MucollStack(BundlePackage, Key4hepPackage):
"""Bundle package to install Ilcsoft"""
"""Bundle package to install Muon Collider Software Stack"""

homepage = 'https://github.com/MuonColliderSoft'

Expand All @@ -21,9 +22,9 @@ class MucollStack(BundlePackage, Key4hepPackage):
##################### versions ########################
#######################################################
### nightly build
# to install latest the version of every dependency
# to install the latest version of every dependency
# should use `environments/mucoll-common/packages.yaml`
version('master')
version(datetime.today().strftime('%Y-%m-%d'))

### stable build
# to install exact specified version for every dependecy
Expand Down Expand Up @@ -105,6 +106,26 @@ class MucollStack(BundlePackage, Key4hepPackage):
with when('+devtools'):
depends_on('cmake')
depends_on('ninja')
depends_on('doxygen')
depends_on('gdb')
depends_on('llvm')
depends_on('man-db')
depends_on('onnx')
depends_on('xgboost')
# Python tools
depends_on('py-h5py', when='+devtools')
depends_on('py-ipython', when='+devtools')
depends_on('py-jupytext', when='+devtools')
depends_on('py-matplotlib', when='+devtools')
depends_on('py-onnxruntime', when='+devtools')
depends_on('py-onnx', when='+devtools')
depends_on('py-pandas', when='+devtools')
depends_on('py-particle', when='+devtools')
depends_on('py-pip', when='+devtools')
depends_on('py-scikit-learn', when='+devtools')
depends_on('py-scipy', when='+devtools')
depends_on('py-uproot', when='+devtools')
depends_on('py-xgboost', when='+devtools')

##################### conflicts #######################
#######################################################
Expand All @@ -118,6 +139,8 @@ def setup_run_environment(self, spack_env):
# (see https://github.com/key4hep/key4hep-spack/issues/170)
spack_env.set("LC_ALL", "C")
spack_env.set('MUCOLL_STACK', os.path.join(self.spec.prefix, 'setup.sh'))
spack_env.set('MUCOLL_GEO', os.path.join(self.spec['lcgeo'].prefix.share.lcgeo.compact, 'MuColl/MuColl_v1/MuColl_v1.xml'))
spack_env.set('MUCOLL_RELEASE_VERSION', self.spec.version)

def install(self, spec, prefix):
return install_setup_script(self, spec, prefix, 'MUCOLL_LATEST_SETUP_PATH')

0 comments on commit 65314d4

Please sign in to comment.