|
78 | 78 | script: |
79 | 79 | - INSTALL_DIR=/usr/gapps/Spheral/$SYS_TYPE/spheral-$SPHERAL_REV_STR |
80 | 80 | - DEV_PKG_NAME=$SYS_TYPE-spheral-dev-pkg-$SPHERAL_REV_STR |
81 | | - - DEV_PKG_PATH=$INSTALL_DIR/$DEV_PKG_NAME |
| 81 | + |
| 82 | + - env SPHERAL_REV_STR=$SPHERAL_REV_STR INSTALL_DIR=$INSTALL_DIR SPEC=$SPEC SPACK_PKG_NAME=$SPACK_PKG_NAME BUILD_ALLOC="$BUILD_ALLOC" SCRIPT_DIR=$SCRIPT_DIR |
| 83 | + bash ./$SCRIPT_DIR/lc/generate-buildcache.sh |
| 84 | + |
82 | 85 | - echo $INSTALL_DIR &> install-dir.txt |
83 | 86 | - echo $DEV_PKG_NAME &> dev-pkg-name.txt |
84 | | - |
85 | | - # *** Copy spheral src and all submodules. *** |
86 | | - - mkdir -p $DEV_PKG_PATH/resources && cp -a $CI_PROJECT_DIR/. $DEV_PKG_PATH |
87 | | - |
88 | | - ### Initialize the upstream spack instance for this platform. |
89 | | - ### - We do this to load system configs / externals for this machine. |
90 | | - - ./$SCRIPT_DIR/devtools/tpl-manager.py --init-only --spheral-spack-dir=$UPSTREAM_DIR --spec=none |
91 | | - - source $UPSTREAM_DIR/spack/share/spack/setup-env.sh |
92 | | - |
93 | | - ### Installation Directory w/ Spheral rev numbers. |
94 | | - |
95 | | - ### Create a temporary spack environement with only the TPL specs for this specific commit of Spheral |
96 | | - - spack env create -d $INSTALL_DIR |
97 | | - - spack env activate $INSTALL_DIR |
98 | | - - spack add $SPACK_PKG_NAME@develop%$SPEC |
99 | | - - spack concretize --fresh -f |
100 | | - |
101 | | - # *** Pre-built binaries for $SYS_TYPE. *** |
102 | | - - spack buildcache create -auf -d $DEV_PKG_PATH/resources $(spack find --format /{hash}) |
103 | | - # *** All TPL tar files. *** |
104 | | - - spack mirror create -a -d $DEV_PKG_PATH/resources/mirror --exclude-specs "llnlspheral spheral" |
105 | | - # *** Spack bootstrapping resources. *** |
106 | | - - spack bootstrap mirror --binary-packages $DEV_PKG_PATH/resources |
107 | | - |
108 | | - ### Wrap it all up. |
109 | | - - tar -czvf "$DEV_PKG_PATH".tar.gz -C $INSTALL_DIR $DEV_PKG_NAME |
110 | | - |
111 | | - ### Cleanup |
112 | | - - rm -rf $DEV_PKG_PATH |
113 | 87 |
|
114 | 88 | artifacts: |
115 | 89 | paths: |
|
0 commit comments