Skip to content

Commit

Permalink
Let's hope this works :fingers-crossed:
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Aug 30, 2024
1 parent d3f4990 commit d72e80c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
with:
cache-map: |
{
"cargo": "~/.cargo",
"cargo-home": "/usr/src/app/cargo-home",
"target": "/usr/src/app/target"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
Expand Down
15 changes: 7 additions & 8 deletions docker/Dockerfile-debug
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,22 @@ FROM ghcr.io/restatedev/dev-tools:latest AS planner
COPY --exclude=.git . .
RUN just chef-prepare

FROM ghcr.io/restatedev/dev-tools:latest AS base
FROM ghcr.io/restatedev/dev-tools:latest AS builder
WORKDIR /usr/src/app

COPY --from=planner /restate/recipe.json recipe.json
COPY justfile justfile

FROM base AS builder
WORKDIR /usr/src/app
# Caching layer if nothing has changed
# Only build restate binary to avoid compiling unneeded crates
RUN \
--mount=type=cache,target=~/.cargo,sharing=locked \
--mount=type=cache,target=/usr/src/app/cargo-home,sharing=locked \
--mount=type=cache,target=/usr/src/app/target,sharing=locked \
just libc=gnu chef-cook --bin restate-server
CARGO_HOME=/usr/src/app/cargo-home just libc=gnu chef-cook --bin restate-server
COPY . .
RUN \
--mount=type=cache,target=~/.cargo,sharing=locked \
--mount=type=cache,target=/usr/src/app/cargo-home,sharing=locked \
--mount=type=cache,target=/usr/src/app/target,sharing=locked \
just libc=gnu build --bin restate-server && \
CARGO_HOME=/usr/src/app/cargo-home just libc=gnu build --bin restate-server && \
mv target/$(just libc=gnu print-target)/debug/restate-server target/restate-server

# We do not need the Rust toolchain to run the server binary!
Expand Down

0 comments on commit d72e80c

Please sign in to comment.