-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding clang17 and clang18 to the builders
- Loading branch information
1 parent
9f686c0
commit 25fa75d
Showing
16 changed files
with
240 additions
and
23 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
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
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
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
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
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,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"] |
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,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"] |
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,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"] |
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,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"] |
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