Skip to content

Commit

Permalink
ci-builder fix
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Apr 16, 2024
1 parent cd0bc84 commit 7f75f2a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 3 additions & 4 deletions ops/docker/ci-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ COPY ./versions.json ./versions.json
COPY ./ops/scripts/install-foundry.sh ./install-foundry.sh

RUN curl -L https://foundry.paradigm.xyz | bash
RUN source $HOME/.profile && \
./install-foundry.sh && \
cargo install svm-rs
RUN source $HOME/.profile && ./install-foundry.sh

RUN strip /root/.foundry/bin/forge && \
strip /root/.foundry/bin/cast && \
strip /root/.foundry/bin/anvil && \
strip /root/.cargo/bin/svm
strip /root/.cargo/bin/svm && \
strip /root/.cargo/bin/just

FROM --platform=linux/amd64 debian:buster-slim as go-build

Expand Down
12 changes: 11 additions & 1 deletion ops/scripts/install-foundry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@ if git rev-parse "$TAG" >/dev/null 2>&1; then
foundryup -v "$TAG"
else
echo "Nightly tag doesn't exist! Building from source..."
foundryup -C "$SHA"
git checkout "$SHA"

# Use native `cargo` build to avoid any rustc environment variables `foundryup` sets. We explicitly
# ignore chisel, as it is not a part of `ci-builder`.
cargo build --bin forge --release
cargo build --bin cast --release
cargo build --bin anvil --release
mkdir -p ~/.foundry/bin
mv target/release/forge ~/.foundry/bin
mv target/release/cast ~/.foundry/bin
mv target/release/anvil ~/.foundry/bin
fi

# Remove the temporary foundry repo; Used just for checking the nightly tag's existence.
Expand Down

0 comments on commit 7f75f2a

Please sign in to comment.