@@ -18,25 +18,31 @@ WORKDIR /workspace
1818ARG IGNITE_EVOLVE_APP_VERSION=main
1919RUN ignite scaffold chain gm --no-module --skip-git --address-prefix gm
2020WORKDIR /workspace/gm
21+
22+ # Install evolve plugin - cached separately
2123RUN ignite app install github.com/ignite/apps/evolve@${IGNITE_EVOLVE_APP_VERSION}
2224RUN ignite evolve add
2325
24- # Copy ev-abci repo after scaffolding to avoid cache invalidation on code changes
25- COPY . /workspace/ev-abci
26-
27- # Inject App wiring for ev-abci network module before building
26+ # Copy only patch script first - cached if patch doesn't change
2827COPY .github/integration-tests/patches/app-wiring/patch-app-wiring.sh /workspace/patch-app-wiring.sh
2928RUN chmod +x /workspace/patch-app-wiring.sh && \
3029 echo "===== Running network module patch =====" && \
3130 bash /workspace/patch-app-wiring.sh
3231
33- # Align module versions like in CI - cached if EVNODE_VERSION doesn't change
32+ # Copy only go.mod and go.sum files for dependency caching
33+ COPY go.mod go.sum /workspace/ev-abci/
34+ COPY attester/go.mod attester/go.sum /workspace/ev-abci/attester/
35+
36+ # Set up module replacements - cached if versions don't change
3437ARG EVNODE_VERSION=v1.0.0-beta.2
3538RUN go mod edit -replace github.com/evstack/ev-node=github.com/evstack/ev-node@${EVNODE_VERSION} \
3639 && go mod edit -replace github.com/evstack/ev-abci=../ev-abci \
3740 && go mod tidy
3841
39- # Build gmd binary - this will rebuild if source code changes
42+ # Copy source code only after dependencies are resolved
43+ COPY . /workspace/ev-abci
44+
45+ # Build gmd binary - this will rebuild only if source code changes
4046ENV GOBIN=/workspace/bin
4147RUN ignite chain build --skip-proto && \
4248 test -x "${GOBIN}/gmd"
0 commit comments