From 9a797d349fa2a980043569a73b8049ea743a0ecd Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Mon, 16 Mar 2026 12:02:20 -0500 Subject: [PATCH 01/11] Mount CVMFS to nightly container for llvm access --- .github/workflows/test_daq_buildtools.yml | 17 +++++++++++++++++ scripts/test_daq-buildtools.sh | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index 2ae402b..fb378cb 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -16,16 +16,33 @@ on: description: "Branch from which to run test_daq-buildtools.sh" jobs: + load_cvmfs: + name: Load CVMFS + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - uses: cvmfs-contrib/github-action-cvmfs@v5 + with: + cvmfs_repositories: 'dunedaq-development.opensciencegrid.org' + test_daq_buildtools: name: Test daq-buildtools runs-on: ubuntu-latest container: image: ghcr.io/dune-daq/nightly-release-alma9:development_v5 + volumes: + - /cvmfs:/cvmfs defaults: run: shell: bash steps: + - name: Check CVMFS + run: | + ls -lrt /cvmfs || exit 1 - id: checkout_daq_buildtools uses: actions/checkout@v6 with: diff --git a/scripts/test_daq-buildtools.sh b/scripts/test_daq-buildtools.sh index a75b1d1..c8bf867 100755 --- a/scripts/test_daq-buildtools.sh +++ b/scripts/test_daq-buildtools.sh @@ -102,6 +102,10 @@ git clone https://github.com/DUNE-DAQ/$pyrepo || exit 16 cd .. . env.sh || exit 17 rm -f .venv/lib64/python*/site-packages/$pyrepo/__init__.py || exit 18 + +echo "******************************TEST dbt-build --lint *************************************" +dbt-build --lint || exit 123 + echo "******************************TEST dbt-build (Python) *************************************" dbt-build || exit 19 find .venv/lib64/python*/site-packages/$pyrepo/__init__.py | read || exit 20 From 91aafc003122e6ac2f4d4835ad9d6852d0ee6cb7 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Mon, 16 Mar 2026 12:03:54 -0500 Subject: [PATCH 02/11] Add needs context --- .github/workflows/test_daq_buildtools.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index fb378cb..dae6606 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -30,6 +30,7 @@ jobs: test_daq_buildtools: name: Test daq-buildtools + needs: load_cvmfs runs-on: ubuntu-latest container: image: ghcr.io/dune-daq/nightly-release-alma9:development_v5 From 5b96d3ead2f3fbee32461d3c8a3624156b4a1800 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Mon, 16 Mar 2026 13:04:17 -0500 Subject: [PATCH 03/11] Run container in shell step rather than loading at job --- .github/workflows/test_daq_buildtools.yml | 27 ++++++++--------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index dae6606..0ede254 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -16,31 +16,17 @@ on: description: "Branch from which to run test_daq-buildtools.sh" jobs: - load_cvmfs: - name: Load CVMFS - runs-on: ubuntu-latest - defaults: - run: - shell: bash - - steps: - - uses: cvmfs-contrib/github-action-cvmfs@v5 - with: - cvmfs_repositories: 'dunedaq-development.opensciencegrid.org' - test_daq_buildtools: name: Test daq-buildtools - needs: load_cvmfs runs-on: ubuntu-latest - container: - image: ghcr.io/dune-daq/nightly-release-alma9:development_v5 - volumes: - - /cvmfs:/cvmfs defaults: run: shell: bash steps: + - uses: cvmfs-contrib/github-action-cvmfs@v5 + with: + cvmfs_repositories: 'dunedaq-development.opensciencegrid.org' - name: Check CVMFS run: | ls -lrt /cvmfs || exit 1 @@ -55,6 +41,11 @@ jobs: cd daq-buildtools-test source env.sh cd scripts - ./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} + #./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} + docker run --rm -it \ + --mount type=bind,src=/cvmfs,dst=/cvmfs,bind-propagation=shared \ + ghcr.io/dune-daq/nightly-release-alma9:development_v5 \ + ./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} + From 30958c467fdf63fdacc50895474a1d918888a0c5 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Mon, 16 Mar 2026 13:13:11 -0500 Subject: [PATCH 04/11] Mount pwd to container --- .github/workflows/test_daq_buildtools.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index 0ede254..972d5a0 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -44,6 +44,8 @@ jobs: #./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} docker run --rm -it \ --mount type=bind,src=/cvmfs,dst=/cvmfs,bind-propagation=shared \ + --mount type=bind,src="$PWD",dst=/workspace,bind-propagation=shared \ + -w /workspace \ ghcr.io/dune-daq/nightly-release-alma9:development_v5 \ ./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} From 71c1f2ee6c4b04d2d42a5aafdcd9bcc8dee66946 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Mon, 16 Mar 2026 13:15:06 -0500 Subject: [PATCH 05/11] Remove interactive flag --- .github/workflows/test_daq_buildtools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index 972d5a0..0b0af85 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -42,7 +42,7 @@ jobs: source env.sh cd scripts #./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} - docker run --rm -it \ + docker run --rm \ --mount type=bind,src=/cvmfs,dst=/cvmfs,bind-propagation=shared \ --mount type=bind,src="$PWD",dst=/workspace,bind-propagation=shared \ -w /workspace \ From c5a7965dfbc58179c0c1b2d1d31d6f905c1b2089 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Wed, 18 Mar 2026 10:25:03 -0500 Subject: [PATCH 06/11] Try caching cvmfs cache and move docker pull to separate step --- .github/workflows/test_daq_buildtools.yml | 25 +++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index 0b0af85..6844584 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -30,6 +30,27 @@ jobs: - name: Check CVMFS run: | ls -lrt /cvmfs || exit 1 + + - name: change dir permission + run: | + sudo mkdir -p /var/lib/cvmfs + sudo chmod -R 777 /var/lib/cvmfs + + - name: Cache cvmfs cache + id: cvmfs_cache + uses: actions/cache@main + with: + path: /var/lib/cvmfs/shared + key: cachecvmfs + + - name: restore dir permission + run: | + sudo chown -R cvmfs:cvmfs /var/lib/cvmfs + sudo chmod -R 700 /var/lib/cvmfs + + - name: Pull latest nightly build image + run: docker pull ghcr.io/dune-daq/nightly-release-alma9:development_v5 + - id: checkout_daq_buildtools uses: actions/checkout@v6 with: @@ -43,8 +64,8 @@ jobs: cd scripts #./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} docker run --rm \ - --mount type=bind,src=/cvmfs,dst=/cvmfs,bind-propagation=shared \ - --mount type=bind,src="$PWD",dst=/workspace,bind-propagation=shared \ + -v /cvmfs:/cvmfs:shared \ + -v "$PWD":/workspace \ -w /workspace \ ghcr.io/dune-daq/nightly-release-alma9:development_v5 \ ./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} From 051a199f615463605598067f96d00d49e4e258f7 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Wed, 18 Mar 2026 13:09:55 -0500 Subject: [PATCH 07/11] Ensure branch arg exists --- .github/workflows/test_daq_buildtools.yml | 3 ++- scripts/test_daq-buildtools.sh | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index 6844584..d7f63b2 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -59,6 +59,7 @@ jobs: - name: Run test_daq-buildtools script run: | + BRANCH="${{ inputs.dbt-branch || github.head_ref || github.ref_name }}" cd daq-buildtools-test source env.sh cd scripts @@ -68,7 +69,7 @@ jobs: -v "$PWD":/workspace \ -w /workspace \ ghcr.io/dune-daq/nightly-release-alma9:development_v5 \ - ./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} + ./test_daq-buildtools.sh --dbt-branch $BRANCH diff --git a/scripts/test_daq-buildtools.sh b/scripts/test_daq-buildtools.sh index c8bf867..e15c883 100755 --- a/scripts/test_daq-buildtools.sh +++ b/scripts/test_daq-buildtools.sh @@ -33,6 +33,13 @@ repo="ipm" pyrepo="daqpytools" dbt_branch="develop" +validate_arg() { + if [[ -z "$2" || "$2" == -* ]]; then + echo "ERROR: $1 requires an argument." + exit 2 + fi +} + while [[ $# -gt 0 ]]; do case "$1" in -h|--help|-?) @@ -40,14 +47,17 @@ while [[ $# -gt 0 ]]; do exit 1 ;; --release) + validate_arg $1 $2 release="$2" shift 2 ;; --repo) + validate_arg $1 $2 repo="$2" shift 2 ;; --dbt-branch) + validate_arg $1 $2 dbt_branch="$2" shift 2 ;; From 19f5775d4b2ad8ce5f8bca2e19e91eb895deffe7 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Wed, 18 Mar 2026 15:12:37 -0500 Subject: [PATCH 08/11] Time dbt commands --- scripts/test_daq-buildtools.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/scripts/test_daq-buildtools.sh b/scripts/test_daq-buildtools.sh index e15c883..ebd31a9 100755 --- a/scripts/test_daq-buildtools.sh +++ b/scripts/test_daq-buildtools.sh @@ -96,14 +96,14 @@ mkdir -p "$release_tmpdir" && cd "$release_tmpdir" echo "*********************************TEST dbt-setup-release *******************************" # Check that dbt-setup-release works without altering the environment, thus the (...) -(dbt-setup-release "${extra_args[@]}" "$release"; echo $? > $release_tmpdir/dbt-setup-release_result.txt) +time (dbt-setup-release "${extra_args[@]}" "$release"; echo $? > $release_tmpdir/dbt-setup-release_result.txt) test -e $release_tmpdir/dbt-setup-release_result.txt || exit 3 test $( cat $release_tmpdir/dbt-setup-release_result.txt ) == 0 || exit 4 rm -f dbt-setup-release_result.txt echo "*********************************TEST dbt-create ***************************************" -dbt-create -s ${extra_args[@]} $release || exit 5 +time dbt-create -s ${extra_args[@]} $release || exit 5 cd $(ls) # Only thing in the directory will be the work area @@ -113,11 +113,8 @@ cd .. . env.sh || exit 17 rm -f .venv/lib64/python*/site-packages/$pyrepo/__init__.py || exit 18 -echo "******************************TEST dbt-build --lint *************************************" -dbt-build --lint || exit 123 - echo "******************************TEST dbt-build (Python) *************************************" -dbt-build || exit 19 +time dbt-build || exit 19 find .venv/lib64/python*/site-packages/$pyrepo/__init__.py | read || exit 20 rm -rf pythoncode/$pyrepo @@ -127,18 +124,18 @@ cd .. . env.sh || exit 7 echo "******************************TEST dbt-build (C++) *************************************" -dbt-build || exit 8 +time dbt-build || exit 8 echo "******************************TEST dbt-build --unittest *********************************" -dbt-build --unittest || exit 9 +time dbt-build --unittest || exit 9 if spack find --loaded llvm >/dev/null 2>&1; then echo "******************************TEST dbt-build --lint *************************************" - dbt-build --lint || exit 10 + time dbt-build --lint || exit 10 echo "******************************TEST dbt-clang-format.sh *************************************" cd $DBT_AREA_ROOT/sourcecode - dbt-clang-format.sh $repo --view-differences-only || exit 11 + time dbt-clang-format.sh $repo --view-differences-only || exit 11 cd .. else echo "WARNING: Skipping dbt-build --lint and dbt-clang-format.sh since llvm is not loaded" @@ -146,7 +143,7 @@ fi if spack find --loaded lcov >/dev/null 2>&1; then echo "*********************************TEST dbt-lcov.sh****************************************" - dbt-lcov.sh || exit 12 + time dbt-lcov.sh || exit 12 else echo "WARNING: Skipping dbt-lcov.sh since lcov is not loaded" fi @@ -155,10 +152,10 @@ fi echo "***********************TEST dbt-build with external sourcecode **************************" mv sourcecode $release_tmpdir ln -s $release_tmpdir/sourcecode -dbt-build --clean || exit 13 +time dbt-build --clean || exit 13 echo "*****************************TEST dbt-build --codegen **********************************" -dbt-build --codegen || exit 14 +time dbt-build --codegen || exit 14 echo "********************TEST local workarea Spack package installation **********************" From d9cdddda948b16e3ac1563fb3355b8dbd3d34a49 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Wed, 18 Mar 2026 15:12:51 -0500 Subject: [PATCH 09/11] Disable caching of cvmfs cache --- .github/workflows/test_daq_buildtools.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index d7f63b2..0da4a86 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -36,12 +36,12 @@ jobs: sudo mkdir -p /var/lib/cvmfs sudo chmod -R 777 /var/lib/cvmfs - - name: Cache cvmfs cache - id: cvmfs_cache - uses: actions/cache@main - with: - path: /var/lib/cvmfs/shared - key: cachecvmfs + #- name: Cache cvmfs cache + # id: cvmfs_cache + # uses: actions/cache@main + # with: + # path: /var/lib/cvmfs/shared + # key: cachecvmfs - name: restore dir permission run: | From a06783a83f2f5d009c4d9d77ee12181f42f6bfc2 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Thu, 19 Mar 2026 08:50:04 -0500 Subject: [PATCH 10/11] Remove unnecessary steps --- .github/workflows/test_daq_buildtools.yml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index 0da4a86..6652e12 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -27,26 +27,6 @@ jobs: - uses: cvmfs-contrib/github-action-cvmfs@v5 with: cvmfs_repositories: 'dunedaq-development.opensciencegrid.org' - - name: Check CVMFS - run: | - ls -lrt /cvmfs || exit 1 - - - name: change dir permission - run: | - sudo mkdir -p /var/lib/cvmfs - sudo chmod -R 777 /var/lib/cvmfs - - #- name: Cache cvmfs cache - # id: cvmfs_cache - # uses: actions/cache@main - # with: - # path: /var/lib/cvmfs/shared - # key: cachecvmfs - - - name: restore dir permission - run: | - sudo chown -R cvmfs:cvmfs /var/lib/cvmfs - sudo chmod -R 700 /var/lib/cvmfs - name: Pull latest nightly build image run: docker pull ghcr.io/dune-daq/nightly-release-alma9:development_v5 @@ -63,7 +43,6 @@ jobs: cd daq-buildtools-test source env.sh cd scripts - #./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} docker run --rm \ -v /cvmfs:/cvmfs:shared \ -v "$PWD":/workspace \ From 03584956f88aed4e7607921b281ee24ead2ead6e Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Thu, 19 Mar 2026 08:56:05 -0500 Subject: [PATCH 11/11] Remove time commands --- scripts/test_daq-buildtools.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/test_daq-buildtools.sh b/scripts/test_daq-buildtools.sh index ebd31a9..d844d6a 100755 --- a/scripts/test_daq-buildtools.sh +++ b/scripts/test_daq-buildtools.sh @@ -96,14 +96,14 @@ mkdir -p "$release_tmpdir" && cd "$release_tmpdir" echo "*********************************TEST dbt-setup-release *******************************" # Check that dbt-setup-release works without altering the environment, thus the (...) -time (dbt-setup-release "${extra_args[@]}" "$release"; echo $? > $release_tmpdir/dbt-setup-release_result.txt) +(dbt-setup-release "${extra_args[@]}" "$release"; echo $? > $release_tmpdir/dbt-setup-release_result.txt) test -e $release_tmpdir/dbt-setup-release_result.txt || exit 3 test $( cat $release_tmpdir/dbt-setup-release_result.txt ) == 0 || exit 4 rm -f dbt-setup-release_result.txt echo "*********************************TEST dbt-create ***************************************" -time dbt-create -s ${extra_args[@]} $release || exit 5 +dbt-create -s ${extra_args[@]} $release || exit 5 cd $(ls) # Only thing in the directory will be the work area @@ -114,7 +114,7 @@ cd .. rm -f .venv/lib64/python*/site-packages/$pyrepo/__init__.py || exit 18 echo "******************************TEST dbt-build (Python) *************************************" -time dbt-build || exit 19 +dbt-build || exit 19 find .venv/lib64/python*/site-packages/$pyrepo/__init__.py | read || exit 20 rm -rf pythoncode/$pyrepo @@ -124,18 +124,18 @@ cd .. . env.sh || exit 7 echo "******************************TEST dbt-build (C++) *************************************" -time dbt-build || exit 8 +dbt-build || exit 8 echo "******************************TEST dbt-build --unittest *********************************" -time dbt-build --unittest || exit 9 +dbt-build --unittest || exit 9 if spack find --loaded llvm >/dev/null 2>&1; then echo "******************************TEST dbt-build --lint *************************************" - time dbt-build --lint || exit 10 + dbt-build --lint || exit 10 echo "******************************TEST dbt-clang-format.sh *************************************" cd $DBT_AREA_ROOT/sourcecode - time dbt-clang-format.sh $repo --view-differences-only || exit 11 + dbt-clang-format.sh $repo --view-differences-only || exit 11 cd .. else echo "WARNING: Skipping dbt-build --lint and dbt-clang-format.sh since llvm is not loaded" @@ -143,7 +143,7 @@ fi if spack find --loaded lcov >/dev/null 2>&1; then echo "*********************************TEST dbt-lcov.sh****************************************" - time dbt-lcov.sh || exit 12 + dbt-lcov.sh || exit 12 else echo "WARNING: Skipping dbt-lcov.sh since lcov is not loaded" fi @@ -152,10 +152,10 @@ fi echo "***********************TEST dbt-build with external sourcecode **************************" mv sourcecode $release_tmpdir ln -s $release_tmpdir/sourcecode -time dbt-build --clean || exit 13 +dbt-build --clean || exit 13 echo "*****************************TEST dbt-build --codegen **********************************" -time dbt-build --codegen || exit 14 +dbt-build --codegen || exit 14 echo "********************TEST local workarea Spack package installation **********************"