From 2476f3788535c84bf3a558def3c11add563b8c73 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Fri, 22 Jul 2022 15:18:15 +0200 Subject: [PATCH 01/24] Add checksum of v2.4.0.0 --- spack/repo/packages/py-pyprecice/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 96825b07..2aef3c6c 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -14,11 +14,12 @@ class PyPyprecice(PythonPackage): homepage = "https://precice.org" git = "https://github.com/precice/python-bindings.git" - url = "https://github.com/precice/python-bindings/archive/v2.0.0.1.tar.gz" + url = "https://github.com/precice/python-bindings/archive/v2.4.0.0.tar.gz" maintainers = ["ajaust", "BenjaminRodenberg", "IshaanDesai"] # Always prefer final version of release candidate version("develop", branch="develop") + version('2.4.0.0', sha256='8877da85df97d66966892440c7e777b667d8e6a33747304ed3762f4c33b729ec') version('2.3.0.1', sha256='ed4e48729b662680beaa4ee2a9aff724a79e760534c6c58181be739988da2789') version('2.2.1.1', sha256='139bac5077c3807e1b7b83d8d0da5ca0fc8c17393fd0df4bc5999cd63a351b78') version('2.2.0.2', sha256='2287185f9ad7500dced53459543d27bb66bd2438c2e4bf81ee3317e6a00513d5') @@ -32,6 +33,7 @@ class PyPyprecice(PythonPackage): version("2.0.0.1", sha256="96eafdf421ec61ad6fcf0ab1d3cf210831a815272984c470b2aea57d4d0c9e0e") depends_on("precice@develop", when="@develop") + depends_on("precice") depends_on("precice@2.3.0", when="@2.3.0.1:2.3.1") depends_on("precice@2.2.1", when="@2.2.1.1:2.2.1") depends_on("precice@2.2.0", when="@2.2.0.1:2.2.0") From a8d1c824b16bf95900c54d504b8fdd8c087691cc Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 25 Jul 2022 08:43:48 +0200 Subject: [PATCH 02/24] Changes to package.py as recommended by Spack devs --- spack/repo/packages/py-pyprecice/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 2aef3c6c..f142380f 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -34,6 +34,7 @@ class PyPyprecice(PythonPackage): depends_on("precice@develop", when="@develop") depends_on("precice") + depends_on("precice@2.4.0", when="@2.4.0.1:2.4.0") depends_on("precice@2.3.0", when="@2.3.0.1:2.3.1") depends_on("precice@2.2.1", when="@2.2.1.1:2.2.1") depends_on("precice@2.2.0", when="@2.2.0.1:2.2.0") @@ -48,8 +49,8 @@ class PyPyprecice(PythonPackage): depends_on("py-numpy", type=("build", "link", "run")) depends_on("py-mpi4py", type=("build", "run")) depends_on("py-cython@0.29:", type="build") - depends_on("py-packaging", when="@:2.1", type="build") - depends_on("py-pip", when="@:2.1", type="build") + depends_on("py-packaging", type="build") + depends_on("py-pip@19.0.0:", type="build") @when("@:2.1") def patch(self): From 9e898113c291138f2911cd5737a6a7a084a14f3b Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 25 Jul 2022 11:06:17 +0200 Subject: [PATCH 03/24] Remove unnecessary preCICE dependency line --- spack/repo/packages/py-pyprecice/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index f142380f..3c677c75 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -33,7 +33,6 @@ class PyPyprecice(PythonPackage): version("2.0.0.1", sha256="96eafdf421ec61ad6fcf0ab1d3cf210831a815272984c470b2aea57d4d0c9e0e") depends_on("precice@develop", when="@develop") - depends_on("precice") depends_on("precice@2.4.0", when="@2.4.0.1:2.4.0") depends_on("precice@2.3.0", when="@2.3.0.1:2.3.1") depends_on("precice@2.2.1", when="@2.2.1.1:2.2.1") From ac8c9cec59281692b5a69bf4fc1e8421a456d8db Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 25 Jul 2022 11:09:32 +0200 Subject: [PATCH 04/24] Fix import statement and update outdated copyright header --- spack/repo/packages/py-pyprecice/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 3c677c75..50273768 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -1,9 +1,9 @@ -# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from spack import * +from spack.package import * class PyPyprecice(PythonPackage): From 18c28533e369fd75867a69fe12ed305d02ddc8d2 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 25 Jul 2022 11:14:05 +0200 Subject: [PATCH 05/24] Correct lower bound of bindings version in the preCICE dependency line --- spack/repo/packages/py-pyprecice/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 50273768..a6c04b69 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -33,7 +33,7 @@ class PyPyprecice(PythonPackage): version("2.0.0.1", sha256="96eafdf421ec61ad6fcf0ab1d3cf210831a815272984c470b2aea57d4d0c9e0e") depends_on("precice@develop", when="@develop") - depends_on("precice@2.4.0", when="@2.4.0.1:2.4.0") + depends_on("precice@2.4.0", when="@2.4.0.0:2.4.0") depends_on("precice@2.3.0", when="@2.3.0.1:2.3.1") depends_on("precice@2.2.1", when="@2.2.1.1:2.2.1") depends_on("precice@2.2.0", when="@2.2.0.1:2.2.0") From 36776a8604ce064f609e89079d1755dd4450a1f6 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 25 Jul 2022 11:38:37 +0200 Subject: [PATCH 06/24] Change lib. folder to lib in spack execution command in the build_spack workflow --- .github/workflows/build-spack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 223abeb3..f4c15c05 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -26,4 +26,4 @@ jobs: cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ - name: Try to build py-pyprecice with spack and test it run: | - . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib.):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" + . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" From bb4d5bbc7a4669fa6e784121bdb145bbe5e84b01 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 25 Jul 2022 13:10:27 +0200 Subject: [PATCH 07/24] Trying out lib/ --- .github/workflows/build-spack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index f4c15c05..41367b2f 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -26,4 +26,4 @@ jobs: cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ - name: Try to build py-pyprecice with spack and test it run: | - . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" + . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib/):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" From a15b4f32326b79c253c6732c06c8dc15a22bd1e4 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 25 Jul 2022 13:20:26 +0200 Subject: [PATCH 08/24] Revert pip dependency lower bound --- spack/repo/packages/py-pyprecice/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index a6c04b69..935b52b8 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -49,7 +49,7 @@ class PyPyprecice(PythonPackage): depends_on("py-mpi4py", type=("build", "run")) depends_on("py-cython@0.29:", type="build") depends_on("py-packaging", type="build") - depends_on("py-pip@19.0.0:", type="build") + depends_on("py-pip", type="build") @when("@:2.1") def patch(self): From 241e2c234eb5109b507de3239e3179b5ccebd914 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 25 Jul 2022 13:36:01 +0200 Subject: [PATCH 09/24] Reverting version in preCICE dependency to 2.4.0.1 --- spack/repo/packages/py-pyprecice/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 935b52b8..ebeb5484 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -33,7 +33,7 @@ class PyPyprecice(PythonPackage): version("2.0.0.1", sha256="96eafdf421ec61ad6fcf0ab1d3cf210831a815272984c470b2aea57d4d0c9e0e") depends_on("precice@develop", when="@develop") - depends_on("precice@2.4.0", when="@2.4.0.0:2.4.0") + depends_on("precice@2.4.0", when="@2.4.0.1:2.4.0") depends_on("precice@2.3.0", when="@2.3.0.1:2.3.1") depends_on("precice@2.2.1", when="@2.2.1.1:2.2.1") depends_on("precice@2.2.0", when="@2.2.0.1:2.2.0") From 4b9388f38333928fe29577ab1d847bae16c70c1a Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 25 Jul 2022 13:53:31 +0200 Subject: [PATCH 10/24] Revert to adding the when condition to packaging and pip dependencies --- spack/repo/packages/py-pyprecice/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index ebeb5484..c1a34500 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -48,8 +48,8 @@ class PyPyprecice(PythonPackage): depends_on("py-numpy", type=("build", "link", "run")) depends_on("py-mpi4py", type=("build", "run")) depends_on("py-cython@0.29:", type="build") - depends_on("py-packaging", type="build") - depends_on("py-pip", type="build") + depends_on("py-packaging", when="@:2.1", type="build") + depends_on("py-pip@19.0.0:", when="@:2.1", type="build") @when("@:2.1") def patch(self): From d6a48ece53c4f4f76817234360381c3c5382f992 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 22 Aug 2022 09:28:58 +0200 Subject: [PATCH 11/24] Correct package version in depends_on command --- spack/repo/packages/py-pyprecice/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index c1a34500..1cf73c60 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -33,7 +33,7 @@ class PyPyprecice(PythonPackage): version("2.0.0.1", sha256="96eafdf421ec61ad6fcf0ab1d3cf210831a815272984c470b2aea57d4d0c9e0e") depends_on("precice@develop", when="@develop") - depends_on("precice@2.4.0", when="@2.4.0.1:2.4.0") + depends_on("precice@2.4.0", when="@2.4.0.0:2.4.0") depends_on("precice@2.3.0", when="@2.3.0.1:2.3.1") depends_on("precice@2.2.1", when="@2.2.1.1:2.2.1") depends_on("precice@2.2.0", when="@2.2.0.1:2.2.0") From a7cf42dd3363f3169a08067145f1d38209743be4 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 22 Aug 2022 11:41:16 +0200 Subject: [PATCH 12/24] Correct bindings version ranges in command for preCICE --- spack/repo/packages/py-pyprecice/package.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 1cf73c60..8642e960 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -33,15 +33,15 @@ class PyPyprecice(PythonPackage): version("2.0.0.1", sha256="96eafdf421ec61ad6fcf0ab1d3cf210831a815272984c470b2aea57d4d0c9e0e") depends_on("precice@develop", when="@develop") - depends_on("precice@2.4.0", when="@2.4.0.0:2.4.0") - depends_on("precice@2.3.0", when="@2.3.0.1:2.3.1") - depends_on("precice@2.2.1", when="@2.2.1.1:2.2.1") - depends_on("precice@2.2.0", when="@2.2.0.1:2.2.0") - depends_on("precice@2.1.1", when="@2.1.1.1:2.1.1") - depends_on("precice@2.1.0", when="@2.1.0.1:2.1.0") - depends_on("precice@2.0.2", when="@2.0.2.1:2.0.2") - depends_on("precice@2.0.1", when="@2.0.1.1:2.0.1") - depends_on("precice@2.0.0", when="@2.0.0.1:2.0.0") + depends_on("precice@2.4.0", when="@2.4.0.0") + depends_on("precice@2.3.0", when="@2.3.0.1") + depends_on("precice@2.2.1", when="@2.2.1.1") + depends_on("precice@2.2.0", when="@2.2.0.1:2.2.0.2") + depends_on("precice@2.1.1", when="@2.1.1.1:2.1.1.2") + depends_on("precice@2.1.0", when="@2.1.0.1") + depends_on("precice@2.0.2", when="@2.0.2.1") + depends_on("precice@2.0.1", when="@2.0.1.1") + depends_on("precice@2.0.0", when="@2.0.0.1:2.0.0.2") depends_on("python@3:", type=("build", "link", "run")) depends_on("py-setuptools", type="build") From 4533ba3ddb83030f36e17bcdc083c498cf36764c Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 22 Aug 2022 15:16:08 +0200 Subject: [PATCH 13/24] Removing all trial changes and reverting package.py to what it is in the Spack repo --- spack/repo/packages/py-pyprecice/package.py | 38 ++++++++++----------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/spack/repo/packages/py-pyprecice/package.py b/spack/repo/packages/py-pyprecice/package.py index 8642e960..9e8978cb 100644 --- a/spack/repo/packages/py-pyprecice/package.py +++ b/spack/repo/packages/py-pyprecice/package.py @@ -19,12 +19,12 @@ class PyPyprecice(PythonPackage): # Always prefer final version of release candidate version("develop", branch="develop") - version('2.4.0.0', sha256='8877da85df97d66966892440c7e777b667d8e6a33747304ed3762f4c33b729ec') - version('2.3.0.1', sha256='ed4e48729b662680beaa4ee2a9aff724a79e760534c6c58181be739988da2789') - version('2.2.1.1', sha256='139bac5077c3807e1b7b83d8d0da5ca0fc8c17393fd0df4bc5999cd63a351b78') - version('2.2.0.2', sha256='2287185f9ad7500dced53459543d27bb66bd2438c2e4bf81ee3317e6a00513d5') - version('2.2.0.1', sha256='229625e2e6df03987ababce5abe2021b0974cbe5a588b936a9cba653f4908d4b') - version('2.1.1.2', sha256='363eb3eeccf964fd5ee87012c1032353dd1518662868f2b51f04a6d8a7154045') + version("2.4.0.0", sha256="8877da85df97d66966892440c7e777b667d8e6a33747304ed3762f4c33b729ec") + version("2.3.0.1", sha256="ed4e48729b662680beaa4ee2a9aff724a79e760534c6c58181be739988da2789") + version("2.2.1.1", sha256="139bac5077c3807e1b7b83d8d0da5ca0fc8c17393fd0df4bc5999cd63a351b78") + version("2.2.0.2", sha256="2287185f9ad7500dced53459543d27bb66bd2438c2e4bf81ee3317e6a00513d5") + version("2.2.0.1", sha256="229625e2e6df03987ababce5abe2021b0974cbe5a588b936a9cba653f4908d4b") + version("2.1.1.2", sha256="363eb3eeccf964fd5ee87012c1032353dd1518662868f2b51f04a6d8a7154045") version("2.1.1.1", sha256="972f574549344b6155a8dd415b6d82512e00fa154ca25ae7e36b68d4d2ed2cf4") version("2.1.0.1", sha256="ac5cb7412c6b96b08a04fa86ea38e52d91ea739a3bd1c209baa93a8275e4e01a") version("2.0.2.1", sha256="c6fca26332316de041f559aecbf23122a85d6348baa5d3252be4ddcd5e94c09a") @@ -33,26 +33,24 @@ class PyPyprecice(PythonPackage): version("2.0.0.1", sha256="96eafdf421ec61ad6fcf0ab1d3cf210831a815272984c470b2aea57d4d0c9e0e") depends_on("precice@develop", when="@develop") - depends_on("precice@2.4.0", when="@2.4.0.0") - depends_on("precice@2.3.0", when="@2.3.0.1") - depends_on("precice@2.2.1", when="@2.2.1.1") - depends_on("precice@2.2.0", when="@2.2.0.1:2.2.0.2") - depends_on("precice@2.1.1", when="@2.1.1.1:2.1.1.2") - depends_on("precice@2.1.0", when="@2.1.0.1") - depends_on("precice@2.0.2", when="@2.0.2.1") - depends_on("precice@2.0.1", when="@2.0.1.1") - depends_on("precice@2.0.0", when="@2.0.0.1:2.0.0.2") + depends_on("precice@2.4.0", when="@2.4.0.1:2.4.0") + depends_on("precice@2.3.0", when="@2.3.0.1:2.3.1") + depends_on("precice@2.2.1", when="@2.2.1.1:2.2.1") + depends_on("precice@2.2.0", when="@2.2.0.1:2.2.0") + depends_on("precice@2.1.1", when="@2.1.1.1:2.1.1") + depends_on("precice@2.1.0", when="@2.1.0.1:2.1.0") + depends_on("precice@2.0.2", when="@2.0.2.1:2.0.2") + depends_on("precice@2.0.1", when="@2.0.1.1:2.0.1") + depends_on("precice@2.0.0", when="@2.0.0.1:2.0.0") depends_on("python@3:", type=("build", "link", "run")) depends_on("py-setuptools", type="build") depends_on("py-numpy", type=("build", "link", "run")) depends_on("py-mpi4py", type=("build", "run")) depends_on("py-cython@0.29:", type="build") - depends_on("py-packaging", when="@:2.1", type="build") - depends_on("py-pip@19.0.0:", when="@:2.1", type="build") + depends_on("py-packaging", type="build") + depends_on("py-pip@19.0.0:", type="build") @when("@:2.1") def patch(self): - filter_file( - "distutils.command.install", "setuptools.command.install", "setup.py" - ) + filter_file("distutils.command.install", "setuptools.command.install", "setup.py") From c19bad0669b27a28eeb2e47633b46ed0f90e7814 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 22 Aug 2022 16:28:52 +0200 Subject: [PATCH 14/24] Try to upload spack build log file as artifact --- .github/workflows/build-spack.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 41367b2f..769a5a86 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -27,3 +27,8 @@ jobs: - name: Try to build py-pyprecice with spack and test it run: | . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib/):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" + - name: Upload log + uses: actions/upload-artifact@v3 + with: + name: build-spack-log + path: /__w/python-bindings/python-bindings/spack-build-out.txt From b6aa2b18d25db927f0748753c60cbc8b4c14266c Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 22 Aug 2022 16:40:15 +0200 Subject: [PATCH 15/24] Segregating building and testing in build_spack workflow --- .github/workflows/build-spack.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 769a5a86..4afeb656 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -26,7 +26,13 @@ jobs: cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ - name: Try to build py-pyprecice with spack and test it run: | - . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib/):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" + . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib/):${PYTHONPATH} + - name: Check if py-pyprecice installed with Spack works + run: | + spack env activate && spack load py-pyprecice + mkdir runner && cd runner + BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") + echo "Installed version of bindings is ${BINDINGS_VERSION}" - name: Upload log uses: actions/upload-artifact@v3 with: From 1eda440268a3b814cdbc93dfc09d646ada72ef5e Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Tue, 23 Aug 2022 09:54:00 +0200 Subject: [PATCH 16/24] Update Dockerfile for Spack build and test to Ubuntu 20.04 --- .github/workflows/build-env.yml | 4 ++-- .github/workflows/build-spack.yml | 2 +- spack/README.md | 8 ++++---- ...dockerfile => ci-spack-pyprecice-deps-2004.dockerfile} | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename spack/{ci-spack-pyprecice-deps-1804.dockerfile => ci-spack-pyprecice-deps-2004.dockerfile} (94%) diff --git a/.github/workflows/build-env.yml b/.github/workflows/build-env.yml index 273d90f0..b793147f 100644 --- a/.github/workflows/build-env.yml +++ b/.github/workflows/build-env.yml @@ -24,5 +24,5 @@ jobs: with: push: true context: . - file: spack/ci-spack-pyprecice-deps-1804.dockerfile - tags: precice/ci-spack-pyprecice-deps-1804 + file: spack/ci-spack-pyprecice-deps-2004.dockerfile + tags: precice/ci-spack-pyprecice-deps-2004 diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 4afeb656..aaf1440c 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -14,7 +14,7 @@ jobs: name: build_spack runs-on: ubuntu-latest timeout-minutes: 15 - container: precice/ci-spack-pyprecice-deps-1804 + container: precice/ci-spack-pyprecice-deps-2004 defaults: run: shell: "bash --login -eo pipefail {0}" diff --git a/spack/README.md b/spack/README.md index ee31a2b3..1225585e 100644 --- a/spack/README.md +++ b/spack/README.md @@ -2,11 +2,11 @@ The Spack package `py-pyprecice` provides the python bindings via Spack and was submitted via [pull request 19558](https://github.com/spack/spack/pull/19558) in the Spack repository. This folder contains the Spack package script that can be used for testing whether the Spack installation works. -## Docker image `precice/ci-spack-pyprecice-deps-1804` +## Docker image `precice/ci-spack-pyprecice-deps-2004` -The workflow `build-spack-pyprecice-deps` in `.github/workflows/build-env.yml` creates the image `precice/ci-spack-pyprecice-deps-1804`. This image contains all dependencies of `py-pyprecice@develop`. +The workflow `build-spack-pyprecice-deps` in `.github/workflows/build-env.yml` creates the image `precice/ci-spack-pyprecice-deps-2004`. This image contains all dependencies of `py-pyprecice@develop`. -The workflow `build_spack` in `.github/workflows/build-spack.yml` uses the image `precice/ci-spack-pyprecice-deps-1804` to reduce build time. The workflow uses the `package.py` from this repository to build the latest version of the bindings and run a small test on this version. +The workflow `build_spack` in `.github/workflows/build-spack.yml` uses the image `precice/ci-spack-pyprecice-deps-2004` to reduce build time. The workflow uses the `package.py` from this repository to build the latest version of the bindings and run a small test on this version. ## When a new Spack release is necessary @@ -62,4 +62,4 @@ The workflow `build_spack` in `.github/workflows/build-spack.yml` uses the image 7. Ideally one runs the solverdummy with the freshly installed Python bindings. * Use `package.py` together with the patches provided in `python-bindings/spack/repo/packages/py-pyprecice` to [create a pull request for Spack](https://github.com/spack/spack/compare) and submit the new release. -* After the pull request in the Spack repository is merged, merge the current package configuration into the repository of the Python bindings if necessery. \ No newline at end of file +* After the pull request in the Spack repository is merged, merge the current package configuration into the repository of the Python bindings if necessery. diff --git a/spack/ci-spack-pyprecice-deps-1804.dockerfile b/spack/ci-spack-pyprecice-deps-2004.dockerfile similarity index 94% rename from spack/ci-spack-pyprecice-deps-1804.dockerfile rename to spack/ci-spack-pyprecice-deps-2004.dockerfile index 016fec64..7515760e 100644 --- a/spack/ci-spack-pyprecice-deps-1804.dockerfile +++ b/spack/ci-spack-pyprecice-deps-2004.dockerfile @@ -1,5 +1,5 @@ # Build stage with Spack pre-installed and ready to be used -FROM spack/ubuntu-bionic:latest +FROM spack/ubuntu-focal:latest # Mount the current sources into the build container # and build the default environment From ca5b721d798b7a7ead2c12070b5c36f43356edba Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Wed, 24 Aug 2022 15:52:29 +0200 Subject: [PATCH 17/24] Reverting build-spack.yml to its original state --- .github/workflows/build-spack.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index aaf1440c..223abeb3 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -14,7 +14,7 @@ jobs: name: build_spack runs-on: ubuntu-latest timeout-minutes: 15 - container: precice/ci-spack-pyprecice-deps-2004 + container: precice/ci-spack-pyprecice-deps-1804 defaults: run: shell: "bash --login -eo pipefail {0}" @@ -26,15 +26,4 @@ jobs: cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ - name: Try to build py-pyprecice with spack and test it run: | - . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib/):${PYTHONPATH} - - name: Check if py-pyprecice installed with Spack works - run: | - spack env activate && spack load py-pyprecice - mkdir runner && cd runner - BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") - echo "Installed version of bindings is ${BINDINGS_VERSION}" - - name: Upload log - uses: actions/upload-artifact@v3 - with: - name: build-spack-log - path: /__w/python-bindings/python-bindings/spack-build-out.txt + . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib.):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" From 9c6d1c2f88595e4bb3e2a98f2fff4ccd5067511f Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Wed, 24 Aug 2022 16:04:39 +0200 Subject: [PATCH 18/24] Use Ubuntu 20.04 container --- .github/workflows/build-spack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 223abeb3..d5c8c385 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -14,7 +14,7 @@ jobs: name: build_spack runs-on: ubuntu-latest timeout-minutes: 15 - container: precice/ci-spack-pyprecice-deps-1804 + container: precice/ci-spack-pyprecice-deps-2004 defaults: run: shell: "bash --login -eo pipefail {0}" From ab2236cdad73eb980430d4ce30d4e5a4ff228bd1 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Wed, 24 Aug 2022 17:10:52 +0200 Subject: [PATCH 19/24] Install and load py-pyprecice package before testing it in the build_spack workflow --- .github/workflows/build-spack.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index d5c8c385..31fba6e6 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -26,4 +26,8 @@ jobs: cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ - name: Try to build py-pyprecice with spack and test it run: | - . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib.):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" + . /opt/spack/share/spack/setup-env.sh + spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 + spack install pyprecice.test.py-pyprecice + spack load precice py-pyprecice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib.):${PYTHONPATH} + BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" From 475610c94679a93bede6b9a35f5190acc01d2cdc Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Wed, 24 Aug 2022 18:16:34 +0200 Subject: [PATCH 20/24] Simplifying the build-spack Action --- .github/workflows/build-spack.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 31fba6e6..c2278455 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -27,7 +27,9 @@ jobs: - name: Try to build py-pyprecice with spack and test it run: | . /opt/spack/share/spack/setup-env.sh - spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 - spack install pyprecice.test.py-pyprecice - spack load precice py-pyprecice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib.):${PYTHONPATH} + spack env activate ci && spack arch + spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 + spack find + spack load precice py-numpy py-mpi4py py-cython openssh openmpi py-pyprecice + export PYTHONPATH=${PWD}/build/$(ls build | grep lib.):${PYTHONPATH} BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" From 094c14a1e9cf0d3fb5f9b0814a5e33e32b217e7a Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Thu, 25 Aug 2022 13:51:45 +0200 Subject: [PATCH 21/24] Furhter simplifying workflow --- .github/workflows/build-spack.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index c2278455..9328b89d 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -26,10 +26,11 @@ jobs: cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ - name: Try to build py-pyprecice with spack and test it run: | + apt-get -yy update + apt-get install -y lsb-release . /opt/spack/share/spack/setup-env.sh spack env activate ci && spack arch spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 spack find - spack load precice py-numpy py-mpi4py py-cython openssh openmpi py-pyprecice - export PYTHONPATH=${PWD}/build/$(ls build | grep lib.):${PYTHONPATH} + spack load py-pyprecice BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" From 8bd9e14d787dd3f7c95ebd335166eca80ec356bd Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Thu, 25 Aug 2022 14:48:58 +0200 Subject: [PATCH 22/24] Updating ci-spack-pyprecice-deps container to Ubuntu 22.04 --- .github/workflows/build-spack.yml | 2 +- spack/README.md | 6 +++--- ...4.dockerfile => ci-spack-pyprecice-deps-2204.dockerfile} | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename spack/{ci-spack-pyprecice-deps-2004.dockerfile => ci-spack-pyprecice-deps-2204.dockerfile} (94%) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 9328b89d..7dec0de9 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -14,7 +14,7 @@ jobs: name: build_spack runs-on: ubuntu-latest timeout-minutes: 15 - container: precice/ci-spack-pyprecice-deps-2004 + container: precice/ci-spack-pyprecice-deps-2204 defaults: run: shell: "bash --login -eo pipefail {0}" diff --git a/spack/README.md b/spack/README.md index 1225585e..f905741f 100644 --- a/spack/README.md +++ b/spack/README.md @@ -2,11 +2,11 @@ The Spack package `py-pyprecice` provides the python bindings via Spack and was submitted via [pull request 19558](https://github.com/spack/spack/pull/19558) in the Spack repository. This folder contains the Spack package script that can be used for testing whether the Spack installation works. -## Docker image `precice/ci-spack-pyprecice-deps-2004` +## Docker image `precice/ci-spack-pyprecice-deps-2204` -The workflow `build-spack-pyprecice-deps` in `.github/workflows/build-env.yml` creates the image `precice/ci-spack-pyprecice-deps-2004`. This image contains all dependencies of `py-pyprecice@develop`. +The workflow `build-spack-pyprecice-deps` in `.github/workflows/build-env.yml` creates the image `precice/ci-spack-pyprecice-deps-2204`. This image contains all dependencies of `py-pyprecice@develop`. -The workflow `build_spack` in `.github/workflows/build-spack.yml` uses the image `precice/ci-spack-pyprecice-deps-2004` to reduce build time. The workflow uses the `package.py` from this repository to build the latest version of the bindings and run a small test on this version. +The workflow `build_spack` in `.github/workflows/build-spack.yml` uses the image `precice/ci-spack-pyprecice-deps-2204` to reduce build time. The workflow uses the `package.py` from this repository to build the latest version of the bindings and run a small test on this version. ## When a new Spack release is necessary diff --git a/spack/ci-spack-pyprecice-deps-2004.dockerfile b/spack/ci-spack-pyprecice-deps-2204.dockerfile similarity index 94% rename from spack/ci-spack-pyprecice-deps-2004.dockerfile rename to spack/ci-spack-pyprecice-deps-2204.dockerfile index 7515760e..545b4baf 100644 --- a/spack/ci-spack-pyprecice-deps-2004.dockerfile +++ b/spack/ci-spack-pyprecice-deps-2204.dockerfile @@ -1,5 +1,5 @@ # Build stage with Spack pre-installed and ready to be used -FROM spack/ubuntu-focal:latest +FROM spack/ubuntu-jammy:latest # Mount the current sources into the build container # and build the default environment From 3d3d29700f68b170deff5673a2f87bcb45900b90 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Thu, 25 Aug 2022 15:02:37 +0200 Subject: [PATCH 23/24] Update to Ubuntu 22.04 image in build-env --- .github/workflows/build-env.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-env.yml b/.github/workflows/build-env.yml index b793147f..8de2030a 100644 --- a/.github/workflows/build-env.yml +++ b/.github/workflows/build-env.yml @@ -24,5 +24,5 @@ jobs: with: push: true context: . - file: spack/ci-spack-pyprecice-deps-2004.dockerfile - tags: precice/ci-spack-pyprecice-deps-2004 + file: spack/ci-spack-pyprecice-deps-2204.dockerfile + tags: precice/ci-spack-pyprecice-deps-2204 From 0324deb8e1a0f57b64d5c4e9a66774d43941fe5b Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Thu, 25 Aug 2022 20:12:24 +0200 Subject: [PATCH 24/24] Finally build_spack works --- .github/workflows/build-spack.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 7dec0de9..f68d43c9 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -30,7 +30,8 @@ jobs: apt-get install -y lsb-release . /opt/spack/share/spack/setup-env.sh spack env activate ci && spack arch - spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 + spack develop pyprecice.test.py-pyprecice@develop target=x86_64 + spack install spack find spack load py-pyprecice BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}"