ops(dockerfile): Build rust and clang wrappers from source
Some checks failed
ci / docker-build (pull_request) Failing after 58s
ci / build-and-test (pull_request) Has been skipped

This commit is contained in:
Brock Allen
2024-01-27 22:57:32 +00:00
parent 2df45c01ff
commit 8712d22ff5

View File

@@ -57,33 +57,32 @@ RUN ln -s /usr/bin/clang-tidy-${llvm_version} /usr/local/bin/clang-tidy
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# option A: install rust and install clang wrappers via cargo # option A: install rust and install clang wrappers via cargo
# this option installs rust and cargo, and then compiles the clang wrappers from scratch. this option installs rust and cargo, and then compiles the clang wrappers from scratch.
# this can take a significant amount of time (e.g., several minutes just to compile one tool), this can take a significant amount of time (e.g., several minutes just to compile one tool),
# and also increases the image size significantly. therefore, we go for option B below. and also increases the image size significantly. therefore, we go for option B below.
# RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
# ENV PATH=/root/.cargo/bin:$PATH ENV PATH=/root/.cargo/bin:$PATH
# Each takes around 280 s to build on an M2 macbook air Each takes around 280 s to build on an M2 macbook air
# RUN cargo install run-clang-format RUN cargo install run-clang-format
# RUN cargo install run-clang-tidy # RUN cargo install run-clang-tidy
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# option B: install pre-built clang wrappers # option B: install pre-built clang wrappers
# RUN mkdir -p /usr/local/run-clang-format
# RUN wget -O clang-utils.tgz "https://github.com/lmapii/run-clang-format/releases/download/v1.4.14/run-clang-format-v1.4.14-i686-unknown-linux-gnu.tar.gz" && \
# tar -C /usr/local/run-clang-format -xzf clang-utils.tgz --strip-components 1 && \
# rm clang-utils.tgz
# ENV PATH /usr/local/run-clang-format:$PATH
# RUN run-clang-format --version
RUN mkdir -p /usr/local/run-clang-format # RUN mkdir -p /usr/local/run-clang-tidy
RUN wget -O clang-utils.tgz "https://github.com/lmapii/run-clang-format/releases/download/v1.4.14/run-clang-format-v1.4.14-i686-unknown-linux-gnu.tar.gz" && \ # RUN wget -O clang-utils.tgz "https://github.com/lmapii/run-clang-tidy/releases/download/v0.2.5/run-clang-tidy-v0.2.5-i686-unknown-linux-gnu.tar.gz" && \
tar -C /usr/local/run-clang-format -xzf clang-utils.tgz --strip-components 1 && \ # tar -C /usr/local/run-clang-tidy -xzf clang-utils.tgz --strip-components 1 && \
rm clang-utils.tgz # rm clang-utils.tgz
ENV PATH /usr/local/run-clang-format:$PATH # ENV PATH /usr/local/run-clang-tidy:$PATH
RUN run-clang-format --version # RUN run-clang-tidy --version
RUN mkdir -p /usr/local/run-clang-tidy
RUN wget -O clang-utils.tgz "https://github.com/lmapii/run-clang-tidy/releases/download/v0.2.5/run-clang-tidy-v0.2.5-i686-unknown-linux-gnu.tar.gz" && \
tar -C /usr/local/run-clang-tidy -xzf clang-utils.tgz --strip-components 1 && \
rm clang-utils.tgz
ENV PATH /usr/local/run-clang-tidy:$PATH
RUN run-clang-tidy --version
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# install unity and ceedling # install unity and ceedling