@@ -339,13 +339,15 @@ ARG JOBS=16
339
339
#RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:ovms_shared
340
340
341
341
RUN mkdir -p /tmp/bazel-output && \
342
- bazel --output_base=/tmp/bazel-output \
343
- build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared && \
344
- find /tmp/bazel-output -name libovms_shared.so && \
345
- LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
346
- echo "Found built file: $LIB_PATH" && \
347
- mkdir -p /ovms_release/lib && \
348
- cp -v "$LIB_PATH" /ovms_release/lib/
342
+ bash -c '\
343
+ set -euo pipefail && \
344
+ bazel --output_base=/tmp/bazel-output \
345
+ build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared && \
346
+ LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
347
+ echo "Found built file: $LIB_PATH" && \
348
+ mkdir -p /ovms_release/lib && \
349
+ cp -v "$LIB_PATH" /ovms_release/lib/'
350
+
349
351
350
352
# C api app with bazel
351
353
# hadolint ignore=DL3059
@@ -361,13 +363,17 @@ RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
361
363
bazel info bazel-bin && \
362
364
find $(bazel info bazel-bin)/src -type f -name capi_benchmark
363
365
366
+
364
367
RUN mkdir -p /tmp/bazel-output && \
365
- bazel --output_base=/tmp/bazel-output \
366
- build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
367
- CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
368
- echo "Found built capi_benchmark: $CAPI_BIN" && \
369
- chmod +x "$CAPI_BIN" && \
370
- "$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"
368
+ bash -c '\
369
+ set -euo pipefail && \
370
+ bazel --output_base=/tmp/bazel-output \
371
+ build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
372
+ CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
373
+ echo "Found built capi_benchmark: $CAPI_BIN" && \
374
+ chmod +x "$CAPI_BIN" && \
375
+ "$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"'
376
+
371
377
372
378
# C-api C/C++ app with gcc
373
379
COPY MakefileCapi /ovms/
0 commit comments