@@ -50,25 +50,29 @@ export APPTAINER_CACHEDIR := env("APPTAINER_CACHEDIR", LDMX_BASE / ".apptainer")
50
50
_ default :
51
51
@ just --list --justfile {{ justfile () }} --list-heading " {{ help_message }} "
52
52
53
- # this install is private since I'd prefer users knowing what tools they are installing;
54
-
55
- # however, the CI needs to install denv before it can run any testing
53
+ # install recipe for the CI, private so users know what tools they have on their computers
56
54
[private ]
57
55
install-denv :
58
56
curl -s https:// raw.githubusercontent.com/ tomeichlersmith/ denv/ main/ install | sh
59
57
58
+ # prep version file
59
+ [private ]
60
+ prep-version :
61
+ git fetch --tags && git describe --tags | cut -f 1 -d ' -' > VERSION
62
+
60
63
# configure how ldmx-sw will be built
61
64
# added ADDITIONAL_WARNINGS and CLANG_TIDY to help improve code quality
65
+
62
66
# base configure command defining how cmake is called, private so only experts call it
63
67
[private ]
64
- configure-base * CONFIG :
68
+ configure-base * CONFIG : prep-version
65
69
denv cmake -B build -S . {{ CONFIG }}
66
70
67
71
# default configure of build when developing
68
72
configure * CONFIG : (configure-base " -DADDITIONAL_WARNINGS=ON -DENABLE_CLANG_TIDY=ON" CONFIG)
69
73
70
74
# configure minimal option for faster compilation
71
- configure-quick : ( configure-base )
75
+ configure-quick : configure-base
72
76
73
77
# configure with Address Sanitizer (ASAN) and UndefinedBehaviorSanitizer (UBSan)
74
78
configure-asan-ubsan : (configure-base " -DENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON -DENABLE_SANITIZER_ADDRESS=ON" )
@@ -77,11 +81,13 @@ configure-asan-ubsan: (configure-base "-DENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON
77
81
configure-force-error : (configure " -DWARNINGS_AS_ERRORS=ON" )
78
82
79
83
# Use alternative compiler and enable LTO (test compiling only, won't run properly)
80
- configure-clang-lto : (configure " -DENABLE_LTO=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang" )
84
+ configure-clang-lto : (configure " -DENABLE_LTO=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang" )
81
85
82
86
configure-clang-lto-fail-on-warning : (configure " -DENABLE_LTO=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DWARNINGS_AS_ERRORS=ON" )
87
+
83
88
# Keep debug symbols so running with gdb provides more helpful detail
84
89
configure-gdb : (configure-base " -DCMAKE_BUILD_TYPE=Debug" )
90
+
85
91
# compile and install ldmx-sw
86
92
build ncpu = num_cpus():
87
93
denv cmake --build build --target install -- -j{{ ncpu }}
@@ -145,7 +151,7 @@ check:
145
151
# remove the build and install directories of ldmx-sw
146
152
[confirm (" This will remove the build and install directories. Are you sure?" )]
147
153
clean :
148
- rm -r build install
154
+ rm -r build install VERSION
149
155
150
156
# format the ldmx-sw source code
151
157
format : format-cpp format-just
@@ -226,12 +232,13 @@ recompFire config_py *ARGS: compile (fire config_py ARGS)
226
232
# install the validation module
227
233
# `python3 -m pip install Validation/` is the standard `pip` install method.
228
234
# We add `--upgrade` to tell `pip` it should overwrite the package if it already has been
229
- # # installed before which is helpful in the case where someone is updating the code and running
230
- # # the new code within the container. The `--target install/python/` arguments tell `pip`
231
- # # where to install the package. This directory is where we currently store our python modules
232
- # # and is where the container expects them to be. The `--no-cache` argument tells `pip` to
233
- # # not use a cache for downloading any dependencies from the internet which is necessary since
234
- # # `pip` will not be able to write to the cache location within the container.
235
- # # install the python Validation plotting module
235
+ # installed before which is helpful in the case where someone is updating the code and running
236
+ # the new code within the container. The `--target install/python/` arguments tell `pip`
237
+ # where to install the package. This directory is where we currently store our python modules
238
+ # and is where the container expects them to be. The `--no-cache` argument tells `pip` to
239
+ # not use a cache for downloading any dependencies from the internet which is necessary since
240
+ # `pip` will not be able to write to the cache location within the container.
241
+
242
+ # install the python Validation plotting module
236
243
install-validation :
237
244
denv python3 -m pip install Validation/ --upgrade --target install/ python/ --no-cache
0 commit comments