@@ -12,19 +12,15 @@ COPY_METADATA:
12
12
COPY --dir ".git/" "./"
13
13
14
14
15
- alpine -base :
16
- FROM alpine:3.20.3@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a
15
+ rust -base :
16
+ FROM rust:1.78.0-alpine3.20
17
17
# renovate: datasource=repology depName=alpine_3_20/bash versioning=loose
18
18
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"
28
24
29
25
30
26
check-clean-git-history :
@@ -54,20 +50,19 @@ COPY_SOURCECODE:
54
50
COPY --dir "Cargo.toml" "src/" "./"
55
51
56
52
57
- rust-formatting -base :
53
+ sourcecode -base :
58
54
FROM +rust-base
59
- RUN apk add --no-cache rustfmt= $RUST_VERSION
60
55
DO +COPY_SOURCECODE
61
56
62
57
63
58
check-rust-formatting :
64
- FROM +rust-formatting -base
59
+ FROM +sourcecode -base
65
60
RUN ./ci/check-rust-formatting.sh
66
61
67
62
68
63
golang-base :
69
64
FROM golang:1.22.1
70
- WORKDIR "/monkey_interpreter "
65
+ WORKDIR "/consistent_whitespace "
71
66
72
67
73
68
shell-formatting-base :
@@ -104,7 +99,7 @@ check-formatting:
104
99
105
100
106
101
fix-rust-formatting :
107
- FROM +rust-formatting -base
102
+ FROM +sourcecode -base
108
103
RUN ./ci/fix-rust-formatting.sh
109
104
SAVE ARTIFACT "src/" AS LOCAL "./"
110
105
@@ -128,14 +123,12 @@ fix-formatting:
128
123
129
124
130
125
check-rust-linting :
131
- FROM +rust-base
132
- RUN apk add --no-cache rust-clippy= $RUST_VERSION
133
- DO +COPY_SOURCECODE
126
+ FROM +sourcecode-base
134
127
RUN ./ci/check-rust-linting.sh
135
128
136
129
137
130
check-shell-linting :
138
- FROM +alpine -base
131
+ FROM +rust -base
139
132
# renovate: datasource=repology depName=alpine_3_20/shellcheck versioning=loose
140
133
ENV SHELLCHECK_VERSION= "0.10.0-r1"
141
134
RUN apk add --no-cache shellcheck= $SHELLCHECK_VERSION
@@ -159,14 +152,12 @@ check-linting:
159
152
160
153
161
154
compile :
162
- FROM +rust-base
163
- DO +COPY_SOURCECODE
155
+ FROM +sourcecode-base
164
156
RUN ./ci/compile.sh
165
157
SAVE ARTIFACT "target/" AS LOCAL "./"
166
158
SAVE ARTIFACT "Cargo.lock" AS LOCAL "./"
167
159
168
160
169
161
unit-test :
170
- FROM +rust-base
171
- DO +COPY_SOURCECODE
162
+ FROM +sourcecode-base
172
163
RUN ./ci/unit-test.sh
0 commit comments