@@ -328,14 +328,13 @@ ARG JOBS=16
328
328
329
329
RUN mkdir -p /tmp/bazel-output && \
330
330
bazel --output_base=/tmp/bazel-output \
331
- build //src:ovms_shared && \
331
+ build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared && \
332
332
find /tmp/bazel-output -name libovms_shared.so && \
333
333
LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
334
334
echo "Found built file: $LIB_PATH" && \
335
335
mkdir -p /ovms_release/lib && \
336
336
cp -v "$LIB_PATH" /ovms_release/lib/
337
337
338
-
339
338
# C api app with bazel
340
339
# hadolint ignore=DL3059
341
340
RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:capi_cpp_example
@@ -350,13 +349,20 @@ RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark
350
349
351
350
RUN pwd && ls -al
352
351
353
- RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
354
- echo "WORKDIR at build-time: $PWD" && \
355
- bazel info bazel-bin && \
356
- find $(bazel info bazel-bin)/src -type f -name capi_benchmark
352
+ RUN mkdir -p /tmp/bazel-output && \
353
+ bazel --output_base=/tmp/bazel-output \
354
+ build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
355
+ CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
356
+ echo "Found built capi_benchmark: $CAPI_BIN" && \
357
+ chmod +x "$CAPI_BIN" && \
358
+ "$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"
359
+
360
+ # C-api C/C++ app with gcc
361
+ COPY MakefileCapi /ovms/
362
+ RUN make -f MakefileCapi cpp CAPI_FLAGS="${CAPI_FLAGS}" && \
363
+ make -f MakefileCapi c CAPI_FLAGS="${CAPI_FLAGS}"
357
364
358
365
RUN mkdir -p /ovms_release/lib/ ; find /ovms/bazel-out/k8-*/bin -iname 'libovms_shared.so' -exec cp -v {} /ovms_release/lib/ \;
359
- #RUN mkdir -p /ovms_release/lib/ ; find $(bazel info bazel-bin) -iname 'libovms_shared.so' -exec cp -v {} /ovms_release/lib/ \;
360
366
361
367
#debuggig to find the correct lib file
362
368
0 commit comments