Skip to content

Commit

Permalink
JCF: Issue #329: drop obsolete-and-now-confusing build-nightly-releas…
Browse files Browse the repository at this point in the history
…e.sh, rename build-stack.sh to build-release.sh
  • Loading branch information
jcfreeman2 committed Dec 11, 2023
1 parent 901cd0f commit 62fd848
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 152 deletions.
104 changes: 52 additions & 52 deletions .github/workflows/build-candidate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,40 @@ jobs:
export SPACK_EXTERNALS=/cvmfs/dunedaq.opensciencegrid.org/spack/externals/ext-${EXT_VERSION}/spack-$SPACK_VERSION-gcc-$GCC_VERSION
# dunedaq-v4.1.0
export DAQ_RELEASE=dunedaq-${{ github.event.inputs.release }}
export RELEASE_TAG=dunedaq-${{ github.event.inputs.release }}
# rc-v4.1.0-1
export RC_RELEASE=rc-${{ github.event.inputs.release }}-${{ github.event.inputs.build-number }}
export SPACK_RELEASE_DIR=/cvmfs/dunedaq-development.opensciencegrid.org/candidates/$RC_RELEASE
export SPACK_RELEASE=$SPACK_RELEASE_DIR/spack-$SPACK_VERSION-gcc-$GCC_VERSION
export RELEASE_DIR=/cvmfs/dunedaq-development.opensciencegrid.org/candidates/$RC_RELEASE
export SPACK_AREA=$RELEASE_DIR/spack-$SPACK_VERSION-gcc-$GCC_VERSION
mkdir -p ${SPACK_RELEASE}
mkdir -p ${SPACK_AREA}
cd ${SPACK_RELEASE}
cd ${SPACK_AREA}
wget https://github.com/spack/spack/archive/refs/tags/v${SPACK_VERSION}.tar.gz
tar xf v${SPACK_VERSION}.tar.gz
ln -s spack-${SPACK_VERSION} spack-installation
rm -f v${SPACK_VERSION}.tar.gz
export DAQ_RELEASE_DIR=$GITHUB_WORKSPACE/daq-release
export DAQ_RELEASE_REPO=$GITHUB_WORKSPACE/daq-release
cd $DAQ_RELEASE_DIR
cd $DAQ_RELEASE_REPO
python3 scripts/spack/make-release-repo.py -u \
-i configs/dunedaq/${DAQ_RELEASE}/release.yaml \
-i configs/dunedaq/${RELEASE_TAG}/release.yaml \
-t spack-repos/dunedaq-repo-template \
-r ${RC_RELEASE} \
-o ${SPACK_RELEASE}/spack-${SPACK_VERSION}
-o ${SPACK_AREA}/spack-${SPACK_VERSION}
cd $SPACK_RELEASE
cd $SPACK_AREA
source spack-${SPACK_VERSION}/share/spack/setup-env.sh
echo "*********** spack arch ************ "
spack arch
cat <<EOT > $SPACK_ROOT/etc/spack/defaults/repos.yaml
repos:
- ${SPACK_RELEASE}/spack-${SPACK_VERSION}/spack-repo
- ${SPACK_AREA}/spack-${SPACK_VERSION}/spack-repo
- ${SPACK_EXTERNALS}/spack-${SPACK_VERSION}/spack-repo-externals
- \$spack/var/spack/repos/builtin
EOT
Expand All @@ -84,18 +84,18 @@ jobs:
cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/linux/compilers.yaml \
$SPACK_RELEASE/spack-${SPACK_VERSION}/etc/spack/defaults/linux/
$SPACK_AREA/spack-${SPACK_VERSION}/etc/spack/defaults/linux/
# verify the compilers have been added
spack compiler list
\cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/config.yaml $SPACK_RELEASE/spack-${SPACK_VERSION}/etc/spack/defaults/config.yaml
\cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/modules.yaml $SPACK_RELEASE/spack-${SPACK_VERSION}/etc/spack/defaults/modules.yaml
\cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/config.yaml $SPACK_AREA/spack-${SPACK_VERSION}/etc/spack/defaults/config.yaml
\cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/modules.yaml $SPACK_AREA/spack-${SPACK_VERSION}/etc/spack/defaults/modules.yaml
sed -i 's/host_compatible: true/host_compatible: false/g' $SPACK_ROOT/etc/spack/defaults/concretizer.yaml
spack spec --reuse dunedaq@${RC_RELEASE}%[email protected] build_type=RelWithDebInfo arch=linux-almalinux9-x86_64 | tee $SPACK_RELEASE/spec_dunedaq_log.txt
spack spec --reuse dunedaq@${RC_RELEASE}%[email protected] build_type=RelWithDebInfo arch=linux-almalinux9-x86_64 | tee $SPACK_AREA/spec_dunedaq_log.txt
cd $SPACK_RELEASE_DIR/../
cd $RELEASE_DIR/../
tar zcf spack-${RC_RELEASE}.tar.gz ${RC_RELEASE}
mkdir -p $GITHUB_WORKSPACE/rc-spack-dunedaq
rm -rf $GITHUB_WORKSPACE/rc-spack-dunedaq/*
Expand All @@ -115,19 +115,19 @@ jobs:
export SPACK_EXTERNALS=/cvmfs/dunedaq.opensciencegrid.org/spack/externals/ext-${EXT_VERSION}/spack-$SPACK_VERSION-gcc-$GCC_VERSION
# dunedaq-v4.1.0
export DAQ_RELEASE=dunedaq-${{ github.event.inputs.release }}
export RELEASE_TAG=dunedaq-${{ github.event.inputs.release }}
# rc-v4.1.0-1
export RC_RELEASE=rc-${{ github.event.inputs.release }}-${{ github.event.inputs.build-number }}
export SPACK_RELEASE_DIR=/cvmfs/dunedaq-development.opensciencegrid.org/candidates/$RC_RELEASE
export SPACK_RELEASE=$SPACK_RELEASE_DIR/spack-$SPACK_VERSION-gcc-$GCC_VERSION
export RELEASE_DIR=/cvmfs/dunedaq-development.opensciencegrid.org/candidates/$RC_RELEASE
export SPACK_AREA=$RELEASE_DIR/spack-$SPACK_VERSION-gcc-$GCC_VERSION
cd $SPACK_RELEASE
cd $SPACK_AREA
source spack-${SPACK_VERSION}/share/spack/setup-env.sh
spack install --reuse dunedaq@${RC_RELEASE}%[email protected] dbe@${RC_RELEASE}%[email protected] build_type=RelWithDebInfo arch=linux-almalinux9-x86_64
spack clean -a
cd $SPACK_RELEASE_DIR/../
cd $RELEASE_DIR/../
tar zcf ${RC_RELEASE}.tar.gz ${RC_RELEASE}
mkdir -p $GITHUB_WORKSPACE/candidate-releases
rm -rf $GITHUB_WORKSPACE/candidate-releases/*
Expand All @@ -147,45 +147,45 @@ jobs:
export EXT_VERSION=v2.0
export SPACK_EXTERNALS=/cvmfs/dunedaq.opensciencegrid.org/spack/externals/ext-${EXT_VERSION}/spack-$SPACK_VERSION-gcc-$GCC_VERSION
export RC_BASE_RELEASE=rc-${{ github.event.inputs.release }}-${{ github.event.inputs.build-number }}
export SPACK_BASE_RELEASE_DIR=/cvmfs/dunedaq-development.opensciencegrid.org/candidates/$RC_BASE_RELEASE
export SPACK_BASE_RELEASE=$SPACK_BASE_RELEASE_DIR/spack-$SPACK_VERSION-gcc-$GCC_VERSION
export BASE_RELEASE_TAG=rc-${{ github.event.inputs.release }}-${{ github.event.inputs.build-number }}
export BASE_RELEASE_DIR=/cvmfs/dunedaq-development.opensciencegrid.org/candidates/$BASE_RELEASE_TAG
export BASE_SPACK_AREA=$BASE_RELEASE_DIR/spack-$SPACK_VERSION-gcc-$GCC_VERSION
# fd-v4.1.0
export DAQ_RELEASE=${DET}daq-${{ github.event.inputs.release }}
export RELEASE_TAG=${DET}daq-${{ github.event.inputs.release }}
# fd-v4.1.0-c1
export RC_RELEASE=${DET}-${{ github.event.inputs.release }}-c${{ github.event.inputs.build-number }}
export SPACK_RELEASE_DIR=/cvmfs/dunedaq-development.opensciencegrid.org/candidates/$RC_RELEASE
export SPACK_RELEASE=$SPACK_RELEASE_DIR/spack-$SPACK_VERSION-gcc-$GCC_VERSION
export RELEASE_DIR=/cvmfs/dunedaq-development.opensciencegrid.org/candidates/$RC_RELEASE
export SPACK_AREA=$RELEASE_DIR/spack-$SPACK_VERSION-gcc-$GCC_VERSION
mkdir -p ${SPACK_RELEASE}
mkdir -p ${SPACK_AREA}
cd ${SPACK_RELEASE}
cd ${SPACK_AREA}
wget https://github.com/spack/spack/archive/refs/tags/v${SPACK_VERSION}.tar.gz
tar xf v${SPACK_VERSION}.tar.gz
ln -s spack-${SPACK_VERSION} spack-installation
rm -f v${SPACK_VERSION}.tar.gz
export DAQ_RELEASE_DIR=$GITHUB_WORKSPACE/daq-release
export DAQ_RELEASE_REPO=$GITHUB_WORKSPACE/daq-release
cd $DAQ_RELEASE_DIR
cd $DAQ_RELEASE_REPO
python3 scripts/spack/make-release-repo.py -u \
-i configs/${DET}daq/${DAQ_RELEASE}/release.yaml \
-i configs/${DET}daq/${RELEASE_TAG}/release.yaml \
-t spack-repos/${DET}daq-repo-template \
-r ${RC_RELEASE} \
--base-release ${RC_BASE_RELEASE} \
-o ${SPACK_RELEASE}/spack-${SPACK_VERSION}
--base-release ${BASE_RELEASE_TAG} \
-o ${SPACK_AREA}/spack-${SPACK_VERSION}
cd $SPACK_RELEASE
cd $SPACK_AREA
source spack-${SPACK_VERSION}/share/spack/setup-env.sh
cat <<EOT > $SPACK_ROOT/etc/spack/defaults/repos.yaml
repos:
- ${SPACK_RELEASE}/spack-${SPACK_VERSION}/spack-repo
- ${SPACK_BASE_RELEASE}/spack-${SPACK_VERSION}/spack-repo
- ${SPACK_AREA}/spack-${SPACK_VERSION}/spack-repo
- ${BASE_SPACK_AREA}/spack-${SPACK_VERSION}/spack-repo
- ${SPACK_EXTERNALS}/spack-${SPACK_VERSION}/spack-repo-externals
- \$spack/var/spack/repos/builtin
EOT
Expand All @@ -194,44 +194,44 @@ jobs:
cat <<EOT >> $SPACK_ROOT/etc/spack/defaults/upstreams.yaml
upstreams:
${RC_BASE_RELEASE}:
install_tree: ${SPACK_BASE_RELEASE}/spack-${SPACK_VERSION}/opt/spack
${BASE_RELEASE_TAG}:
install_tree: ${BASE_SPACK_AREA}/spack-${SPACK_VERSION}/opt/spack
spack-externals:
install_tree: ${SPACK_EXTERNALS}/spack-${SPACK_VERSION}/opt/spack
EOT
cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/linux/compilers.yaml \
$SPACK_RELEASE/spack-${SPACK_VERSION}/etc/spack/defaults/linux/
$SPACK_AREA/spack-${SPACK_VERSION}/etc/spack/defaults/linux/
spack compiler list
\cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/config.yaml $SPACK_RELEASE/spack-${SPACK_VERSION}/etc/spack/defaults/config.yaml
\cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/modules.yaml $SPACK_RELEASE/spack-${SPACK_VERSION}/etc/spack/defaults/modules.yaml
\cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/config.yaml $SPACK_AREA/spack-${SPACK_VERSION}/etc/spack/defaults/config.yaml
\cp $SPACK_EXTERNALS/spack-${SPACK_VERSION}/etc/spack/defaults/modules.yaml $SPACK_AREA/spack-${SPACK_VERSION}/etc/spack/defaults/modules.yaml
sed -i 's/host_compatible: true/host_compatible: false/g' $SPACK_ROOT/etc/spack/defaults/concretizer.yaml
spack spec --reuse ${DET}daq@${RC_RELEASE}%[email protected] build_type=RelWithDebInfo arch=linux-almalinux9-x86_64 | tee $SPACK_RELEASE/spec_${DET}daq_log.txt
spack spec --reuse ${DET}daq@${RC_RELEASE}%[email protected] build_type=RelWithDebInfo arch=linux-almalinux9-x86_64 | tee $SPACK_AREA/spec_${DET}daq_log.txt
spack install --reuse ${DET}daq@${RC_RELEASE}%[email protected] build_type=RelWithDebInfo arch=linux-almalinux9-x86_64
# Generate pyvenv_requirements.txt
spack load ${DET}daq@${RC_RELEASE}
/usr/bin/python3 $DAQ_RELEASE_DIR/scripts/spack/make-release-repo.py \
-o ${SPACK_RELEASE}/../ \
/usr/bin/python3 $DAQ_RELEASE_REPO/scripts/spack/make-release-repo.py \
-o ${SPACK_AREA}/../ \
--pyvenv-requirements \
-i $DAQ_RELEASE_DIR/configs/${DET}daq/${DAQ_RELEASE}/release.yaml
-i $DAQ_RELEASE_REPO/configs/${DET}daq/${RELEASE_TAG}/release.yaml
python -m venv --prompt dbt ${SPACK_RELEASE}/../.venv
source ${SPACK_RELEASE}/../.venv/bin/activate
python -m venv --prompt dbt ${SPACK_AREA}/../.venv
source ${SPACK_AREA}/../.venv/bin/activate
python -m pip install -r ${SPACK_RELEASE}/../pyvenv_requirements.txt
python -m pip install -r ${SPACK_AREA}/../pyvenv_requirements.txt
spack clean -a
pushd ${SPACK_RELEASE_DIR}
cp $DAQ_RELEASE_DIR/configs/${DET}daq/${DET}daq-develop/dbt-build-order.cmake .
pushd ${RELEASE_DIR}
cp $DAQ_RELEASE_REPO/configs/${DET}daq/${DET}daq-develop/dbt-build-order.cmake .
tar zcf venv.tar.gz .venv/
popd
cd $SPACK_RELEASE_DIR/../
cd $RELEASE_DIR/../
tar zcf ${RC_RELEASE}.tar.gz ${RC_RELEASE}
mkdir -p $GITHUB_WORKSPACE/candidates-${DET}daq
rm -rf $GITHUB_WORKSPACE/candidates-${DET}daq/*
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nightly-spack-alma9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
export OS=almalinux9
source daq-release/.github/workflows/wf-setup-tools.sh
daq-release/scripts/spack/build-stack.sh $NIGHTLY_TAG dune $OS
daq-release/scripts/spack/build-release.sh $NIGHTLY_TAG dune $OS
cd $RELEASE_DIR/../
tar_and_stage_release ${RELEASE_TAG}.tar.gz
Expand All @@ -77,7 +77,7 @@ jobs:
export OS=almalinux9
source daq-release/.github/workflows/wf-setup-tools.sh
daq-release/scripts/spack/build-stack.sh $NIGHTLY_TAG fd $OS
daq-release/scripts/spack/build-release.sh $NIGHTLY_TAG fd $OS
cd $RELEASE_DIR/../
tar_and_stage_release ${RELEASE_TAG}.tar.gz
Expand All @@ -98,7 +98,7 @@ jobs:
export OS=almalinux9
source daq-release/.github/workflows/wf-setup-tools.sh
daq-release/scripts/spack/build-stack.sh $NIGHTLY_TAG nd $OS
daq-release/scripts/spack/build-release.sh $NIGHTLY_TAG nd $OS
cd $RELEASE_DIR/../
tar_and_stage_release ${RELEASE_TAG}.tar.gz
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nightly-spack-sl7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
export OS=scientific7
source daq-release/.github/workflows/wf-setup-tools.sh
daq-release/scripts/spack/build-stack.sh $NIGHTLY_TAG dune $OS
daq-release/scripts/spack/build-release.sh $NIGHTLY_TAG dune $OS
cd $RELEASE_DIR/../
tar_and_stage_release ${RELEASE_TAG}.tar.gz
Expand All @@ -79,7 +79,7 @@ jobs:
export OS=scientific7
source daq-release/.github/workflows/wf-setup-tools.sh
daq-release/scripts/spack/build-stack.sh $NIGHTLY_TAG fd $OS
daq-release/scripts/spack/build-release.sh $NIGHTLY_TAG fd $OS
cd $RELEASE_DIR/../
tar_and_stage_release ${RELEASE_TAG}.tar.gz
Expand All @@ -100,7 +100,7 @@ jobs:
export OS=scientific7
source daq-release/.github/workflows/wf-setup-tools.sh
daq-release/scripts/spack/build-stack.sh $NIGHTLY_TAG nd $OS
daq-release/scripts/spack/build-release.sh $NIGHTLY_TAG nd $OS
cd $RELEASE_DIR/../
tar_and_stage_release ${RELEASE_TAG}.tar.gz
Expand Down
94 changes: 0 additions & 94 deletions scripts/build-nightly-release.sh

This file was deleted.

File renamed without changes.

0 comments on commit 62fd848

Please sign in to comment.