-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spack-solvable versions, add tests to Spack workflow (#2156)
## Changes 1. Spack interprets version info consisting of 2-tuples as ranges, leading to v0.8 being uninstallable if there has been a point release (v0.8.1). 2. Change Spack CI to use latest release _and_ develop branch, because the former is how Arbor is rolled out in various centers, and thus should be verified to work, and the latter lets us know of upcoming issues with dependencies. 3. Changed Spack CI to not use `build_spack_package.sh`. This script does everything in `/tmp`, and Github Actions appear to be wiping `/tmp` between steps, which means breaking up the run into steps is difficult. Breaking up is desirable, because then one can see whether building or testing breaks. 4. Run Python tests after building the Spack package. 5. Also use Spack-provided deps when Spack is instructed to build master, not submodules. 6. Tiny fix for the `ciwheelbuild` failure. ## Future issues Out of scope for now, but identified as problems: 1. Currently, Spack cannot execute the unit tests, because the Google-Test package isn't built and Arbor doesn't look for it. @boeschf is looking at the latter: making it possible to build with an external Google Test. - Will be solved by #1731 2. The former is another problem: Spack does not or not always (it's not clear) concretize test dependencies. This is an open issue with low priority: spack/spack#29447 This mean that despite oru `package.py` properly including `depends_on("[email protected]", type="test", when="@0.7.1:")`, Spack does not build it, at least not in the dev-build workflow as we currently do. And it isn't clear what an always working workaround is, see issue. (Spack can't display the deps for the `test` variant: spack/spack#23586 `spack spec -I arbor` doesn't show Google Test, and neither does `spack dependencies --deptype test arbor`.) - Blocked by upstream.
- Loading branch information
1 parent
f9eae28
commit 7d36beb
Showing
8 changed files
with
85 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,14 +45,14 @@ Update tags/versions and test | |
- Double check that all examples/tutorials/etc are covered by CI | ||
- Check Python/pip/PyPi metadata and scripts, e.g. ``setup.py``, ``pyproject.toml`` | ||
|
||
#. Create new temp-branch ending in ``-rc``. E.g. ``v0.6-rc`` | ||
#. Create new temp-branch ending in ``-rc``. E.g. ``v0.9.0-rc`` | ||
#. Bump the ``VERSION`` file: | ||
|
||
- For as long as `scikit-build-core` does not support loading fields from external files, also bump in `pyproject.toml` | ||
- See also :ref:`dev-version` | ||
- Append ``-rc``. (Make sure there's no ``-dev``) | ||
|
||
#. Create a draft PR. Tag and push with ``-rc``. E.g. ``v0.6-rc`` | ||
#. Create a draft PR. Tag and push with ``-rc``. E.g. ``v0.9.0-rc`` | ||
|
||
- on cmdline: ``git tag -a TAGNAME`` | ||
- ``git push upstream refs/tags/TAGNAME`` | ||
|
@@ -126,7 +126,7 @@ Post Release | |
|
||
#. Update Zenodo with authors and changelog created in previous step and submit. | ||
|
||
#. Make a new PR setting ``VERSION`` to the next with a trailing ``-dev``. E.g. if you just release ``3.14``, change ``VERSION`` to ``3.15-dev`` | ||
#. Make a new PR setting ``VERSION`` to the next with a trailing ``-dev``. E.g. if you just released ``3.14.15``, change ``VERSION`` to ``3.15.16-dev``. Make sure the number portion always consists of a triple. Shorter versions are uninstallable by Spack (``spack install [email protected]`` will install v0.8.1, due to anything shorter than a triple being interpreted as a version range). | ||
|
||
- Update ``spack/package.py``. The checksum of the targz is the sha256sum. | ||
- Include changes such as to ``CITATIONS``, ``doc/index.rst`` in postrel PR. Copy Zenodo BibTex export to ``CITATIONS``. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,6 @@ | |
|
||
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 | ||
|
@@ -21,26 +15,25 @@ class Arbor(CMakePackage, CudaPackage): | |
url = "https://github.com/arbor-sim/arbor/releases/download/v0.8.1/arbor-v0.8.1-full.tar.gz" | ||
maintainers = ["thorstenhater", "brenthuisman", "haampie"] | ||
|
||
version("master", branch="master", submodules=True) | ||
if DEVVERSION: | ||
version(DEVVERSION) | ||
version("master", branch="master") | ||
version("develop") | ||
version( | ||
"0.8.1", | ||
sha256="caebf96676ace6a9c50436541c420ca4bb53f0639dcab825de6fa370aacf6baa", | ||
url="https://github.com/arbor-sim/arbor/releases/download/v0.8.1/arbor-v0.8.1-full.tar.gz", | ||
) | ||
version( | ||
"0.8", | ||
"0.8.0", | ||
sha256="18df5600308841616996a9de93b55a105be0f59692daa5febd3a65aae5bc2c5d", | ||
url="https://github.com/arbor-sim/arbor/releases/download/v0.8/arbor-v0.8-full.tar.gz", | ||
) | ||
version( | ||
"0.7", | ||
"0.7.0", | ||
sha256="c3a6b7193946aee882bb85f9c38beac74209842ee94e80840968997ba3b84543", | ||
url="https://github.com/arbor-sim/arbor/releases/download/v0.7/arbor-v0.7-full.tar.gz", | ||
) | ||
version( | ||
"0.6", | ||
"0.6.0", | ||
sha256="4cd333b18effc8833428ddc0b99e7dc976804771bc85da90034c272c7019e1e8", | ||
url="https://github.com/arbor-sim/arbor/releases/download/v0.6/arbor-v0.6-full.tar.gz", | ||
) | ||
|
@@ -99,9 +92,9 @@ class Arbor(CMakePackage, CudaPackage): | |
depends_on("[email protected]:", when="+python", type=("build", "run")) | ||
depends_on("py-numpy", when="+python", type=("build", "run")) | ||
with when("+python"): | ||
depends_on("[email protected]:", type=("build")) | ||
depends_on("[email protected]:", when="@0.5.3:", type=("build")) | ||
depends_on("[email protected]:", when="@0.7.1:", type=("build")) | ||
depends_on("[email protected]:", type="build") | ||
depends_on("[email protected]:", when="@0.5.3:", type="build") | ||
depends_on("[email protected]:", when="@0.7.1:", type="build") | ||
|
||
# sphinx based documentation | ||
depends_on("[email protected]:", when="+doc", type="build") | ||
|
@@ -132,3 +125,8 @@ def cmake_args(self): | |
args.append("-DARB_CXX_FLAGS_TARGET=" + opt_flags) | ||
|
||
return args | ||
|
||
@run_after("install", when="+python") | ||
@on_package_attributes(run_tests=True) | ||
def install_test(self): | ||
python("-c", "import arbor") |