@@ -12,19 +12,15 @@ COPY_METADATA:
1212 COPY --dir ".git/" "./"
1313
1414
15- alpine -base :
16- FROM alpine:3.20.3@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a
15+ rust -base :
16+ FROM rust:1.78.0-alpine3.20
1717 # renovate: datasource=repology depName=alpine_3_20/bash versioning=loose
1818 ENV BASH_VERSION= "5.2.26-r0"
19- RUN apk add --no-cache bash= $BASH_VERSION
20- WORKDIR "/monkey_interpreter"
21-
22-
23- rust-base :
24- FROM +alpine-base
25- # renovate: datasource=repology depName=alpine_3_20/rust versioning=loose
26- ENV RUST_VERSION= "1.78.0-r0"
27- RUN apk add --no-cache cargo= $RUST_VERSION
19+ # renovate: datasource=repology depName=alpine_3_20/musl-dev versioning=loose
20+ ENV MUSL_VERSION= "1.2.5-r0"
21+ RUN apk add --no-cache bash= $BASH_VERSION musl-dev= $MUSL_VERSION
22+ RUN rustup component add rustfmt clippy
23+ WORKDIR "/consistent_whitespace"
2824
2925
3026check-clean-git-history :
@@ -54,20 +50,19 @@ COPY_SOURCECODE:
5450 COPY --dir "Cargo.toml" "src/" "./"
5551
5652
57- rust-formatting -base :
53+ sourcecode -base :
5854 FROM +rust-base
59- RUN apk add --no-cache rustfmt= $RUST_VERSION
6055 DO +COPY_SOURCECODE
6156
6257
6358check-rust-formatting :
64- FROM +rust-formatting -base
59+ FROM +sourcecode -base
6560 RUN ./ci/check-rust-formatting.sh
6661
6762
6863golang-base :
6964 FROM golang:1.22.1
70- WORKDIR "/monkey_interpreter "
65+ WORKDIR "/consistent_whitespace "
7166
7267
7368shell-formatting-base :
@@ -104,7 +99,7 @@ check-formatting:
10499
105100
106101fix-rust-formatting :
107- FROM +rust-formatting -base
102+ FROM +sourcecode -base
108103 RUN ./ci/fix-rust-formatting.sh
109104 SAVE ARTIFACT "src/" AS LOCAL "./"
110105
@@ -128,14 +123,12 @@ fix-formatting:
128123
129124
130125check-rust-linting :
131- FROM +rust-base
132- RUN apk add --no-cache rust-clippy= $RUST_VERSION
133- DO +COPY_SOURCECODE
126+ FROM +sourcecode-base
134127 RUN ./ci/check-rust-linting.sh
135128
136129
137130check-shell-linting :
138- FROM +alpine -base
131+ FROM +rust -base
139132 # renovate: datasource=repology depName=alpine_3_20/shellcheck versioning=loose
140133 ENV SHELLCHECK_VERSION= "0.10.0-r1"
141134 RUN apk add --no-cache shellcheck= $SHELLCHECK_VERSION
@@ -159,14 +152,12 @@ check-linting:
159152
160153
161154compile :
162- FROM +rust-base
163- DO +COPY_SOURCECODE
155+ FROM +sourcecode-base
164156 RUN ./ci/compile.sh
165157 SAVE ARTIFACT "target/" AS LOCAL "./"
166158 SAVE ARTIFACT "Cargo.lock" AS LOCAL "./"
167159
168160
169161unit-test :
170- FROM +rust-base
171- DO +COPY_SOURCECODE
162+ FROM +sourcecode-base
172163 RUN ./ci/unit-test.sh
0 commit comments