solana: don't rebuild solana when bridge changes

This commit is contained in:
Hendrik Hofstadt 2020-08-21 16:29:44 +02:00
parent 6070cf25eb
commit a1e548e4b9
2 changed files with 9 additions and 2 deletions

View File

@ -24,4 +24,4 @@ RUN --mount=type=cache,target=/usr/local,from=rust,source=/usr/local \
--mount=type=cache,target=bin,from=rust,source=bin \
./do.sh build bridge && \
mkdir -p /opt/solana/deps && \
cp target/bpfel-unknown-unknown/release/spl_bridge.so /opt/solana/deps
cp target/bpfel-unknown-unknown/release/spl_bridge_debug.so /opt/solana/deps/spl_bridge.so

View File

@ -1,7 +1,12 @@
# syntax=docker/dockerfile:experimental
# Depend on our smart contract build - it's going to be linked directly into Solana as part the patch we carry.
FROM solana-contract
FROM solana-contract as contract
FROM rust:1.45
RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang
RUN rustup component add rustfmt
WORKDIR /usr/src/solana
@ -20,6 +25,8 @@ RUN --mount=type=cache,target=/usr/local/cargo,from=rust,source=/usr/local/cargo
cp $(find ./target/release -maxdepth 1 -type f ! -name "*.*") /opt/solana && \
cp ./target/release/deps/*.so /opt/solana/deps
COPY --from=contract /opt/solana/deps/spl_bridge.so /opt/solana/deps/spl_bridge.so
ENV PATH="/opt/solana:${PATH}"
ENV RUST_LOG="solana_runtime::system_instruction_processor=trace,solana_runtime::message_processor=trace,solana_bpf_loader=debug,solana_rbpf=debug"