Skip to content
18 changes: 15 additions & 3 deletions .github/workflows/test_daq_buildtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@ jobs:
test_daq_buildtools:
name: Test daq-buildtools
runs-on: ubuntu-latest
container:
image: ghcr.io/dune-daq/nightly-release-alma9:development_v5
defaults:
run:
shell: bash

steps:
- uses: cvmfs-contrib/github-action-cvmfs@v5
with:
cvmfs_repositories: 'dunedaq-development.opensciencegrid.org'

- 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:
Expand All @@ -34,9 +39,16 @@ 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
./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }}
docker run --rm \
-v /cvmfs:/cvmfs:shared \
-v "$PWD":/workspace \
-w /workspace \
ghcr.io/dune-daq/nightly-release-alma9:development_v5 \
./test_daq-buildtools.sh --dbt-branch $BRANCH



11 changes: 11 additions & 0 deletions scripts/test_daq-buildtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,31 @@ 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|-?)
usage
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
;;
Expand Down Expand Up @@ -102,6 +112,7 @@ 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 (Python) *************************************"
dbt-build || exit 19
find .venv/lib64/python*/site-packages/$pyrepo/__init__.py | read || exit 20
Expand Down