Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spack: add dev version #2150

Merged
merged 14 commits into from
Jul 10, 2023
13 changes: 9 additions & 4 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ jobs:
- name: Build Arbor's Spack package against the develop branch
run: arbor/scripts/build_spack_package.sh arbor develop

- name: Run Python examples
run: scripts/run_python_examples.sh
- name: Test executables
run: scripts/test_executables.sh
# build_spack_package.sh only builds, does not install, therefore can't run Python code.
# - name: Run Python examples
# run: |
# cd arbor
# scripts/run_python_examples.sh
# - name: Test executables
# run: |
# cd arbor
# scripts/test_executables.sh
2 changes: 1 addition & 1 deletion scripts/build_spack_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ spack reindex
cp $ARBOR_DIR/spack/package.py $SPACK_CUSTOM_REPO/packages/arbor
cd $ARBOR_DIR
ARBOR_VERSION=$(cat "$ARBOR_DIR/VERSION")
spack dev-build arbor@${ARBOR_VERSION}
spack dev-build arbor@${ARBOR_VERSION} +python
8 changes: 8 additions & 0 deletions spack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

from spack.package import *

try:
with open("VERSION", "r") as file:
DEVVERSION = file.readline().strip()
except:
DEVVERSION = None


class Arbor(CMakePackage, CudaPackage):
"""Arbor is a high-performance library for computational neuroscience
Expand All @@ -16,6 +22,8 @@ class Arbor(CMakePackage, CudaPackage):
maintainers = ["thorstenhater", "brenthuisman", "haampie"]

version("master", branch="master", submodules=True)
if DEVVERSION:
version(DEVVERSION)
version(
"0.8.1",
sha256="caebf96676ace6a9c50436541c420ca4bb53f0639dcab825de6fa370aacf6baa",
Expand Down
Loading