-
Notifications
You must be signed in to change notification settings - Fork 0
Creating a test build based on a release
JCF: Created Nov-26-2024
A very common idiom, for which there's built-in support in the v5 nightly build, is to create a test build where if a repo has a particular branch name (say, johnfreeman/new_name_for_class
), the build uses that branch, otherwise it defaults to the develop
branch. However, in the recent case of the NFDT_DEV_241126_A9
build, the default isn't the develop
branch but rather the fddaq-v5.2.0
build itself. We do not have built-in support for this approach, but here are a few notes on how I modified daq-release
on a temporary johnfreeman/modified_workflows_sandbox
branch (head commit 4a17e64854cd67fda2db60ccb2e370e7af4e3c60
) to get this to work:
The changes I made are the following:
- In
build-nightly-release-alma9.yml
, disabled the calls tocheckout-daq-package.py
, used to save a record of the code. Less than ideal, but those scripts don't support the idea of a mix of feature branches and tagged versions - Hardwire in the
fddaq-v5.2.0
release in the-i
argument tomake-release-repo.py
:-i configs/${DET}daq/${DET}daq-v5.2.0/release.yaml
Note that in the above, I did this for all make-release-repo.py
calls: coredaq, fddaq and Python
In fact, below you can see the git diff
showing the changes:
diff --git a/.github/workflows/build-nightly-release-alma9.yml b/.github/workflows/build-nightly-release-alma9.yml
index e316913d..f0bab67a 100644
--- a/.github/workflows/build-nightly-release-alma9.yml
+++ b/.github/workflows/build-nightly-release-alma9.yml
@@ -63,7 +63,7 @@ jobs:
input_feature_branch=${{ github.event.inputs.feature-branch }}
# For automatically triggered workflows where feature-branch is not set, fall back to default branch
branch=${input_feature_branch:-"develop"}
- daq-release/scripts/checkout-daq-package.py -i daq-release/configs/coredaq/coredaq-develop/release.yaml -a -o $DET_RELEASE_DIR/sourcecode -b $branch
+ #daq-release/scripts/checkout-daq-package.py -i daq-release/configs/coredaq/coredaq-v5.2.0/release.yaml -a -o $DET_RELEASE_DIR/sourcecode -b $branch
daq-release/scripts/spack/build-release.sh $BASE_RELEASE_DIR $DET_RELEASE_DIR core $OS ${{ github.event.inputs.feature-branch }}
cd $BASE_RELEASE_DIR/../
@@ -87,7 +87,7 @@ jobs:
input_feature_branch=${{ github.event.inputs.feature-branch }}
# For automatically triggered workflows where feature-branch is not set, fall back to default branch
branch=${input_feature_branch:-"develop"}
- daq-release/scripts/checkout-daq-package.py -i daq-release/configs/fddaq/fddaq-develop/release.yaml -a -o $DET_RELEASE_DIR/sourcecode
+ #daq-release/scripts/checkout-daq-package.py -i daq-release/configs/fddaq/fddaq-v5.2.0/release.yaml -a -o $DET_RELEASE_DIR/sourcecode -b $branch
daq-release/scripts/spack/build-release.sh $BASE_RELEASE_DIR $DET_RELEASE_DIR fd $OS ${{ github.event.inputs.feature-branch }}
cd $DET_RELEASE_DIR/../
diff --git a/scripts/spack/build-release.sh b/scripts/spack/build-release.sh
index 26ca7b4a..7f2f38c3 100755
--- a/scripts/spack/build-release.sh
+++ b/scripts/spack/build-release.sh
@@ -65,24 +65,22 @@ cd $DAQ_RELEASE_REPO
spack_template_dir=spack-repos/${DET}daq-repo-template
echo python3 scripts/spack/make-release-repo.py -u \
- -i ${release_yaml} \
- -t $spack_template_dir \
- -r ${RELEASE_TAG} \
- -o ${SPACK_AREA}/spack-installation \
- ${base_release_arg} \
- ${branch_arg} \
- || exit 5
-
+ -i configs/${DET}daq/${DET}daq-v5.2.0/release.yaml \
+ -t $spack_template_dir \
+ -r ${RELEASE_TAG} \
+ -o ${SPACK_AREA}/spack-installation \
+ ${base_release_arg} \
+ ${branch_arg} \
+ || exit 5
python3 scripts/spack/make-release-repo.py -u \
- -i ${release_yaml} \
- -t $spack_template_dir \
- -r ${RELEASE_TAG} \
- -o ${SPACK_AREA}/spack-installation \
- ${base_release_arg} \
- ${branch_arg} \
- || exit 5
-
+ -i configs/${DET}daq/${DET}daq-v5.2.0/release.yaml \
+ -t $spack_template_dir \
+ -r ${RELEASE_TAG} \
+ -o ${SPACK_AREA}/spack-installation \
+ ${base_release_arg} \
+ ${branch_arg} \
+ || exit 5
cd $SPACK_AREA
@@ -126,12 +124,12 @@ if [[ "$DET" == "fd" || "$DET" == "nd" ]]; then
echo /usr/bin/python3 scripts/spack/make-release-repo.py \
-o ${SPACK_AREA} \
--pyvenv-requirements \
- -i ${release_yaml}
+ -i configs/fddaq/fddaq-v5.2.0/release.yaml
/usr/bin/python3 scripts/spack/make-release-repo.py \
-o ${SPACK_AREA} \
--pyvenv-requirements \
- -i ${release_yaml} \
+ -i configs/fddaq/fddaq-v5.2.0/release.yaml \
|| exit 10
python -m venv --prompt dbt ${SPACK_AREA}/.venv