Skip to content

Commit 52d45d4

Browse files
Add ARGS to the build
1 parent 2377821 commit 52d45d4

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

Dockerfile.redhat

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,13 @@ ARG JOBS=16
328328

329329
RUN mkdir -p /tmp/bazel-output && \
330330
bazel --output_base=/tmp/bazel-output \
331-
build //src:ovms_shared && \
331+
build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared && \
332332
find /tmp/bazel-output -name libovms_shared.so && \
333333
LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
334334
echo "Found built file: $LIB_PATH" && \
335335
mkdir -p /ovms_release/lib && \
336336
cp -v "$LIB_PATH" /ovms_release/lib/
337337

338-
339338
# C api app with bazel
340339
# hadolint ignore=DL3059
341340
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
350349

351350
RUN pwd && ls -al
352351

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}"
357364

358365
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/ \;
360366

361367
#debuggig to find the correct lib file
362368

0 commit comments

Comments
 (0)