From 057b431a2bc896ada44914fb05e6909753b0542a Mon Sep 17 00:00:00 2001 From: nicolas le goff Date: Mon, 28 Oct 2024 00:35:10 +0100 Subject: [PATCH] spack-reusable: adapted the workflow for spack-0.22.2 --- .github/workflows/spack-reusable.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/spack-reusable.yml b/.github/workflows/spack-reusable.yml index 2b350e3..a9abb87 100644 --- a/.github/workflows/spack-reusable.yml +++ b/.github/workflows/spack-reusable.yml @@ -41,7 +41,9 @@ jobs: spack add python@3 spack add py-pytest # Must set a version number > last version to take right variants in recipes - spack develop -p $GITHUB_WORKSPACE --no-clone ${{ github.event.repository.name }}@999 + export version_number=`spack info ${{ github.event.repository.name }} | grep -A 1 "Preferred version:" | tail -n 1 | awk {'print $1'}` + echo $version_number + spack develop -p $GITHUB_WORKSPACE --no-clone ${{ github.event.repository.name }}@$version_number spack concretize --reuse spack install -v --test=root @@ -54,7 +56,8 @@ jobs: spack env activate ci-env spack load python spack load py-pytest - spack load ${{ github.event.repository.name }}@999 + export version_number=`spack info ${{ github.event.repository.name }} | grep -A 1 "Preferred version:" | tail -n 1 | awk {'print $1'}` + spack load ${{ github.event.repository.name }}@$version_number # trace for logs python --version @@ -64,7 +67,7 @@ jobs: echo $PYTHONPATH # set PYTHONPATH variable - export PACKAGE_PATH=$PACKAGE_PATH/lib/python3.10/site-packages + export PACKAGE_PATH=$PACKAGE_PATH/lib/python3.11/site-packages export PYTHONPATH=$PYTHONPATH:$PACKAGE_PATH echo $PYTHONPATH