Skip to content

Commit

Permalink
Use key4hep-spack instead of ${name}
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 16, 2024
1 parent 2912761 commit 90b6595
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/concretize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,20 @@ jobs:
run: |
name=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')
if [ "${{ matrix.image }}" = "alma9" ]; then
docker run --name container --privileged -v ${GITHUB_WORKSPACE}:/${name} -v ~/.cache/ccache:/root/.cache/ccache -d ghcr.io/key4hep/key4hep-images/alma9-cvmfs tail -f /dev/null
docker run --name container --privileged -v ${GITHUB_WORKSPACE}:/key4hep-spack -v ~/.cache/ccache:/root/.cache/ccache -d ghcr.io/key4hep/key4hep-images/alma9-cvmfs tail -f /dev/null
elif [ "${{ matrix.image }}" = "ubuntu22" ]; then
docker run --name container --privileged -v ${GITHUB_WORKSPACE}:/${name} -v ~/.cache/ccache:/root/.cache/ccache -d ghcr.io/key4hep/key4hep-images/ubuntu22-cvmfs tail -f /dev/null
docker run --name container --privileged -v ${GITHUB_WORKSPACE}:/key4hep-spack -v ~/.cache/ccache:/root/.cache/ccache -d ghcr.io/key4hep/key4hep-images/ubuntu22-cvmfs tail -f /dev/null
else
echo "Unknown image"
exit 1
fi
- name: Setup environment and concretize
run: |
name=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')
cat <<'EOF' > ${GITHUB_WORKSPACE}/script_container.sh
set -e
name=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')
cd /
ls -lah /
ls -lah /key4hep-spack
Expand All @@ -48,20 +44,20 @@ jobs:
source spack/share/spack/setup-env.sh
cd /spack
git checkout $(cat /${name}/.latest-commit)
source /${name}/.cherry-pick
git checkout $(cat /key4hep-spack/.latest-commit)
source /key4hep-spack/.cherry-pick
if [ "${{ matrix.build_type }}" = "release" ]; then
env=key4hep-release
elif [ "${{ matrix.build_type }}" = "nightly" ]; then
env=key4hep-nightly-opt
pip3 install pyyaml
python3 /${name}/scripts/fetch_nightly_versions.py --path /${name}/environments/key4hep-common/packages.yaml --extra-path /${name}/environments/key4hep-nightly-opt/packages.yaml ""
python3 /key4hep-spack/scripts/fetch_nightly_versions.py --path /key4hep-spack/environments/key4hep-common/packages.yaml --extra-path /key4hep-spack/environments/key4hep-nightly-opt/packages.yaml ""
else
echo "Unknown build type"
exit 1
fi
cd /${name}/environments/${env}
cd /key4hep-spack/environments/${env}
spack env activate .
spack concretize
Expand All @@ -71,4 +67,4 @@ jobs:
# cat ${GITHUB_WORKSPACE}/script_container.sh
docker exec container /bin/bash -c "/mount.sh && /${name}/script_container.sh"
docker exec container /bin/bash -c "/mount.sh && /key4hep-spack/script_container.sh"

0 comments on commit 90b6595

Please sign in to comment.