Skip to content

Commit d4ad5ef

Browse files
committed
feat: add rustup for base images, and use rust 1.88.0 by default
1 parent ecee9ee commit d4ad5ef

21 files changed

Lines changed: 86 additions & 6 deletions

File tree

.github/workflows/main.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
#!/bin/bash
2525
versions="$(grep -E "^\+\sOTP-.*" ./RELEASE.md | \
26-
sed -E 's/\+\sOTP-([0-9.-]*),Elixir-([0-9.]*).*/{"otp":"\1","elixir":"\2"}/g' | \
26+
sed -E 's/\+\sOTP-([0-9.-]*),Elixir-([0-9.-]*),Rust-([0-9.]*).*/{"otp":"\1","elixir":"\2","rust":"\3"}/g' | \
2727
jq -sc .)"
2828
2929
platforms='[
@@ -57,6 +57,7 @@ jobs:
5757
base_image_vsn: "5.0",
5858
otp: $version.otp,
5959
elixir: $version.elixir,
60+
rust: $version.rust,
6061
platform: $platform,
6162
arch: $arch
6263
}
@@ -175,6 +176,7 @@ jobs:
175176
BUILD_FROM=${{ steps.base_tag.outputs.image }}
176177
OTP_VERSION=${{ matrix.otp }}
177178
ELIXIR_VERSION=${{ matrix.elixir }}
179+
RUST_VERSION=${{ matrix.rust }}
178180
BUILD_WITHOUT_QUIC=1
179181
EMQTT_BENCH_VERSION=0.4.5
180182
LUX_VERSION=lux-2.6

.github/workflows/test.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
#!/bin/bash
3737
versions="$(grep -E "^\+\sOTP-.*" ./RELEASE.md | \
38-
sed -E 's/\+\sOTP-([0-9.-]*),Elixir-([0-9.]*).*/{"otp":"\1","elixir":"\2"}/g' | \
38+
sed -E 's/\+\sOTP-([0-9.-]*),Elixir-([0-9.-]*),Rust-([0-9.]*).*/{"otp":"\1","elixir":"\2","rust":"\3"}/g' | \
3939
jq -sc .)"
4040
4141
platforms='[
@@ -69,6 +69,7 @@ jobs:
6969
base_image_vsn: "5.0",
7070
otp: $version.otp,
7171
elixir: $version.elixir,
72+
rust: $version.rust,
7273
platform: $platform,
7374
arch: $arch
7475
}
@@ -120,6 +121,7 @@ jobs:
120121
BUILD_FROM=${{ steps.base_tag.outputs.image }}
121122
OTP_VERSION=${{ matrix.otp }}
122123
ELIXIR_VERSION=${{ matrix.elixir }}
124+
RUST_VERSION=${{ matrix.rust }}
123125
BUILD_WITHOUT_QUIC=1
124126
EMQTT_BENCH_VERSION=0.4.5
125127
LUX_VERSION=lux-2.6

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ ENV ERL_AFLAGS="-kernel shell_history enabled"
77
ARG BUILD_WITHOUT_QUIC=false
88
ARG OTP_VERSION=27.3.4.2-1
99
ARG ELIXIR_VERSION=1.18.3
10+
ARG RUST_VERSION=1.88.0
1011
ARG FDB_VERSION=7.3.43
1112
ARG EMQTT_BENCH_VERSION=0.4.25
1213
ARG LUX_VERSION=lux-3.0
1314

14-
COPY get-otp.sh get-zsh.sh get-elixir.sh get-fdb.sh get-emqtt-bench.sh get-lux.sh /
15+
COPY get-otp.sh get-zsh.sh get-elixir.sh get-fdb.sh get-rust.sh get-emqtt-bench.sh get-lux.sh /
1516

1617
RUN if [ -f /opt/rh/devtoolset-10/enable ]; then source /opt/rh/devtoolset-10/enable; fi && \
1718
. /etc/os-release && export ID=$ID && export VERSION_ID=$VERSION_ID && \
@@ -22,6 +23,7 @@ RUN if [ -f /opt/rh/devtoolset-10/enable ]; then source /opt/rh/devtoolset-10/en
2223
/get-otp.sh ${OTP_VERSION} && \
2324
/get-elixir.sh ${ELIXIR_VERSION} && \
2425
if [ "${OTP_VERSION#26.}" != "$OTP_VERSION" ]; then /get-fdb.sh ${FDB_VERSION}; fi && \
26+
/get-rust.sh ${RUST_VERSION} && \
2527
/get-emqtt-bench.sh ${EMQTT_BENCH_VERSION} && \
2628
/get-lux.sh ${LUX_VERSION} && \
2729
rm /get-otp.sh /get-zsh.sh /get-elixir.sh /get-fdb.sh /get-emqtt-bench.sh /get-lux.sh

RELEASE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ List per major version used by EMQX, quic, rocksdb builds
22

33
OTP version from emqx/otp.git, Elixir version from elixir-lang/elixir.git.
44

5-
+ OTP-24.3.4.2-4,Elixir-1.15.7
6-
+ OTP-26.2.5.14-1,Elixir-1.15.7
7-
+ OTP-27.3.4.2-1,Elixir-1.18.3
5+
+ OTP-24.3.4.2-4,Elixir-1.15.7,Rust-1.88.0
6+
+ OTP-26.2.5.14-1,Elixir-1.15.7,Rust-1.88.0
7+
+ OTP-27.3.4.2-1,Elixir-1.18.3,Rust-1.88.0

alpine3.15.1/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,8 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
4949
COPY get-cmake.sh /get-cmake.sh
5050
RUN /get-cmake.sh build
5151

52+
# Install Rustup
53+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
54+
ENV PATH="/root/.cargo/bin:${PATH}"
55+
5256
CMD [ "/bin/sh" ]

alpine3.21.3/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,8 @@ RUN apk add --no-cache --virtual .build-deps \
4747
COPY get-cmake.sh /get-cmake.sh
4848
RUN /get-cmake.sh build
4949

50+
# Install Rustup
51+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
52+
ENV PATH="/root/.cargo/bin:${PATH}"
53+
5054
CMD [ "/bin/sh" ]

amzn2/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,8 @@ RUN yum clean packages && \
6565
ENV LC_ALL=C.UTF-8
6666
ENV LANG=C.UTF-8
6767

68+
# Install Rustup
69+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
70+
ENV PATH="/root/.cargo/bin:${PATH}"
71+
6872
CMD [ "/bin/bash" ]

amzn2023/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,8 @@ WORKDIR /
3333
ENV LC_ALL=C.UTF-8
3434
ENV LANG=C.UTF-8
3535

36+
# Install Rustup
37+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
38+
ENV PATH="/root/.cargo/bin:${PATH}"
39+
3640
CMD [ "/bin/bash" ]

debian10/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,9 @@ RUN /get-cmake.sh build && rm /get-cmake.sh
8383
ENV LC_ALL=C.UTF-8
8484
ENV LANG=C.UTF-8
8585

86+
# Install Rustup
87+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
88+
ENV PATH="/root/.cargo/bin:${PATH}"
89+
8690
WORKDIR /
8791
CMD [ "/bin/bash" ]

debian11/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,9 @@ RUN apt-get clean\
5959
ENV LC_ALL=C.UTF-8
6060
ENV LANG=C.UTF-8
6161

62+
# Install Rustup
63+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
64+
ENV PATH="/root/.cargo/bin:${PATH}"
65+
6266
WORKDIR /
6367
CMD [ "/bin/bash" ]

0 commit comments

Comments
 (0)