Skip to content

Commit

Permalink
Merge branch 'develop' into pr/geant4_decay_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Jun 22, 2024
2 parents 143c555 + c385ddf commit 41c5b2c
Show file tree
Hide file tree
Showing 20 changed files with 485 additions and 237 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ package_list=$(spack tags eic)
#package_list=$(echo ${package_list} | tr ' ' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/[[:space:]]*$//')

for p in ${package_list}; do
if [[ $p == "fluka" ]] ; then
continue
fi

v=$(spack versions --new $p)
# ignore pre and rc versions (for all packages)
v=$(echo $v | sed 's/\S*\(rc\|pre\|alpha\)\S*//g')
v=$(echo $v | sed 's/\S*\(rc\|pre\|alpha\|beta\)\S*//g')
# using `echo $v` instead of "$v" will handle v=" " correctly

if [[ ! -z `echo $v` ]]; then
echo "- [ ] \`$p\`: \`$v\` " >> gh-new-version.log
spack checksum --add-to-package --batch $p $v
fi
done
18 changes: 0 additions & 18 deletions .github/scripts/post_new_version_issue_comment.sh

This file was deleted.

13 changes: 11 additions & 2 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
run: echo "FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- uses: actions/checkout@v3
with:
path: eic-spack
fetch-depth: ${{ env.FETCH_DEPTH }}
- name: Set spack container tag
id: set-tag
Expand All @@ -41,6 +42,7 @@ jobs:
- name: Set modified package matrix
id: set-matrix
run: |
cd eic-spack
echo "github.sha=${{ github.sha }}"
echo "github.event.pull_request.head.sha=${{ github.event.pull_request.head.sha }}"
echo "github.event.pull_request.base.sha=${{ github.event.pull_request.base.sha }}"
Expand Down Expand Up @@ -80,10 +82,17 @@ jobs:
container: ghcr.io/spack/ubuntu-jammy:${{needs.generate-matrix.outputs.tag}}
steps:
- uses: actions/checkout@v3
- name: Setup eic-spack repository
with:
path: key4hep-spack
repository: key4hep/key4hep-spack
- uses: actions/checkout@v3
with:
path: eic-spack
- name: Setup key4hep-spack and eic-spack repositories
run: |
. /opt/spack/share/spack/setup-env.sh
spack repo add $PWD
spack repo add ${GITHUB_WORKSPACE}/key4hep-spack
spack repo add ${GITHUB_WORKSPACE}/eic-spack
spack repo list
- name: Concretize package ${{ matrix.pkg }}
run: |
Expand Down
37 changes: 25 additions & 12 deletions .github/workflows/check-new-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ name: Check for new versions

on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
schedule:
- cron: "0 13 * * 1" # Every Monday at 1PM UTC (9AM EST)

Expand All @@ -17,14 +10,34 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/spack/ubuntu-jammy:latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: key4hep-spack
repository: key4hep/key4hep-spack
- uses: actions/checkout@v3
with:
path: eic-spack
- name: Check for new versions and create issue
id: new_versions
env:
COMMENT_BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
source /opt/spack/share/spack/setup-env.sh
spack repo add --scope site ${GITHUB_WORKSPACE}
.github/scripts/generate_new_version_issue.sh
.github/scripts/post_new_version_issue_comment.sh
spack repo add --scope site ${GITHUB_WORKSPACE}/key4hep-spack
spack repo add --scope site ${GITHUB_WORKSPACE}/eic-spack
bash eic-spack/.github/scripts/checksum_new_versions.sh
echo "files=$(git -C ${GITHUB_WORKSPACE}/eic-spack diff --name-only | xargs -L1 -r dirname | xargs -L1 -r basename | xargs)" >> $GITHUB_OUTPUT
echo "diffstat<<EOF" >> $GITHUB_OUTPUT
git -C ${GITHUB_WORKSPACE}/eic-spack diff --stat >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create pull request
uses: peter-evans/create-pull-request@v5
with:
path: eic-spack
branch-suffix: short-commit-hash
title: New package versions found for ${{ steps.new_versions.outputs.files }}
body: |
New package versions found:
${{ steps.new_versions.outputs.diffstat }}
assignees: wdconinc
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# EIC Spack Repository
# EIC Spack Repository (builds on Key4HEP)

[![Build Environments](https://github.com/eic/eic-spack/workflows/Build%20Environments/badge.svg)](https://github.com/eic/eic-spack/actions?query=workflow%3A%22Build+Environments%22)
[![Build Docker Images](https://github.com/eic/eic-spack-docker/workflows/Build%20Docker%20Images/badge.svg)](https://github.com/eic/eic-spack-docker/actions?query=workflow%3A%22Build+Docker+Images%22)
[![EIC CI against CVMFS Software Stack](https://github.com/eic/eic-spack-cvmfs-tests/workflows/EIC%20CI%20against%20CVMFS%20Software%20Stack/badge.svg)](https://github.com/eic/eic-spack-cvmfs-tests/actions?query=workflow%3A%22EIC+CI+against+CVMFS+Software+Stack%22)

This repository contains [Spack](https://spack.readthedocs.io/en/latest/index.html) packages for the EIC.
This repository contains [Spack](https://spack.readthedocs.io/en/latest/index.html) packages for the EIC, building on the [Key4HEP packages](https://github.com/key4hep/key4hep-spack).

While we encourage the inclusion of Spack packages in the upstream repository, we realize that some packages may not be mature enough or have too small of a user base to be accepted there.
While we encourage the inclusion of Spack packages in the [Spack repository](https://github.com/spack/spack), we realize that some packages may not be mature enough or have too small of a user base to be accepted there.

## Installing Spack

Installing Spack is outside the scope of this repository, but described in the Spack [Getting Started](https://spack.readthedocs.io/en/latest/getting_started.html) page.

The default `develop` branch of this package repository depends on builtin packages in the upstream Spack `develop` repository. For specific vesions of Spack (e.g. v0.18.1), please use the corresponding branch (e.g. v0.18) or the latest tag on that branch (e.g. v0.18.5).

Because packages in this repository may depend on packages in the [Key4HEP spack repository](https://github.com/key4hep/key4hep-spack), you

## Adding the EIC Spack Repository

1. Clone this repository:
Expand Down
5 changes: 5 additions & 0 deletions packages/dd4hep/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
class Dd4hep(BuiltinDd4hep):
variant("frames", default=True, description="Use podio frames", when="@1.25.1")
variant("frames", default=True, description="Use podio frames", when="@1.24")
patch(
"https://github.com/AIDASoft/DD4hep/pull/1190.diff?full_index=1",
sha256="d6273e4f0367f72b9572b337338d1269a154b948b72f31ff69ad62f850e0d4ac",
when="@=1.27",
)
patch(
"https://github.com/AIDASoft/DD4hep/pull/1157/commits/1c79b1492373dd66b17ea2530a63ec434396afa9.patch?full_index=1",
sha256="e544cc11c7e1ac9ccacf6688f3d966e912b1a2e1a7460f7c16212a0a4df5b05e",
Expand Down
9 changes: 9 additions & 0 deletions packages/edm4eic/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ class Edm4eic(CMakePackage):
tags = ["eic"]

version("main", branch="main")
version("6.0.1", sha256="5c159c61a284c6ad3bcba65532b21ed11fddc194129e84347d30c519d1ef8c77")
version("6.0.0", sha256="9215b1477ddaaeff5bd0f9ff0990a4b54dc4780fb6c6ab36f0bd9bcc83e59928")
version(
"5.0.0",
sha256="31ddc38b73909f2faf6a2ade5521104401b440fcbb6fccea4ed592427d7dcac2"
)
version(
"4.0.0",
sha256="564d4ddff9a52c6358d72a99857d9e755af0fc8f782900dab471e65e6e34f0d3")
version(
"3.0.1",
sha256="f5d3ed307c53a1197c71581b7095c40f9cd0afd624997a8720428d24bc0c0d60",
Expand Down
31 changes: 30 additions & 1 deletion packages/eicrecon/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,31 @@ class Eicrecon(CMakePackage):
git = "https://github.com/eic/eicrecon.git"
list_url = "https://github.com/eic/EICrecon/tags"

tags = ["eic"]

maintainers = ["wdconinc"]

version("main", branch="main")
version("1.14.1", sha256="2a9445482d47b461ced8fcbaa8cf55903f4fec24d323b90b5fb3e9bc64c28f9e")
version("1.14.0", sha256="f90e3a5bc55d7696f86a2b86cd38b585553b3e13bc0323ca4a2971688ecda58c")
version("1.13.2", sha256="24ac2172b4834a2fa30ff13290e9c7c946f51472d57d4223711d2f86360eb926")
version("1.13.1", sha256="66e9767e520ebcd6dc12f616d7a9e1262db0574e5b7e6a90df282ccd3e28612d")
version("1.12.0", sha256="7b1fbf72a0756cd7338c179096c329b20611018b19e5fd73ce311e415adad47f")
version("1.11.0", sha256="4442248864ed432762f267dc4d03eb1ddfecc3155d5b7c3d7f9a2dbc7b1427f7")
version("1.10.0", sha256="f7469c5d62fd8614b1fb5a22be533d8fcc28ebdb955189f6b839caaac7a6be03")
version("1.9.1", sha256="7d06d0fa14213525a06d5633b15d63d1c0827515a3e22f1e952e610cf90bb4d7")
version("1.9.0", sha256="58c32f6953940277c4c01b563cac878b0aae01b09b88e7960d8500aa6080f745")
version("1.8.1", sha256="7bc073d87fa6b619330bb3c1ce751e0535d04f9db3d04f13108b147759a29d6d")
version("1.8.0", sha256="f0769d816e4119322e5429db9b9262ecb3cf8b140fa9f07707a6cdf5c77d0832")
version("1.7.0", sha256="60732169f76d215ad111a9b34affb64b0f1adafa4aba372b53acb39fe50c6b07")
version(
"1.6.2",
sha256="725d53bc4527486fd15d600b1bd329228502ef83c0ff118cc4600eac7cc2d148",
)
version(
"1.6.1",
sha256="fb3cffe9882d912288d40fcb0dc08a24bbe8adf57a53f05a7ab3559baa4c30cb",
)
version(
"1.6.0",
sha256="f099e4ad400b617f597ca7e1869b9fc5fb2ec6ab13af7dd66972b16ae194106d",
Expand Down Expand Up @@ -205,14 +227,21 @@ class Eicrecon(CMakePackage):
depends_on("edm4eic")
depends_on("edm4hep")
depends_on("podio")

depends_on("acts +dd4hep +identification +tgeo")
depends_on("acts@30:", when="@1.8:")
depends_on("acts@:30", when="@:1.9.0")

depends_on("root")
depends_on("fastjet")
depends_on("fjcontrib", when="@1.13:")
depends_on("fmt")
depends_on("irt", when="@0.2.8:")
depends_on("spdlog")
depends_on("catch2", when="@1.0.0:")
depends_on("cppgsl", when="@1.6:") # FIXME: when 1.7 is released, this should be changed
depends_on("cppgsl", when="@1.7:")
depends_on("algorithms", when="@1.7:")
depends_on("py-onnxruntime", when="@1.12:") # FIXME change to 1.13 when released

def setup_run_environment(self, env):
env.prepend_path(
Expand Down
150 changes: 3 additions & 147 deletions packages/epic-eic/package.py
Original file line number Diff line number Diff line change
@@ -1,148 +1,4 @@
from spack import *
from spack.pkg.eic.epic import Epic


class EpicEic(CMakePackage):
"""The EPIC Detector at IP6 of the Electron-Ion Collider."""

homepage = "https://epic-eic.org"
url = "https://github.com/eic/epic/archive/refs/tags/22.10.0.zip"
list_url = "https://github.com/eic/epic/tags"
git = "https://github.com/eic/epic"

maintainers = ["wdconinc"]

tags = ["eic"]

version("main", branch="main")
version(
"23.10.0",
sha256="abf833eea328afb749c1eabbc83072c1382f02fc547ce7e9291e0616db552a0e",
)
version(
"23.09.1",
sha256="1fc30d36461e5acc3a54f475e9c01132aca12e74cc2fbec78fb3073fa83782b5",
)
version(
"23.09.0",
sha256="6f2ced07ead619ad4096246966383f7362d34fb140f8c0f3f60e775401deb303",
)
version(
"23.08.0",
sha256="1a8f82ef75d19dfad7228fcb437736622fc984caf0cf06466209124a8559d968",
)
version(
"23.07.2",
sha256="e80c31a338e41766aecc76441ac7aed7d53ddf401c7ca8773b0124536096ef2d",
)
version(
"23.07.1",
sha256="7e5908b3a64941ca2ff81195d62b3da6c8a20c4431f903a3c1bdda30bd39fac3",
)
version(
"23.07.0",
sha256="3b2fd83ee1664cb6bb47e45098c0357649d33526bac1e8637118bec4cd88295e",
)
version(
"23.06.1",
sha256="c78a756f84f34c6bb7b39e2bb104ffa7bcb2c7d0dcbdaa7905fe44f81e7b17aa",
)
version(
"23.06.0",
sha256="3e9825457920b97cab1bc73f44b8cfc45130f66a5d00c4acde4f8b9079a661b1",
)
version(
"23.05.2",
sha256="afb31d076a7859bd4cd94d9eed237f402a5cc56100c53c933ed4a024c8ef997b",
)
version(
"23.05.1",
sha256="4cac31b2619b3aafaaa9cc6a43923a97d04d74b753eb580990d569d1ef94c94d",
)
version(
"23.05.0",
sha256="a72774ffc3176178b128a4069d2a7bebfebde91192d971d0ccd3ab3392ff7977",
)
version(
"23.03.0",
sha256="16badb2418531250a81931f920e145c4be9ef93411f091d93202c23e36e91129",
)
version(
"23.01.0",
sha256="56e1d9a9ca3d81e64127f4d14fd45733dad07f6ffdec8387e6cae5e729525399",
)
version(
"22.12.0",
sha256="9de036b47ab8d0c97ab32fc788dd8300132014413013a1b19c2a3f8f3883a7ae",
)
version(
"22.11.3",
sha256="5cea46de7edf4868a361c5a75749f6c0f3d3ee941a33b956b2507581aa638232",
)
version(
"22.11.2",
sha256="f53aa7a4d992ddfb7549abedd4d6b87d61569b9530691b99640c6a635f2545c2",
)
version(
"22.11.1",
sha256="c8aded71dc707185a06557a76060661c57f24ed5eeb4a39b0ebcc63c9fc0a4fe",
)
version(
"22.11.0",
sha256="f683ed9e26b303ea428dc513d6e841efeeaa584cec44121f6a28116693d13065",
)
version(
"22.10.1",
sha256="dbd70d2d5ab42f3979ba4e7cda87cbb8cc48b37c4d13a887bbf96c3b32c347e9",
)
version(
"22.10.0",
sha256="f683ed9e26b303ea428dc513d6e841efeeaa584cec44121f6a28116693d13065",
)

variant(
"ip",
default="6",
values=("6"),
when="@:22.11",
description="Interaction point design",
)

depends_on("[email protected]: +ddg4 +ddrec", when="@:23.03.0")
depends_on("[email protected]: +ddrec", when="@23.05.0:")

depends_on("acts-dd4hep", when="@:23.01.0")

depends_on("fmt +shared")
depends_on("py-pyyaml")
depends_on("py-jinja2")

depends_on("eic-ip6", when="@:22.11 ip=6")

with when("@:22.11"):
phases = ["cmake", "build", "install", "postinstall"]
with when("@22.12:"):
phases = ["cmake", "build", "install"]

@when("@:22.11")
def postinstall(self, spec, prefix):
ip = "ip" + spec.variants["ip"].value
# Symlinks are not copied to view, so we have to make a full copy
# Ref: https://github.com/spack/spack/issues/19531#issuecomment-793012461
# symlink(join_path(self.spec['eic-' + ip].prefix, 'share', ip, ip),
# join_path(prefix, 'share/epic', ip))
# FIXME: when issue above is resolved, go back to symlinking
copy_tree(
join_path(self.spec["eic-" + ip].prefix, "share", ip, ip),
join_path(prefix, "share/epic", ip),
)

def setup_run_environment(self, env):
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
env.set("JUGGLER_DETECTOR_PATH", join_path(self.prefix.share, "epic"))
env.set("JUGGLER_DETECTOR", "epic")
env.set("JUGGLER_DETECTOR_CONFIG", "epic")
env.set("JUGGLER_DETECTOR_VERSION", str(self.spec.version))
env.set("DETECTOR_PATH", join_path(self.prefix.share, "epic"))
env.set("DETECTOR", "epic")
env.set("DETECTOR_CONFIG", "epic")
env.set("DETECTOR_VERSION", str(self.spec.version))
class EpicEic(Epic):
pass
Loading

0 comments on commit 41c5b2c

Please sign in to comment.