Skip to content

Commit

Permalink
adding clang17 and clang18 to the builders
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravenwater committed Jul 15, 2024
1 parent 9f686c0 commit 25fa75d
Show file tree
Hide file tree
Showing 16 changed files with 240 additions and 23 deletions.
5 changes: 3 additions & 2 deletions docker/Dockerfile.clang11builder
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Dockerfile to create the builder container for compiling and testing Universal
# docker build --target clang11builder -t stillwater/universal:clang11builder -f Dockerfile.clang11builder .
# docker build --target clang11builder -t stillwater/builders:clang11builder -f Dockerfile.clang11builder .
# then push to docker hub
# docker push stillwater/universal:clang11builder
# docker push stillwater/builders:clang11builder

# BUILDER stage
FROM silkeh/clang:11 AS clang11builder
Expand All @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends -V \
apt-utils \
build-essential \
curl \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile.clang12
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ RUN cmake -D$target=ON -DBUILD_CMD_LINE_TOOLS=ON -DBUILD_DEMONSTRATION=OFF .. &&


# RELEASE stage
#FROM alpine:latest as release # hitting a segfault during startup of some playground programs
#FROM debian:buster-slim as release
FROM ubuntu:latest AS release
LABEL maintainer="Theodore Omtzigt"

Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.clang12builder
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Dockerfile to create the builder container for compiling and testing Universal
# docker build --target clang12builder -t stillwater/universal:clang12builder -f Dockerfile.clang12builder .
# docker build --target clang12builder -t stillwater/builders:clang12builder -f Dockerfile.clang12builder .
# then push to docker hub
# docker push stillwater/universal:clang12builder
# docker push stillwater/builders:clang12builder

# BUILDER stage
FROM silkeh/clang:12 AS clang12builder
Expand All @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends -V \
apt-utils \
build-essential \
curl \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
3 changes: 0 additions & 3 deletions docker/Dockerfile.clang13
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ RUN cmake -D$target=ON -DBUILD_CMD_LINE_TOOLS=ON -DBUILD_DEMONSTRATION=OFF .. &&


# RELEASE stage
#FROM alpine:latest as release # hitting a segfault during startup of some playground programs
#FROM debian:buster-slim as release

FROM ubuntu:latest AS release
LABEL maintainer="Theodore Omtzigt"

Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.clang13builder
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Dockerfile to create the builder container for compiling and testing Universal
# docker build --target clang13builder -t stillwater/universal:clang13builder -f Dockerfile.clang13builder .
# docker build --target clang13builder -t stillwater/builders:clang13builder -f Dockerfile.clang13builder .
# then push to docker hub
# docker push stillwater/universal:clang13builder
# docker push stillwater/builders:clang13builder

# BUILDER stage
FROM silkeh/clang:13 AS clang13builder
Expand All @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends -V \
apt-utils \
build-essential \
curl \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile.clang14
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ RUN cmake -D$target=ON -DBUILD_CMD_LINE_TOOLS=ON -DBUILD_DEMONSTRATION=OFF .. &


# RELEASE stage
#FROM alpine:latest as release # hitting a segfault during startup of some playground programs
#FROM debian:buster-slim as release
FROM ubuntu:latest AS release
LABEL maintainer="Theodore Omtzigt"

Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.clang14builder
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Dockerfile to create the builder container for compiling and testing Universal
# docker build --target clang14builder -t stillwater/universal:clang14builder -f Dockerfile.clang14builder .
# docker build --target clang14builder -t stillwater/builders:clang14builder -f Dockerfile.clang14builder .
# then push to docker hub
# docker push stillwater/universal:clang14builder
# docker push stillwater/builders:clang14builder

# BUILDER stage
FROM silkeh/clang:14 AS clang14builder
Expand All @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends -V \
apt-utils \
build-essential \
curl \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile.clang15
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ RUN cmake -D$target=ON -DBUILD_CMD_LINE_TOOLS=ON -DBUILD_DEMONSTRATION=OFF .. &


# RELEASE stage
#FROM alpine:latest as release # hitting a segfault during startup of some playground programs
#FROM debian:buster-slim as release
FROM ubuntu:latest AS release
LABEL maintainer="Theodore Omtzigt"

Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.clang15builder
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Dockerfile to create the builder container for compiling and testing Universal
# docker build --target clang14builder -t stillwater/universal:clang14builder -f Dockerfile.clang14builder .
# docker build --target clang15builder -t stillwater/builders:clang15builder -f Dockerfile.clang15builder .
# then push to docker hub
# docker push stillwater/universal:clang14builder
# docker push stillwater/builders:clang15builder

# BUILDER stage
FROM silkeh/clang:15 AS clang15builder
Expand All @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends -V \
apt-utils \
build-essential \
curl \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile.clang16
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ RUN cmake -D$target=ON -DBUILD_CMD_LINE_TOOLS=ON -DBUILD_DEMONSTRATION=OFF .. &


# RELEASE stage
#FROM alpine:latest as release # hitting a segfault during startup of some playground programs
#FROM debian:buster-slim as release
FROM ubuntu:latest AS release
LABEL maintainer="Theodore Omtzigt"

Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.clang16builder
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Dockerfile to create the builder container for compiling and testing Universal
# docker build --target clang14builder -t stillwater/universal:clang14builder -f Dockerfile.clang14builder .
# docker build --target clang16builder -t stillwater/builders:clang16builder -f Dockerfile.clang16builder .
# then push to docker hub
# docker push stillwater/universal:clang14builder
# docker push stillwater/builders:clang16builder

# BUILDER stage
FROM silkeh/clang:16 AS clang16builder
Expand All @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends -V \
apt-utils \
build-essential \
curl \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
64 changes: 64 additions & 0 deletions docker/Dockerfile.clang17
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#
# multi-stage build
# docker build --target builder -t stillwater/builders:builder will just build a builder container
# docker build --target release -t stillwater/builders:release will just build a release container

# BUILDER stage
FROM stillwater/builders:clang17builder AS builder
LABEL maintainer="Theodore Omtzigt"
ARG target=BUILD_ALL

# make certain you have a good .dockerignore file installed so that this layer isn't ginormous
COPY --chown=stillwater:stillwater . /home/stillwater/universal
# print contextual information of the container at this state for visual inspection
RUN ls -la /home/stillwater/universal && cmake -version

# set up the cmake/make environment to issue the build commands
RUN mkdir -p /home/stillwater/universal/build
WORKDIR /home/stillwater/universal/build
# test RUN statement to drive CI testing
# default is SANITY regression level: -DBUILD_REGRESSION_LEVEL_[1,2,3,4]=ON
# or -DBUILD_REGRESSION_STRESS=ON for stress testing
RUN cmake -D$target=ON -DBUILD_CMD_LINE_TOOLS=ON -DBUILD_DEMONSTRATION=OFF .. && make

# the command 'make test' is run as part of the CI test pipeline of the release container


# RELEASE stage
FROM ubuntu:latest AS release
LABEL maintainer="Theodore Omtzigt"

#RUN apk add --no-cache libc6-compat libstdc++ cmake make bash gawk sed grep bc coreutils
RUN apt-get update && apt-get update -y && apt-get install -y --no-install-recommends \
make \
&& apt-get clean
# create and use user stillwater
RUN useradd -ms /bin/bash stillwater
USER stillwater

# copy cmake enviroment needed for testing
COPY --from=builder /usr/local/bin/cmake /usr/local/bin/
COPY --from=builder /usr/local/bin/ctest /usr/local/bin/
# copy information material
COPY --from=builder /home/stillwater/universal/*.md /home/stillwater/universal/
# copy the docs
COPY --chown=stillwater:stillwater --from=builder /home/stillwater/universal/docs /home/stillwater/universal/docs
# no need to copy CMakeLists.txt as you don't have a compiler in this container
# and thus 'make -j 8' won't work anyway, only 'make test' which doesn't need CmakeLists.txt
#COPY --from=builder /home/stillwater/universal/CMakeLists.txt /home/stillwater/universal/

# after building, the test executables are organized in the build directory under stillwater
# ctest gets its configuration for CTestTestfile.cmake files. There is one at the root of the build tree
# and one for each directory that contains test executables.
# This way we can execute _make test_ in the test stage of the CI/CD pipeline as well as part of an interactive invocation
COPY --chown=stillwater:stillwater --from=builder /home/stillwater/universal/build /home/stillwater/universal/build

# double check we have all the executables of interest
#RUN find /home/stillwater/universal/build

# until we can figure out how to direct CodeShip to use this dir in the steps.yml file
WORKDIR /home/stillwater/universal/build

# the command 'make test' is run as part of the CI test pipeline of this release container

CMD ["echo", "Universal Numbers Clang17 Test Container"]
45 changes: 45 additions & 0 deletions docker/Dockerfile.clang17builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Dockerfile to create the builder container for compiling and testing Universal
# docker build --target clang17builder -t stillwater/builders:clang17builder -f Dockerfile.clang17builder .
# then push to docker hub
# docker push stillwater/builders:clang18builder

# BUILDER stage
FROM silkeh/clang:17 AS clang17builder
LABEL maintainer="Theodore Omtzigt"
# create a build environment
RUN apt-get update && apt-get install -y --no-install-recommends -V \
apt-utils \
build-essential \
curl \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# install a specific cmake version
RUN set -ex \
&& for key in C6C265324BBEBDC350B513D02D2CEF1034921684; do \
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys "$key" ; \
done

ENV CMAKE_DIR="v3.23"
ENV CMAKE_VERSION="3.23.1"

RUN set -ex \
&& curl -fsSLO --compressed https://cmake.org/files/${CMAKE_DIR}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz \
&& curl -fsSLO https://cmake.org/files/${CMAKE_DIR}/cmake-${CMAKE_VERSION}-SHA-256.txt.asc \
&& curl -fsSLO https://cmake.org/files/${CMAKE_DIR}/cmake-${CMAKE_VERSION}-SHA-256.txt \
&& gpg --verify cmake-${CMAKE_VERSION}-SHA-256.txt.asc cmake-${CMAKE_VERSION}-SHA-256.txt \
&& grep "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz\$" cmake-${CMAKE_VERSION}-SHA-256.txt | sha256sum -c - \
&& tar xzf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz -C /usr/local --strip-components=1 --no-same-owner \
&& rm -rf cmake-${CMAKE_VERSION}*

# create and use user stillwater
RUN useradd -ms /bin/bash stillwater
USER stillwater

WORKDIR /home/stillwater

# add a command that when you run the container without a command, it produces something meaningful
ENV CONTAINER_ID="Stillwater Clang 17 Builder"
CMD ["/usr/bin/env", "bash"]
64 changes: 64 additions & 0 deletions docker/Dockerfile.clang18
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#
# multi-stage build
# docker build --target builder -t stillwater/builders:builder will just build a builder container
# docker build --target release -t stillwater/builders:release will just build a release container

# BUILDER stage
FROM stillwater/builders:clang18builder AS builder
LABEL maintainer="Theodore Omtzigt"
ARG target=BUILD_ALL

# make certain you have a good .dockerignore file installed so that this layer isn't ginormous
COPY --chown=stillwater:stillwater . /home/stillwater/universal
# print contextual information of the container at this state for visual inspection
RUN ls -la /home/stillwater/universal && cmake -version

# set up the cmake/make environment to issue the build commands
RUN mkdir -p /home/stillwater/universal/build
WORKDIR /home/stillwater/universal/build
# test RUN statement to drive CI testing
# default is SANITY regression level: -DBUILD_REGRESSION_LEVEL_[1,2,3,4]=ON
# or -DBUILD_REGRESSION_STRESS=ON for stress testing
RUN cmake -D$target=ON -DBUILD_CMD_LINE_TOOLS=ON -DBUILD_DEMONSTRATION=OFF .. && make

# the command 'make test' is run as part of the CI test pipeline of the release container


# RELEASE stage
FROM ubuntu:latest AS release
LABEL maintainer="Theodore Omtzigt"

#RUN apk add --no-cache libc6-compat libstdc++ cmake make bash gawk sed grep bc coreutils
RUN apt-get update && apt-get update -y && apt-get install -y --no-install-recommends \
make \
&& apt-get clean
# create and use user stillwater
RUN useradd -ms /bin/bash stillwater
USER stillwater

# copy cmake enviroment needed for testing
COPY --from=builder /usr/local/bin/cmake /usr/local/bin/
COPY --from=builder /usr/local/bin/ctest /usr/local/bin/
# copy information material
COPY --from=builder /home/stillwater/universal/*.md /home/stillwater/universal/
# copy the docs
COPY --chown=stillwater:stillwater --from=builder /home/stillwater/universal/docs /home/stillwater/universal/docs
# no need to copy CMakeLists.txt as you don't have a compiler in this container
# and thus 'make -j 8' won't work anyway, only 'make test' which doesn't need CmakeLists.txt
#COPY --from=builder /home/stillwater/universal/CMakeLists.txt /home/stillwater/universal/

# after building, the test executables are organized in the build directory under stillwater
# ctest gets its configuration for CTestTestfile.cmake files. There is one at the root of the build tree
# and one for each directory that contains test executables.
# This way we can execute _make test_ in the test stage of the CI/CD pipeline as well as part of an interactive invocation
COPY --chown=stillwater:stillwater --from=builder /home/stillwater/universal/build /home/stillwater/universal/build

# double check we have all the executables of interest
#RUN find /home/stillwater/universal/build

# until we can figure out how to direct CodeShip to use this dir in the steps.yml file
WORKDIR /home/stillwater/universal/build

# the command 'make test' is run as part of the CI test pipeline of this release container

CMD ["echo", "Universal Numbers Clang18 Test Container"]
45 changes: 45 additions & 0 deletions docker/Dockerfile.clang18builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Dockerfile to create the builder container for compiling and testing Universal
# docker build --target clang18builder -t stillwater/builders:clang18builder -f Dockerfile.clang18builder .
# then push to docker hub
# docker push stillwater/builders:clang18builder

# BUILDER stage
FROM silkeh/clang:18 AS clang18builder
LABEL maintainer="Theodore Omtzigt"
# create a build environment
RUN apt-get update && apt-get install -y --no-install-recommends -V \
apt-utils \
build-essential \
curl \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# install a specific cmake version
RUN set -ex \
&& for key in C6C265324BBEBDC350B513D02D2CEF1034921684; do \
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys "$key" ; \
done

ENV CMAKE_DIR="v3.23"
ENV CMAKE_VERSION="3.23.1"

RUN set -ex \
&& curl -fsSLO --compressed https://cmake.org/files/${CMAKE_DIR}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz \
&& curl -fsSLO https://cmake.org/files/${CMAKE_DIR}/cmake-${CMAKE_VERSION}-SHA-256.txt.asc \
&& curl -fsSLO https://cmake.org/files/${CMAKE_DIR}/cmake-${CMAKE_VERSION}-SHA-256.txt \
&& gpg --verify cmake-${CMAKE_VERSION}-SHA-256.txt.asc cmake-${CMAKE_VERSION}-SHA-256.txt \
&& grep "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz\$" cmake-${CMAKE_VERSION}-SHA-256.txt | sha256sum -c - \
&& tar xzf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz -C /usr/local --strip-components=1 --no-same-owner \
&& rm -rf cmake-${CMAKE_VERSION}*

# create and use user stillwater
RUN useradd -ms /bin/bash stillwater
USER stillwater

WORKDIR /home/stillwater

# add a command that when you run the container without a command, it produces something meaningful
ENV CONTAINER_ID="Stillwater Clang 18 Builder"
CMD ["/usr/bin/env", "bash"]
4 changes: 4 additions & 0 deletions docker/build_clang_buildcontainers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ docker build --target clang15builder -t stillwater/builders:clang15builder -f Do
docker push stillwater/builders:clang15builder
docker build --target clang16builder -t stillwater/builders:clang16builder -f Dockerfile.clang16builder .
docker push stillwater/builders:clang16builder
docker build --target clang17builder -t stillwater/builders:clang17builder -f Dockerfile.clang17builder .
docker push stillwater/builders:clang17builder
docker build --target clang18builder -t stillwater/builders:clang18builder -f Dockerfile.clang18builder .
docker push stillwater/builders:clang18builder

0 comments on commit 25fa75d

Please sign in to comment.