diff --git a/.github/workflows/concretize-lxplus-pr-target.yaml b/.github/workflows/concretize-lxplus-pr-target.yaml index c7603688..0dcc4c79 100644 --- a/.github/workflows/concretize-lxplus-pr-target.yaml +++ b/.github/workflows/concretize-lxplus-pr-target.yaml @@ -30,13 +30,11 @@ jobs: docker run -it --name CI_container -e GITHUB_ENV=${GITHUB_ENV} -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d clicdp/cc7-lcg /bin/bash - name: Setup container run: | - docker exec CI_container /bin/bash -c ' ln -s /usr/lib64/liblzma.so.5.2.2 /usr/lib64/liblzma.so;\ - yum -y install gcc;' - + docker exec CI_container /bin/bash -c ' ln -s /usr/lib64/liblzma.so.5.2.2 /usr/lib64/liblzma.so;' - name: Setup Spack run: | docker exec CI_container /bin/bash -c 'cd ./Package;\ - source scripts/ci_setup_spack.sh;' + source scripts/ci_setup_spack2.sh;' - name: Concretize run: | docker exec CI_container /bin/bash -c 'cd ./Package;\ diff --git a/config/compilers_centos7_cvmfs.yaml b/config/compilers_centos7_cvmfs.yaml new file mode 100644 index 00000000..5342c7a0 --- /dev/null +++ b/config/compilers_centos7_cvmfs.yaml @@ -0,0 +1,14 @@ +compilers: +- compiler: + paths: + cc: /cvmfs/sw.hsf.org/spackages/linux-centos7-haswell/gcc-4.8.5/gcc-8.3.0-avsmzt7bekq7ispf6zlarx6vwdretbae/bin/gcc + cxx: /cvmfs/sw.hsf.org/spackages/linux-centos7-haswell/gcc-4.8.5/gcc-8.3.0-avsmzt7bekq7ispf6zlarx6vwdretbae/bin/g++ + f77: /cvmfs/sw.hsf.org/spackages/linux-centos7-haswell/gcc-4.8.5/gcc-8.3.0-avsmzt7bekq7ispf6zlarx6vwdretbae/bin/gfortran + fc: /cvmfs/sw.hsf.org/spackages/linux-centos7-haswell/gcc-4.8.5/gcc-8.3.0-avsmzt7bekq7ispf6zlarx6vwdretbae/bin/gfortran + operating_system: centos7 + target: x86_64 + modules: [] + environment: {} + extra_rpaths: [] + flags: {} + spec: gcc@8.3.0 diff --git a/scripts/ci_setup_spack.sh b/scripts/ci_setup_spack.sh index 7edfcb7e..7ce6611f 100755 --- a/scripts/ci_setup_spack.sh +++ b/scripts/ci_setup_spack.sh @@ -13,7 +13,7 @@ echo ' - $SPACK_ROOT/var/spack/repos/key4hep-spack' >> spack/etc/spack/repos.yaml tar -czf key4hep-spack.tar.gz spack cp ${PWD}/spack/var/spack/repos/key4hep-spack/config/cvmfs_build/upstreams.yaml spack/etc/spack/ -# compiler setup + compiler setup spack load gcc spack compiler find --scope site tar -czf key4hep-spack_centos7-cvmfs.tar.gz spack diff --git a/scripts/ci_setup_spack2.sh b/scripts/ci_setup_spack2.sh new file mode 100755 index 00000000..ed0e74b2 --- /dev/null +++ b/scripts/ci_setup_spack2.sh @@ -0,0 +1,20 @@ +# set up spack inside the k4-spack repo + if [ -n "$SPACK_VERSION" ]; then git clone https://github.com/key4hep/spack ; cd spack; git checkout $SPACK_VERSION; cd ..; else git clone --depth 1 https://github.com/key4hep/spack; fi + source spack/share/spack/setup-env.sh +# get the right config files to the right places + cp config/packages.yaml spack/etc/spack/ + mkdir spack/var/spack/repos/key4hep-spack + cp -r * spack/var/spack/repos/key4hep-spack || true +# clean up git directories for zip + rm -rf spack/var/spack/repos/key4hep-spack/spack || true + rm -rf spack/.git +# register k4 package recipes with spack + echo "repos:" > spack/etc/spack/repos.yaml + echo ' - $SPACK_ROOT/var/spack/repos/key4hep-spack' >> spack/etc/spack/repos.yaml + tar -czf key4hep-spack.tar.gz spack + cp ${PWD}/spack/var/spack/repos/key4hep-spack/config/cvmfs_build/upstreams.yaml spack/etc/spack/ + cp config/compilers_centos7_cvmfs.yaml spack/etc/spack/compilers.yaml +# compiler setup +# spack load gcc +# spack compiler find --scope site +# tar -czf key4hep-spack_centos7-cvmfs.tar.gz spack