Skip to content

Commit

Permalink
# This is a combination of 186 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

various improvements

# This is the commit message EOS-Mainnet#2:

new hash

# This is the commit message EOS-Mainnet#3:

fix for script path

# This is the commit message EOS-Mainnet#4:

fixes

# This is the commit message EOS-Mainnet#5:

fixes

# This is the commit message EOS-Mainnet#6:

fixes

# This is the commit message EOS-Mainnet#7:

fixes

# This is the commit message EOS-Mainnet#8:

fixes

# This is the commit message EOS-Mainnet#9:

fixes

# This is the commit message EOS-Mainnet#10:

fixes

# This is the commit message EOS-Mainnet#11:

fixes

# This is the commit message EOS-Mainnet#12:

fixes

# This is the commit message EOS-Mainnet#13:

fixes

# This is the commit message EOS-Mainnet#14:

fixes

# This is the commit message EOS-Mainnet#15:

fixes

# This is the commit message EOS-Mainnet#16:

fixes

# This is the commit message EOS-Mainnet#17:

fixes

# This is the commit message EOS-Mainnet#18:

fixes

# This is the commit message EOS-Mainnet#19:

fixes

# This is the commit message EOS-Mainnet#20:

fixes

# This is the commit message EOS-Mainnet#21:

fixes

# This is the commit message EOS-Mainnet#22:

fixes

# This is the commit message EOS-Mainnet#23:

fixes

# This is the commit message EOS-Mainnet#24:

fixes

# This is the commit message EOS-Mainnet#25:

fixes

# This is the commit message EOS-Mainnet#26:

testing

# This is the commit message EOS-Mainnet#27:

testing

# This is the commit message EOS-Mainnet#28:

testing

# This is the commit message EOS-Mainnet#29:

testing

# This is the commit message EOS-Mainnet#30:

testing

# This is the commit message EOS-Mainnet#31:

testing

# This is the commit message EOS-Mainnet#32:

testing

# This is the commit message EOS-Mainnet#33:

testing

# This is the commit message EOS-Mainnet#34:

testing

# This is the commit message EOS-Mainnet#35:

testing

# This is the commit message EOS-Mainnet#36:

testing

# This is the commit message EOS-Mainnet#37:

testing

# This is the commit message EOS-Mainnet#38:

testing

# This is the commit message EOS-Mainnet#39:

testing

# This is the commit message EOS-Mainnet#40:

testing

# This is the commit message EOS-Mainnet#41:

testing

# This is the commit message EOS-Mainnet#42:

testing

# This is the commit message EOS-Mainnet#43:

testing

# This is the commit message EOS-Mainnet#44:

fixes

# This is the commit message EOS-Mainnet#45:

fixes

# This is the commit message EOS-Mainnet#46:

fixes

# This is the commit message EOS-Mainnet#47:

fixes

# This is the commit message EOS-Mainnet#48:

fixes

# This is the commit message EOS-Mainnet#49:

fixes

# This is the commit message EOS-Mainnet#50:

fixes

# This is the commit message EOS-Mainnet#51:

fixes

# This is the commit message EOS-Mainnet#52:

fixes

# This is the commit message EOS-Mainnet#53:

fixes

# This is the commit message EOS-Mainnet#54:

fixes

# This is the commit message EOS-Mainnet#55:

fixes

# This is the commit message EOS-Mainnet#56:

fixes

# This is the commit message EOS-Mainnet#57:

fixes

# This is the commit message EOS-Mainnet#58:

fixes

# This is the commit message EOS-Mainnet#59:

fixes

# This is the commit message EOS-Mainnet#60:

fixes

# This is the commit message EOS-Mainnet#61:

fixes

# This is the commit message EOS-Mainnet#62:

fixes

# This is the commit message EOS-Mainnet#63:

fixes

# This is the commit message EOS-Mainnet#64:

fixes

# This is the commit message EOS-Mainnet#65:

fixes

# This is the commit message EOS-Mainnet#66:

fixes

# This is the commit message EOS-Mainnet#67:

fixes

# This is the commit message EOS-Mainnet#68:

fixes

# This is the commit message EOS-Mainnet#69:

fixes

# This is the commit message EOS-Mainnet#70:

fixes

# This is the commit message EOS-Mainnet#71:

fixes

# This is the commit message EOS-Mainnet#72:

fixes

# This is the commit message EOS-Mainnet#73:

fixes

# This is the commit message EOS-Mainnet#74:

fixes

# This is the commit message EOS-Mainnet#75:

fixes

# This is the commit message EOS-Mainnet#76:

fixes

# This is the commit message EOS-Mainnet#77:

fixes

# This is the commit message EOS-Mainnet#78:

fixes

# This is the commit message EOS-Mainnet#79:

more testing

# This is the commit message EOS-Mainnet#80:

testing

# This is the commit message EOS-Mainnet#81:

fixes

# This is the commit message EOS-Mainnet#82:

fixes

# This is the commit message EOS-Mainnet#83:

fixes

# This is the commit message EOS-Mainnet#84:

fixes

# This is the commit message EOS-Mainnet#85:

fixes

# This is the commit message EOS-Mainnet#86:

fixes

# This is the commit message EOS-Mainnet#87:

fixes

# This is the commit message EOS-Mainnet#88:

fixes

# This is the commit message EOS-Mainnet#89:

fixes

# This is the commit message EOS-Mainnet#90:

fixes

# This is the commit message EOS-Mainnet#91:

fixes

# This is the commit message EOS-Mainnet#92:

fixes

# This is the commit message EOS-Mainnet#93:

propagate-environment for buildkite-agent

# This is the commit message EOS-Mainnet#94:

propagate-environment for buildkite-agent

# This is the commit message EOS-Mainnet#95:

propagate-environment for buildkite-agent

# This is the commit message EOS-Mainnet#96:

propagate-environment for buildkite-agent

# This is the commit message EOS-Mainnet#97:

fixes

# This is the commit message EOS-Mainnet#98:

fixes

# This is the commit message EOS-Mainnet#99:

fixes

# This is the commit message EOS-Mainnet#100:

fixes

# This is the commit message EOS-Mainnet#101:

fixes

# This is the commit message EOS-Mainnet#102:

fixes

# This is the commit message EOS-Mainnet#103:

fixes

# This is the commit message EOS-Mainnet#104:

fixes

# This is the commit message EOS-Mainnet#105:

fixes

# This is the commit message EOS-Mainnet#106:

fixes

# This is the commit message EOS-Mainnet#107:

fixes

# This is the commit message EOS-Mainnet#108:

fixes

# This is the commit message EOS-Mainnet#109:

fixes

# This is the commit message EOS-Mainnet#110:

fixes

# This is the commit message EOS-Mainnet#111:

fixes

# This is the commit message EOS-Mainnet#112:

fixes

# This is the commit message EOS-Mainnet#113:

fixes

# This is the commit message EOS-Mainnet#114:

fixes

# This is the commit message EOS-Mainnet#115:

fixes

# This is the commit message EOS-Mainnet#116:

fixes

# This is the commit message EOS-Mainnet#117:

fixes

# This is the commit message EOS-Mainnet#118:

fixes

# This is the commit message EOS-Mainnet#119:

fixes

# This is the commit message EOS-Mainnet#120:

fixes

# This is the commit message EOS-Mainnet#121:

fixes

# This is the commit message EOS-Mainnet#122:

fixes

# This is the commit message EOS-Mainnet#123:

fixes

# This is the commit message EOS-Mainnet#124:

fixes

# This is the commit message EOSIO#125:

fixes

# This is the commit message EOSIO#126:

fixes

# This is the commit message EOSIO#127:

fixes

# This is the commit message EOSIO#128:

fixes

# This is the commit message EOSIO#129:

fixes

# This is the commit message EOSIO#130:

fixes

# This is the commit message EOSIO#131:

fixes

# This is the commit message EOSIO#132:

fixes

# This is the commit message EOSIO#133:

fixes

# This is the commit message EOSIO#134:

fixes

# This is the commit message EOSIO#135:

fixes

# This is the commit message EOSIO#136:

fixes

# This is the commit message EOSIO#137:

fixes

# This is the commit message EOSIO#138:

fixes

# This is the commit message EOSIO#139:

fixes

# This is the commit message EOSIO#140:

fixes

# This is the commit message EOSIO#141:

fixes

# This is the commit message EOSIO#142:

fixes

# This is the commit message EOSIO#143:

fixes

# This is the commit message EOSIO#144:

fixes

# This is the commit message EOSIO#145:

fixes

# This is the commit message EOSIO#146:

fixes

# This is the commit message EOSIO#147:

fixes

# This is the commit message EOSIO#148:

fixes

# This is the commit message EOSIO#149:

fixes

# This is the commit message EOSIO#150:

fixes

# This is the commit message EOSIO#151:

fixes

# This is the commit message EOSIO#152:

fixes

# This is the commit message EOSIO#153:

testing

# This is the commit message EOSIO#154:

fixes

# This is the commit message EOSIO#155:

fixes

# This is the commit message EOSIO#156:

fixes

# This is the commit message EOSIO#157:

fixes

# This is the commit message EOSIO#158:

fixes

# This is the commit message EOSIO#159:

fixes

# This is the commit message EOSIO#160:

fixes

# This is the commit message EOSIO#161:

fixes

# This is the commit message EOSIO#162:

fixes

# This is the commit message EOSIO#163:

fixes

# This is the commit message EOSIO#164:

fixes

# This is the commit message EOSIO#165:

fixes

# This is the commit message EOSIO#166:

fixes

# This is the commit message EOSIO#167:

fixes

# This is the commit message EOSIO#168:

fixes

# This is the commit message EOSIO#169:

fixes

# This is the commit message EOSIO#170:

fixes

# This is the commit message EOSIO#171:

fixes

# This is the commit message EOSIO#172:

fixes

# This is the commit message EOSIO#173:

fixes

# This is the commit message EOSIO#174:

fixes

# This is the commit message EOSIO#175:

fixes

# This is the commit message EOSIO#176:

fixes

# This is the commit message EOSIO#177:

fixes

# This is the commit message EOSIO#178:

fixes

# This is the commit message EOSIO#179:

fixes

# This is the commit message EOSIO#180:

fixes

# This is the commit message EOSIO#181:

fixes

# This is the commit message EOSIO#182:

fixes

# This is the commit message EOSIO#183:

fixes

# This is the commit message EOSIO#184:

fixes

# This is the commit message EOSIO#185:

fixes

# This is the commit message EOSIO#186:

fixes
  • Loading branch information
Nathan Pierce committed Jul 30, 2019
1 parent b912e52 commit 6c09577
Show file tree
Hide file tree
Showing 18 changed files with 768 additions and 73 deletions.
14 changes: 6 additions & 8 deletions .cicd/.helpers
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ VERBOSE=${VERBOSE:-true}
export PROJECT_NAME="eosio"

# Set IMAGE_TAG using arg (generate-base-images.sh) or env (travis.yml)
( [[ $(uname) != 'Darwin' ]] && [[ -z $IMAGE_TAG ]] && [[ -z $1 ]] ) && echo "You must provide the distro IMAGE_TAG name (example: ubuntu-18.04) as argument \$1 or set it within your ENV" && exit 1
export IMAGE_TAG=${IMAGE_TAG:-$1}

function execute() {
$VERBOSE && echo "--- Executing: $@"
$DRYRUN || "$@"
${VERBOSE:-true} && echo "--- Executing: $@"
${DRYRUN:-false} || "$@"
}

function determine-hash() {
Expand All @@ -29,10 +28,8 @@ function determine-hash() {
function generate_docker_image() {
# If we cannot pull the image, we build and push it first.
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
cd ./.cicd
docker build -t $FULL_TAG -f ./${IMAGE_TAG}.dockerfile .
docker build -t $FULL_TAG -f ./docker/${IMAGE_TAG}.dockerfile .
docker push $FULL_TAG
cd -
}

function docker_tag_exists() {
Expand All @@ -42,8 +39,9 @@ function docker_tag_exists() {
( [[ $EXISTS =~ '404 page not found' ]] || [[ $EXISTS =~ 'manifest unknown' ]] ) && return 1 || return 0
}

if [[ $(uname) != 'Darwin' ]]; then # Darwin doesn't need hash (yet)
determine-hash ".cicd/${IMAGE_TAG}.dockerfile"
# If you're on mac and you want to generate the image, use "force" as $2
if [[ ! -z $IMAGE_TAG ]]; then # Darwin doesn't need hash (yet)
determine-hash "docker/${IMAGE_TAG}.dockerfile"
[[ -z $DETERMINED_HASH ]] && echo "DETERMINED_HASH empty! (check determine-hash function)" && exit 1
export FULL_TAG="eosio/producer:${PROJECT_NAME}-$HASHED_IMAGE_TAG"
fi
8 changes: 8 additions & 0 deletions .cicd/docker/.helpers-v33
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function fold-execute() {
${TRAVIS:-false} && echo -en "travis_fold:start:$(echo $@)\r" || true
echo "--- Executing: $@"
"$@"
rcode=$?
[ $rcode -eq 0 ] || exit $rcode
${TRAVIS:-false} && echo -en "travis_fold:end:$(echo $@)\r" || true
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,23 @@ ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
RUN curl -LO http://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/c/ccache-3.3.4-1.el7.x86_64.rpm \
&& yum install -y ccache-3.3.4-1.el7.x86_64.rpm

# Install Buildkite Agent
RUN echo -e "[buildkite-agent]\nname = Buildkite Pty Ltd\nbaseurl = https://yum.buildkite.com/buildkite-agent/stable/x86_64/\nenabled=1\ngpgcheck=0\npriority=1" > /etc/yum.repos.d/buildkite-agent.repo && \
yum -y install buildkite-agent

# PRE_COMMANDS: Executed pre-cmake
# CMAKE_EXTRAS: Executed right before the cmake path (on the end)
ENV PRE_COMMANDS="export PATH=/usr/lib64/ccache:$PATH &&"
ENV PRE_COMMANDS="export PATH=/usr/lib64/ccache:\$PATH"
ENV CMAKE_EXTRAS="-DCMAKE_CXX_COMPILER='clang++' -DCMAKE_C_COMPILER='clang'"

CMD bash -c "$PRE_COMMANDS ccache -s && \
mkdir /workdir/build && cd /workdir/build && cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && make -j $(getconf _NPROCESSORS_ONLN) && \
ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test"
# Bring in helpers that provides execute function so we can get better logging in BK and TRAV
COPY ./docker/.helpers-v33 /tmp/.helpers

CMD bash -c ". /tmp/.helpers && $PRE_COMMANDS && \
fold-execute ccache -s && \
mkdir /workdir/build && cd /workdir/build && fold-execute cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && \
fold-execute make -j $(getconf _NPROCESSORS_ONLN) && \
if ${ENABLE_PARALLEL_TESTS:-true}; then fold-execute ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test; fi && \
if ${ENABLE_SERIAL_TESTS:-true}; then mkdir -p ./mongodb && fold-execute mongod --dbpath ./mongodb --fork --logpath mongod.log && fold-execute ctest -L nonparallelizable_tests --output-on-failure -T Test; fi && \
if ${ENABLE_LR_TESTS:-false}; then fold-execute ctest -L long_running_tests --output-on-failure -T Test; fi && \
if ! ${TRAVIS:-false}; then cd .. && tar -pczf build.tar.gz build && buildkite-agent artifact upload build.tar.gz --agent-access-token $BUILDKITE_AGENT_ACCESS_TOKEN; fi"
22 changes: 17 additions & 5 deletions .cicd/centos-7.dockerfile → .cicd/docker/centos-7.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN yum update -y \
&& yum --enablerepo=extras install -y which git autoconf automake libtool make bzip2 doxygen \
graphviz bzip2-devel openssl-devel gmp-devel ocaml libicu-devel \
python python-devel rh-python36 gettext-devel file libusbx-devel \
libcurl-devel patch
libcurl-devel patch

# Build appropriate version of CMake.
RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz \
Expand Down Expand Up @@ -88,10 +88,22 @@ RUN cd /usr/lib64/ccache && ln -s ../../bin/ccache c++
## We need to tell ccache to actually use devtoolset-8 instead of the default system one (ccache resets anything set in PATH when it launches)
ENV CCACHE_PATH="/opt/rh/devtoolset-8/root/usr/bin"

# Install Buildkite Agent
RUN echo -e "[buildkite-agent]\nname = Buildkite Pty Ltd\nbaseurl = https://yum.buildkite.com/buildkite-agent/stable/x86_64/\nenabled=1\ngpgcheck=0\npriority=1" > /etc/yum.repos.d/buildkite-agent.repo && \
yum -y install buildkite-agent

# PRE_COMMANDS: Executed pre-cmake
# CMAKE_EXTRAS: Executed right before the cmake path (on the end)
ENV PRE_COMMANDS="source /opt/rh/devtoolset-8/enable && source /opt/rh/rh-python36/enable && export PATH=/usr/lib64/ccache:$PATH &&"
ENV PRE_COMMANDS="source /opt/rh/devtoolset-8/enable && source /opt/rh/rh-python36/enable && export PATH=/usr/lib64/ccache:\$PATH"

# Bring in helpers that provides execute function so we can get better logging in BK and TRAV
COPY ./docker/.helpers-v33 /tmp/.helpers

CMD bash -c "$PRE_COMMANDS ccache -s && \
mkdir /workdir/build && cd /workdir/build && cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && make -j $(getconf _NPROCESSORS_ONLN) && \
ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test"
CMD bash -c ". /tmp/.helpers && $PRE_COMMANDS && \
fold-execute ccache -s && \
mkdir /workdir/build && cd /workdir/build && fold-execute cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && \
fold-execute make -j $(getconf _NPROCESSORS_ONLN) && \
if ${ENABLE_PARALLEL_TESTS:-true}; then fold-execute ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test; fi && \
if ${ENABLE_SERIAL_TESTS:-true}; then mkdir -p ./mongodb && fold-execute mongod --dbpath ./mongodb --fork --logpath mongod.log && fold-execute ctest -L nonparallelizable_tests --output-on-failure -T Test; fi && \
if ${ENABLE_LR_TESTS:-false}; then fold-execute ctest -L long_running_tests --output-on-failure -T Test; fi && \
if ! ${TRAVIS:-false}; then cd .. && tar -pczf build.tar.gz build && buildkite-agent artifact upload build.tar.gz --agent-access-token $BUILDKITE_AGENT_ACCESS_TOKEN; fi"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update && apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git automake \
libbz2-dev libssl-dev doxygen graphviz libgmp3-dev autotools-dev libicu-dev \
python2.7 python2.7-dev python3 python3-dev autoconf libtool curl zlib1g-dev \
sudo ruby libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config
sudo ruby libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config apt-transport-https

# Build appropriate version of CMake.
RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz \
Expand All @@ -20,10 +20,9 @@ RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz \
# Build appropriate version of Clang.
RUN mkdir -p /root/tmp && cd /root/tmp && git clone --single-branch --branch release_80 https://git.llvm.org/git/llvm.git clang8 && cd clang8 && git checkout 18e41dc && cd tools && git clone --single-branch --branch release_80 https://git.llvm.org/git/lld.git && cd lld && git checkout d60a035 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/polly.git && cd polly && git checkout 1bc06e5 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/clang.git clang && cd clang && git checkout a03da8b && cd tools && mkdir extra && cd extra && git clone --single-branch --branch release_80 https://git.llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && git checkout 6b34834 && cd .. && cd ../../../../projects && git clone --single-branch --branch release_80 https://git.llvm.org/git/libcxx.git && cd libcxx && git checkout 1853712 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/libcxxabi.git && cd libcxxabi && git checkout d7338a4 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/libunwind.git && cd libunwind && git checkout 57f6739 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/compiler-rt.git && cd compiler-rt && git checkout 5bc7979 && cd ../ && cd /root/tmp/clang8 && mkdir build && cd build && cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. && make -j$(nproc) && make install \
&& cd / && rm -rf /root/tmp/clang8
COPY ./docker/pinned_toolchain.cmake /tmp/pinned_toolchain.cmake

COPY ./pinned_toolchain.cmake /tmp/pinned_toolchain.cmake

# # Build appropriate version of LLVM.
# Build appropriate version of LLVM.
RUN git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git llvm \
&& cd llvm \
&& mkdir build \
Expand Down Expand Up @@ -83,11 +82,23 @@ RUN curl -LO https://github.com/ccache/ccache/releases/download/v3.4.1/ccache-3.
&& make install \
&& cd / && rm -rf ccache-3.4.1/

RUN echo "deb https://apt.buildkite.com/buildkite-agent stable main" > /etc/apt/sources.list.d/buildkite-agent.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 \
&& apt-get update && apt-get install -y buildkite-agent

# PRE_COMMANDS: Executed pre-cmake
# CMAKE_EXTRAS: Executed right before the cmake path (on the end)
ENV PRE_COMMANDS="export PATH=/usr/lib/ccache:$PATH &&"
ENV PRE_COMMANDS="export PATH=/usr/lib/ccache:\$PATH"
ENV CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_TOOLCHAIN_FILE='/tmp/pinned_toolchain.cmake' -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"

CMD bash -c "$PRE_COMMANDS ccache -s && \
mkdir /workdir/build && cd /workdir/build && cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && make -j $(getconf _NPROCESSORS_ONLN) && \
ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test"
# Bring in helpers that provides execute function so we can get better logging in BK and TRAV
COPY ./docker/.helpers-v33 /tmp/.helpers

CMD bash -c ". /tmp/.helpers && $PRE_COMMANDS && \
fold-execute ccache -s && \
mkdir /workdir/build && cd /workdir/build && fold-execute cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && \
fold-execute make -j $(getconf _NPROCESSORS_ONLN) && \
if ${ENABLE_PARALLEL_TESTS:-true}; then fold-execute ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test; fi && \
if ${ENABLE_SERIAL_TESTS:-true}; then mkdir -p ./mongodb && fold-execute mongod --dbpath ./mongodb --fork --logpath mongod.log && fold-execute ctest -L nonparallelizable_tests --output-on-failure -T Test; fi && \
if ${ENABLE_LR_TESTS:-false}; then fold-execute ctest -L long_running_tests --output-on-failure -T Test; fi && \
if ! ${TRAVIS:-false}; then cd .. && tar -pczf build.tar.gz build && buildkite-agent artifact upload build.tar.gz --agent-access-token $BUILDKITE_AGENT_ACCESS_TOKEN; fi"
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,23 @@ RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o

ENV PATH=${PATH}:/mongodb-linux-x86_64-ubuntu1804-4.1.1/bin

RUN echo "deb https://apt.buildkite.com/buildkite-agent stable main" > /etc/apt/sources.list.d/buildkite-agent.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 \
&& apt-get update && apt-get install -y apt-transport-https && apt-get install -y buildkite-agent

# PRE_COMMANDS: Executed pre-cmake
# CMAKE_EXTRAS: Executed right before the cmake path (on the end)
ENV PRE_COMMANDS="export PATH=/usr/lib/ccache:$PATH &&"
ENV PRE_COMMANDS="export PATH=/usr/lib/ccache:\$PATH"
ENV CMAKE_EXTRAS="-DCMAKE_CXX_COMPILER='clang++' -DCMAKE_C_COMPILER='clang'"

CMD bash -c "$PRE_COMMANDS ccache -s && \
mkdir /workdir/build && cd /workdir/build && cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && make -j $(getconf _NPROCESSORS_ONLN) && \
ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test"
# Bring in helpers that provides execute function so we can get better logging in BK and TRAV
COPY ./docker/.helpers-v33 /tmp/.helpers

CMD bash -c ". /tmp/.helpers && $PRE_COMMANDS && \
fold-execute ccache -s && \
mkdir /workdir/build && cd /workdir/build && fold-execute cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && \
fold-execute make -j $(getconf _NPROCESSORS_ONLN) && \
if ${ENABLE_PARALLEL_TESTS:-true}; then fold-execute ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test; fi && \
if ${ENABLE_SERIAL_TESTS:-true}; then mkdir -p ./mongodb && fold-execute mongod --dbpath ./mongodb --fork --logpath mongod.log && fold-execute ctest -L nonparallelizable_tests --output-on-failure -T Test; fi && \
if ${ENABLE_LR_TESTS:-false}; then fold-execute ctest -L long_running_tests --output-on-failure -T Test; fi && \
if ! ${TRAVIS:-false}; then cd .. && tar -pczf build.tar.gz build && buildkite-agent artifact upload build.tar.gz --agent-access-token $BUILDKITE_AGENT_ACCESS_TOKEN; fi"
5 changes: 3 additions & 2 deletions .cicd/generate-base-images.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail
cd $( dirname "${BASH_SOURCE[0]}" )/.. # Ensure we're in the repo root and not inside of scripts
. ./.cicd/.helpers
cd $( dirname "${BASH_SOURCE[0]}" ) # Ensure we're in the .cicd dir
. ./.helpers
( [[ -z $IMAGE_TAG ]] && [[ -z $1 ]] ) && echo "You must provide the distro IMAGE_TAG name (example: ubuntu-18.04) as argument \$1 or set it within your ENV" && exit 1
echo "Looking for $FULL_TAG"
docker_tag_exists $FULL_TAG && echo "$FULL_TAG already exists" || generate_docker_image
Loading

0 comments on commit 6c09577

Please sign in to comment.