Skip to content

Commit

Permalink
Backport #240 on 1.14 (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalu authored Feb 20, 2023
1 parent 0c379e3 commit 3822b58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ RUN mkdir -p docker-output
ARG ci_commit
ENV CI_COMMIT=$ci_commit

ARG debug

# Uses docker buildkit to cache the image.
# /usr/local/cargo/git needed for crossbeam patch
RUN --mount=type=cache,mode=0777,target=/solana/target \
--mount=type=cache,mode=0777,target=/usr/local/cargo/registry \
--mount=type=cache,mode=0777,target=/usr/local/cargo/git \
cargo build --release && cp target/release/solana* ./docker-output
if [ "$debug" = "false" ] ; then \
./cargo stable build --release && cp target/release/solana* ./docker-output; \
else \
RUSTFLAGS='-g -C force-frame-pointers=yes' ./cargo stable build --release && cp target/release/solana* ./docker-output; \
fi
5 changes: 5 additions & 0 deletions f
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env sh
# Builds jito-solana in a docker container.
# Useful for running on machines that might not have cargo installed but can run docker (Flatcar Linux).
# run `./f true` to compile with debug flags

set -eux

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
Expand All @@ -9,7 +11,10 @@ GIT_SHA="$(git describe --always --dirty)"

echo $GIT_SHA

DEBUG_FLAGS=${1-false}

DOCKER_BUILDKIT=1 docker build \
--build-arg debug=$DEBUG_FLAGS \
--build-arg ci_commit=$GIT_SHA \
-t jitolabs/build-solana \
-f dev/Dockerfile . \
Expand Down

0 comments on commit 3822b58

Please sign in to comment.