-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: introduce cubejs/rust-builder
- Loading branch information
Showing
4 changed files
with
41 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
ARG OS_NAME=bookworm-slim | ||
|
||
FROM rust:$OS_NAME | ||
|
||
ARG LLVM_VERSION=18 | ||
|
||
RUN rustup update && \ | ||
rustup default nightly-2024-01-29 && \ | ||
rustup component add --toolchain nightly-2024-01-29 rustfmt clippy; | ||
|
||
RUN apt update \ | ||
&& apt upgrade -y \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common libssl-dev pkg-config wget gnupg git apt-transport-https ca-certificates \ | ||
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ | ||
# https://github.com/llvm/llvm-project/issues/62475 \ | ||
# add it twice to workaround: | ||
&& add-apt-repository --yes "deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" \ | ||
&& add-apt-repository --yes "deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" \ | ||
&& sleep 5 \ | ||
&& apt update \ | ||
&& apt install -y git llvm-$LLVM_VERSION clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev clang-$LLVM_VERSION cmake \ | ||
&& rm -rf /var/lib/apt/lists/*; | ||
|
||
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-$LLVM_VERSION 100 | ||
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$LLVM_VERSION 100 | ||
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang-$LLVM_VERSION 100 | ||
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-$LLVM_VERSION 100 | ||
|
||
WORKDIR /usr/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
target "rust-builder-bookworm" { | ||
context = "." | ||
dockerfile = "builder.Dockerfile" | ||
args = { | ||
OS_NAME = "1-slim-bookworm" | ||
LLVM_VERSION = "18" | ||
} | ||
tags = ["cubejs/rust-builder:bookworm-llvm-18"] | ||
platforms = ["linux/amd64", "linux/arm64"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[toolchain] | ||
channel = "nightly-2024-01-29" | ||
components = ["rustfmt", "rustc-dev", "clippy"] | ||
components = ["rustfmt", "clippy"] | ||
profile = "minimal" |