Skip to content

Commit d7e59db

Browse files
committed
Merge branch 'pr/829'
2 parents cb0ed06 + 03fa841 commit d7e59db

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.ci/run-container-ci

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
set -e
2626
set -x
2727

28-
CONTAINER=shiftcrypto/firmware_v2:21
28+
CONTAINER=shiftcrypto/firmware_v2:22
2929

3030
if [ "$1" == "pull" ] ; then
3131
docker pull "$CONTAINER"

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,8 @@ RUN rustup component add clippy
129129
RUN CARGO_HOME=/opt/cargo cargo install cbindgen --version 0.20.0
130130
RUN CARGO_HOME=/opt/cargo cargo install bindgen --version 0.59.1
131131

132+
COPY tools/prost-build prost-build
133+
RUN CARGO_HOME=/opt/cargo cargo install --path prost-build --locked
134+
132135
# Clean temporary files to reduce image size
133136
RUN rm -rf /var/lib/apt/lists/*

messages/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ foreach(i ${PROTO_FILES})
4242
endif()
4343
endforeach()
4444

45+
find_program(PROST_BUILD prost-build)
46+
4547
add_custom_command(
4648
OUTPUT ${OUTPUT_SOURCES} ${OUTPUT_HEADERS}
4749
DEPENDS ${PROTO_FILES} ${PROTO_OPTION_FILES}
@@ -56,8 +58,7 @@ add_custom_command(
5658
# Using prost-build the normal way as part of build.rs does not work due to a cargo bug:
5759
# https://github.com/danburkert/prost/issues/344#issuecomment-650721245
5860
COMMAND
59-
${CMAKE_COMMAND} -E env
60-
cargo run --manifest-path=${CMAKE_SOURCE_DIR}/tools/prost-build/Cargo.toml -- --messages-dir=${CMAKE_CURRENT_SOURCE_DIR} --out-dir=${CMAKE_SOURCE_DIR}/src/rust/bitbox02-rust/src/
61+
${PROST_BUILD} --messages-dir=${CMAKE_CURRENT_SOURCE_DIR} --out-dir=${CMAKE_SOURCE_DIR}/src/rust/bitbox02-rust/src/
6162
)
6263

6364
add_custom_target(

0 commit comments

Comments
 (0)