Skip to content

Commit 17c0545

Browse files
committed
Rename build scripts, make them location-agnostic
1 parent 3a697df commit 17c0545

File tree

9 files changed

+33
-31
lines changed

9 files changed

+33
-31
lines changed

.github/workflows/artdaq-spack-selfhosted.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
contents: read
2222
strategy:
2323
fail-fast: false
24-
max-parallel: 1
2524
matrix:
2625
os: [ 'alma9', 'alma10' ]
2726
spackVer: [ 'v0.28', 'v1.1' ]

.github/workflows/otsdaq-spack-selfhosted.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
contents: read
2222
strategy:
2323
fail-fast: false
24-
max-parallel: 1
2524
matrix:
2625
os: [ 'alma9', 'alma10' ]
2726
spackVer: [ 'v0.28', 'v1.1' ]
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ artVer=${artVer:-s133}
66
osVer=${osVer:-9}
77
spackVer=${spackVer:-v0.28}
88
force=${force:-0}
9+
base_dir=${base_dir:-/cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}}
910

1011
function cleanup() {
1112
(
@@ -17,13 +18,13 @@ function cleanup() {
1718
}
1819

1920
function verify() {
20-
if ! [ -d /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/art-suite-$artVer-al$osVer ]; then
21+
if ! [ -d ${base_dir}/art-suite-$artVer-al$osVer ]; then
2122
echo "Build area does not exist, cannot verify build"
2223
return 1
2324
fi
2425

2526
res=0
26-
cd /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/art-suite-$artVer-al$osVer
27+
cd ${base_dir}/art-suite-$artVer-al$osVer
2728
if ! [ -f .build_verified ]; then
2829
echo "Verifying build, setting up Spack"
2930
source setup-env.sh
@@ -51,7 +52,7 @@ fi
5152

5253
if [ $do_build -eq 1 ];then
5354
echo "Building art-suite-$artVer using Spack $spackVer on Alma$osVer"
54-
cd /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}
55+
cd ${base_dir}
5556
mkdir art-suite-$artVer-al$osVer
5657
cd art-suite-$artVer-al$osVer
5758
touch .cvmfscatalog
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ artdaqVer=${artdaqVer:-v4_05_00}
77
osVer=${osVer:-9}
88
spackVer=${spackVer:-v0.28}
99
force=${force:-0}
10+
base_dir=${base_dir:-/cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}}
1011

1112
function cleanup() {
1213
(
@@ -18,13 +19,13 @@ function cleanup() {
1819
}
1920

2021
function verify() {
21-
if ! [ -d /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/artdaq-$artdaqVer-al${osVer} ]; then
22+
if ! [ -d ${base_dir}/artdaq-$artdaqVer-al${osVer} ]; then
2223
echo "Build area does not exist, cannot verify build"
2324
return 1
2425
fi
2526

2627
res=0
27-
cd /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/artdaq-$artdaqVer-al${osVer}
28+
cd ${base_dir}/artdaq-$artdaqVer-al${osVer}
2829
if ! [ -f .build_verified ]; then
2930
echo "Verifying build, setting up Spack"
3031
source setup-env.sh
@@ -44,7 +45,7 @@ function verify() {
4445
}
4546

4647
# Check dependency
47-
if ! [ -f /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/art-suite-${artVer}-al${osVer}/.build_verified ]; then
48+
if ! [ -f ${base_dir}/art-suite-${artVer}-al${osVer}/.build_verified ]; then
4849
echo "Dependency art-suite-${artVer}-al${osVer} not built; please run update_cvmfs_art.sh first."
4950
git config --global --unset-all safe.directory
5051
exit 1
@@ -59,15 +60,15 @@ fi
5960

6061
if [ $do_build -eq 1 ];then
6162
echo "Building artdaq-$artdaqVer using Spack $spackVer on Alma$osVer"
62-
cd /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}
63+
cd ${base_dir}
6364
mkdir artdaq-$artdaqVer-al${osVer}
6465
cd artdaq-$artdaqVer-al${osVer}
6566
touch .cvmfscatalog
6667
rm .build_verified
6768
rm quick-spack-start_${spackVer}.sh*
6869
wget https://raw.githubusercontent.com/art-daq/artdaq_demo/refs/heads/develop/tools/quick-spack-start_${spackVer}.sh && chmod +x quick-spack-start_${spackVer}.sh
6970
./quick-spack-start_${spackVer}.sh --tag $artdaqVer --padding --no-kmod --no-view --arch linux-almalinux${osVer}-x86_64_v3 \
70-
--upstream /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/art-suite-$artVer-al${osVer}
71+
--upstream ${base_dir}/art-suite-$artVer-al${osVer}
7172
cleanup
7273
verify
7374
else
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ mu2eVer=${mu2eVer:-v10_00_00}
99
osVer=${osVer:-9}
1010
spackVer=${spackVer:-v0.28}
1111
force=${force:-0}
12+
base_dir=${base_dir:-/cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}}
1213

1314
function cleanup() {
1415
(
@@ -20,13 +21,13 @@ function cleanup() {
2021
}
2122

2223
function verify() {
23-
if ! [ -d /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/mu2e-tdaq-$mu2eVer-al${osVer} ]; then
24+
if ! [ -d ${base_dir}/mu2e-tdaq-$mu2eVer-al${osVer} ]; then
2425
echo "Build area does not exist, cannot verify build"
2526
return 1
2627
fi
2728

2829
res=0
29-
cd /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/mu2e-tdaq-$mu2eVer-al${osVer}
30+
cd ${base_dir}/mu2e-tdaq-$mu2eVer-al${osVer}
3031
if ! [ -f .build_verified ]; then
3132
echo "Verifying build, setting up Spack"
3233
source setup-env.sh
@@ -46,7 +47,7 @@ function verify() {
4647
}
4748

4849
# Check dependency
49-
if ! [ -f /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/ots-$otsVer-al${osVer}/.build_verified ]; then
50+
if ! [ -f ${base_dir}/ots-$otsVer-al${osVer}/.build_verified ]; then
5051
echo "Dependency ots-$otsVer-al${osVer} not built; please run update_cvmfs_ots.sh first."
5152
git config --global --unset-all safe.directory
5253
exit 1
@@ -61,17 +62,17 @@ fi
6162

6263
if [ $do_build -eq 1 ];then
6364
echo "Building mu2e-tdaq-$mu2eVer using Spack $spackVer on Alma$osVer"
64-
cd /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}
65+
cd ${base_dir}
6566
mkdir mu2e-tdaq-$mu2eVer-al${osVer}
6667
cd mu2e-tdaq-$mu2eVer-al${osVer}
6768
touch .cvmfscatalog
6869
rm .build_verified
6970
rm mu2e-quick-spack-start_${spackVer}.sh*
7071
wget https://raw.githubusercontent.com/Mu2e/otsdaq_mu2e/refs/heads/develop/tools/mu2e-quick-spack-start_${spackVer}.sh && chmod +x mu2e-quick-spack-start_${spackVer}.sh
7172
./mu2e-quick-spack-start_${spackVer}.sh --padding --no-kmod --no-emacs --no-view --arch linux-almalinux${osVer}-x86_64_v3 --tag $mu2eVer \
72-
--upstream /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/ots-$otsVer-al${osVer} \
73-
--upstream /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/artdaq-$artdaqVer-al${osVer} \
74-
--upstream /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/art-suite-$artVer-al${osVer}
73+
--upstream ${base_dir}/ots-$otsVer-al${osVer} \
74+
--upstream ${base_dir}/artdaq-$artdaqVer-al${osVer} \
75+
--upstream ${base_dir}/art-suite-$artVer-al${osVer}
7576
cleanup
7677
verify
7778
else
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ otsVer=${otsVer:-v3_05_00}
88
osVer=${osVer:-9}
99
spackVer=${spackVer:-v0.28}
1010
force=${force:-0}
11+
base_dir=${base_dir:-/cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}}
1112

1213
function cleanup() {
1314
(
@@ -19,13 +20,13 @@ function cleanup() {
1920
}
2021

2122
function verify() {
22-
if ! [ -d /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/ots-$otsVer-al${osVer} ]; then
23+
if ! [ -d ${base_dir}/ots-$otsVer-al${osVer} ]; then
2324
echo "Build area does not exist, cannot verify build"
2425
return 1
2526
fi
2627

2728
res=0
28-
cd /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/ots-$otsVer-al${osVer}
29+
cd ${base_dir}/ots-$otsVer-al${osVer}
2930
if ! [ -f .build_verified ]; then
3031
echo "Verifying build, setting up Spack"
3132
source setup-env.sh
@@ -45,7 +46,7 @@ function verify() {
4546
}
4647

4748
# Check dependency
48-
if ! [ -f /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/artdaq-${artdaqVer}-al${osVer}/.build_verified ]; then
49+
if ! [ -f ${base_dir}/artdaq-${artdaqVer}-al${osVer}/.build_verified ]; then
4950
echo "Dependency artdaq-${artdaqVer}-al${osVer} not built; please run update_cvmfs_artdaq.sh first."
5051
git config --global --unset-all safe.directory
5152
exit 1
@@ -60,16 +61,16 @@ fi
6061

6162
if [ $do_build -eq 1 ];then
6263
echo "Building ots-$otsVer-al${osVer} using Spack $spackVer on Alma$osVer"
63-
cd /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}
64+
cd ${base_dir}
6465
mkdir ots-$otsVer-al${osVer}
6566
cd ots-$otsVer-al${osVer}
6667
touch .cvmfscatalog
6768
rm .build_verified
6869
rm ots-quick-spack-start_${spackVer}.sh
6970
wget https://raw.githubusercontent.com/art-daq/otsdaq_demo/refs/heads/develop/tools/ots-quick-spack-start_${spackVer}.sh && chmod +x ots-quick-spack-start_${spackVer}.sh
7071
./ots-quick-spack-start_${spackVer}.sh --padding --no-kmod --no-view --arch linux-almalinux${osVer}-x86_64_v3 --tag $otsVer \
71-
--upstream /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/artdaq-$artdaqVer-al${osVer} \
72-
--upstream /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_${spackVer}/art-suite-$artVer-al${osVer}
72+
--upstream ${base_dir}/artdaq-$artdaqVer-al${osVer} \
73+
--upstream ${base_dir}/art-suite-$artVer-al${osVer}
7374
cleanup
7475
verify
7576
else

dockerfiles/artdaq-spack.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# This Dockerfile is used to create an artdaq build area for Github Actions CI
22

3-
SHELL ["/bin/bash", "-c"]
4-
53
ARG ARTDAQ_AREA=artdaq-v4_05_00
64
ARG ART_AREA=art-suite-s132.1
75
ARG BASE_IMAGE=eflumerf/alma9-spack:latest
@@ -10,6 +8,8 @@ ARG SCRIPT_NAME=quick-spack-start_${SPACK_VERSION}.sh
108

119
FROM $BASE_IMAGE AS intermediate
1210

11+
SHELL ["/bin/bash", "-c"]
12+
1313
WORKDIR /opt/artdaq
1414

1515
ADD https://raw.githubusercontent.com/art-daq/artdaq_demo/develop/tools/$SCRIPT_NAME /opt/artdaq/$SCRIPT_NAME

dockerfiles/otsdaq-spack.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# This Dockerfile is used to create an otsdaq build area for Github Actions CI
22

3-
SHELL ["/bin/bash", "-c"]
4-
53
ARG OTS_AREA=ots-v3_05_00
64
ARG ARTDAQ_AREA=artdaq-v4_05_00
75
ARG ART_AREA=art-suite-s132.1
@@ -11,6 +9,8 @@ ARG SCRIPT_NAME=ots-quick-spack-start_${SPACK_VERSION}.sh
119

1210
FROM $BASE_IMAGE AS intermediate
1311

12+
SHELL ["/bin/bash", "-c"]
13+
1414
WORKDIR /opt/otsdaq
1515

1616
ADD https://raw.githubusercontent.com/art-daq/otsdaq_demo/develop/tools/$SCRIPT_NAME /opt/otsdaq/$SCRIPT_NAME

run_update_docker.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function build_areas() {
4343
-e spackVer=$spackVer \
4444
-v ./build_scripts:/opt/build_scripts \
4545
-v ./spack_$spackVer:/cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_$spackVer \
46-
$image /opt/build_scripts/update_cvmfs_art.sh
46+
$image /opt/build_scripts/build_art.sh
4747
fi
4848

4949
if [ $doArtdaqBuild -eq 1 ];then
@@ -55,7 +55,7 @@ function build_areas() {
5555
-e spackVer=$spackVer \
5656
-v ./build_scripts:/opt/build_scripts \
5757
-v ./spack_$spackVer:/cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_$spackVer \
58-
$image /opt/build_scripts/update_cvmfs_artdaq.sh
58+
$image /opt/build_scripts/build_artdaq.sh
5959
fi
6060

6161
if [ $doOtsBuild -eq 1 ];then
@@ -68,7 +68,7 @@ function build_areas() {
6868
-e spackVer=$spackVer \
6969
-v ./build_scripts:/opt/build_scripts \
7070
-v ./spack_$spackVer:/cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_$spackVer \
71-
$image /opt/build_scripts/update_cvmfs_ots.sh
71+
$image /opt/build_scripts/build_ots.sh
7272
fi
7373

7474
if [ $doMu2eBuild -eq 1 ];then
@@ -82,7 +82,7 @@ function build_areas() {
8282
-e spackVer=$spackVer \
8383
-v ./build_scripts:/opt/build_scripts \
8484
-v ./spack_$spackVer:/cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_$spackVer \
85-
$image /opt/build_scripts/update_cvmfs_mu2e.sh
85+
$image /opt/build_scripts/build_mu2e.sh
8686
fi
8787
}
8888

0 commit comments

Comments
 (0)