Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #8645 from EOSIO/merge-release-2.0.3-to-master
Browse files Browse the repository at this point in the history
Merge release 2.0.3 to master
  • Loading branch information
heifner authored Feb 13, 2020
2 parents aa60b9c + 1925b98 commit 94354d2
Show file tree
Hide file tree
Showing 41 changed files with 596 additions and 232 deletions.
32 changes: 8 additions & 24 deletions .cicd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
set -eo pipefail
. ./.cicd/helpers/general.sh
mkdir -p $BUILD_DIR
CMAKE_EXTRAS="-DCMAKE_BUILD_TYPE='Release' -DENABLE_MULTIVERSION_PROTOCOL_TEST=true"
CMAKE_EXTRAS="-DCMAKE_BUILD_TYPE='Release' -DENABLE_MULTIVERSION_PROTOCOL_TEST=true -DBUILD_MONGO_DB_PLUGIN=true"
if [[ "$(uname)" == 'Darwin' ]]; then
# You can't use chained commands in execute
if [[ "$TRAVIS" == 'true' ]]; then
if [[ "$GITHUB_ACTIONS" == 'true' ]]; then
export PINNED=false
brew reinstall [email protected] # Fixes issue where builds in Travis cannot find libcrypto.
ccache -s
CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
else
CMAKE_EXTRAS="$CMAKE_EXTRAS -DBUILD_MONGO_DB_PLUGIN=true"
fi
[[ ! "$PINNED" == 'false' ]] && CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_TOOLCHAIN_FILE=$HELPERS_DIR/clang.make"
cd $BUILD_DIR
Expand All @@ -20,28 +15,17 @@ if [[ "$(uname)" == 'Darwin' ]]; then
echo "make -j$JOBS"
make -j$JOBS
else # Linux
CMAKE_EXTRAS="$CMAKE_EXTRAS -DBUILD_MONGO_DB_PLUGIN=true"
ARGS=${ARGS:-"--rm --init -v $(pwd):$MOUNTED_DIR"}
PRE_COMMANDS="cd $MOUNTED_DIR/build"
# PRE_COMMANDS: Executed pre-cmake
# CMAKE_EXTRAS: Executed within and right before the cmake path (cmake CMAKE_EXTRAS ..)
[[ ! "$IMAGE_TAG" =~ 'unpinned' ]] && CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_TOOLCHAIN_FILE=$MOUNTED_DIR/.cicd/helpers/clang.make -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
if [[ "$IMAGE_TAG" == 'amazon_linux-2-pinned' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib64/ccache:\\\$PATH"
elif [[ "$IMAGE_TAG" == 'centos-7.7-pinned' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib64/ccache:\\\$PATH"
elif [[ "$IMAGE_TAG" == 'ubuntu-16.04-pinned' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib/ccache:\\\$PATH"
elif [[ "$IMAGE_TAG" == 'ubuntu-18.04-pinned' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib/ccache:\\\$PATH"
elif [[ "$IMAGE_TAG" == 'amazon_linux-2-unpinned' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib64/ccache:\\\$PATH"
[[ ! "$IMAGE_TAG" =~ 'unpinned' ]] && CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_TOOLCHAIN_FILE=$MOUNTED_DIR/.cicd/helpers/clang.make"
if [[ "$IMAGE_TAG" == 'amazon_linux-2-unpinned' ]]; then
CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_C_COMPILER='clang'"
elif [[ "$IMAGE_TAG" == 'centos-7.7-unpinned' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && source /opt/rh/devtoolset-8/enable && source /opt/rh/rh-python36/enable && export PATH=/usr/lib64/ccache:\\\$PATH"
PRE_COMMANDS="$PRE_COMMANDS && source /opt/rh/devtoolset-8/enable && source /opt/rh/rh-python36/enable"
CMAKE_EXTRAS="$CMAKE_EXTRAS -DLLVM_DIR='/opt/rh/llvm-toolset-7.0/root/usr/lib64/cmake/llvm'"
elif [[ "$IMAGE_TAG" == 'ubuntu-18.04-unpinned' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib/ccache:\\\$PATH"
CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_CXX_COMPILER='clang++-7' -DCMAKE_C_COMPILER='clang-7' -DLLVM_DIR='/usr/lib/llvm-7/lib/cmake/llvm'"
fi
BUILD_COMMANDS="cmake $CMAKE_EXTRAS .. && make -j$JOBS"
Expand All @@ -52,9 +36,9 @@ else # Linux
[[ "$ENABLE_INSTALL" == 'true' ]] && COMMANDS="cp -r $MOUNTED_DIR /root/eosio && cd /root/eosio/build &&"
COMMANDS="$COMMANDS $BUILD_COMMANDS"
[[ "$ENABLE_INSTALL" == 'true' ]] && COMMANDS="$COMMANDS && make install"
elif [[ "$TRAVIS" == 'true' ]]; then
ARGS="$ARGS -v /usr/lib/ccache -v $HOME/.ccache:/opt/.ccache -e JOBS -e TRAVIS -e CCACHE_DIR=/opt/.ccache"
COMMANDS="ccache -s && $BUILD_COMMANDS"
elif [[ "$GITHUB_ACTIONS" == 'true' ]]; then
ARGS="$ARGS -e JOBS"
COMMANDS="$BUILD_COMMANDS"
fi
. $HELPERS_DIR/file-hash.sh $CICD_DIR/platforms/$PLATFORM_TYPE/$IMAGE_TAG.dockerfile
COMMANDS="$PRE_COMMANDS && $COMMANDS"
Expand Down
2 changes: 2 additions & 0 deletions .cicd/generate-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == 'eosio' && -z "${SKIP_INSTALL}${SKIP_LINUX}$
- label: ":chains: Sync from Genesis Test"
trigger: "eosio-sync-from-genesis"
async: false
if: build.env("BUILDKITE_TAG") == null
build:
message: "Triggered by $BUILDKITE_PIPELINE_SLUG build $BUILDKITE_BUILD_NUMBER"
commit: "${BUILDKITE_COMMIT}"
Expand All @@ -503,6 +504,7 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == 'eosio' && -z "${SKIP_INSTALL}${SKIP_LINUX}$
- label: ":outbox_tray: Resume from State Test"
trigger: "eosio-resume-from-state"
async: false
if: build.env("BUILDKITE_TAG") == null
build:
message: "Triggered by $BUILDKITE_PIPELINE_SLUG build $BUILDKITE_BUILD_NUMBER"
commit: "${BUILDKITE_COMMIT}"
Expand Down
4 changes: 1 addition & 3 deletions .cicd/platforms/pinned/amazon_linux-2-pinned.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,4 @@ RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o
cd / && \
rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
# add mongodb to path
ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
# install ccache
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && yum install -y ccache
ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
7 changes: 1 addition & 6 deletions .cicd/platforms/pinned/centos-7.7-pinned.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,4 @@ RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o
cd / && \
rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
# add mongodb to path
ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
# install ccache
RUN yum install -y ccache
# fix ccache for centos
RUN cd /usr/lib64/ccache && ln -s ../../bin/ccache c++
ENV CCACHE_PATH="/opt/rh/devtoolset-8/root/usr/bin"
ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
2 changes: 1 addition & 1 deletion .cicd/platforms/pinned/macos-10.14-pinned.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail
VERSION=1
brew update
brew install git cmake python@2 python libtool libusb graphviz automake wget gmp llvm@7 pkgconfig doxygen [email protected] jq || :
brew install git cmake python libtool libusb graphviz automake wget gmp llvm@7 pkgconfig doxygen [email protected] jq || :
# install clang from source
git clone --single-branch --branch release_80 https://git.llvm.org/git/llvm.git clang8
cd clang8
Expand Down
11 changes: 1 addition & 10 deletions .cicd/platforms/pinned/ubuntu-16.04-pinned.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,4 @@ RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o
cd / && \
rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
# add mongodb to path
ENV PATH=${PATH}:/mongodb-linux-x86_64-ubuntu1604-3.6.3/bin
# install ccache
RUN curl -LO https://github.com/ccache/ccache/releases/download/v3.4.1/ccache-3.4.1.tar.gz && \
tar -xzf ccache-3.4.1.tar.gz && \
cd ccache-3.4.1 && \
./configure && \
make && \
make install && \
cd / && \
rm -rf ccache-3.4.1.tar.gz /ccache-3.4.1
ENV PATH=${PATH}:/mongodb-linux-x86_64-ubuntu1604-3.6.3/bin
2 changes: 1 addition & 1 deletion .cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update && \
autotools-dev libicu-dev python2.7 python2.7-dev python3 \
python3-dev python-configparser python-requests python-pip \
autoconf libtool g++ gcc curl zlib1g-dev sudo ruby libusb-1.0-0-dev \
libcurl4-gnutls-dev pkg-config patch ccache vim-common jq
libcurl4-gnutls-dev pkg-config patch vim-common jq
# build cmake.
RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
tar -xzf cmake-3.13.2.tar.gz && \
Expand Down
4 changes: 1 addition & 3 deletions .cicd/platforms/unpinned/amazon_linux-2-unpinned.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,4 @@ RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o
cd / && \
rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
# add mongodb to path
ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
# install ccache
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && yum install -y ccache
ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
7 changes: 1 addition & 6 deletions .cicd/platforms/unpinned/centos-7.7-unpinned.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,4 @@ RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o
cd / && \
rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
# add mongodb to path
ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
# install ccache
RUN yum install -y ccache
# fix ccache for centos
RUN cd /usr/lib64/ccache && ln -s ../../bin/ccache c++
ENV CCACHE_PATH="/opt/rh/devtoolset-8/root/usr/bin"
ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
2 changes: 1 addition & 1 deletion .cicd/platforms/unpinned/macos-10.14-unpinned.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail
VERSION=1
brew update
brew install git cmake python@2 python libtool libusb graphviz automake wget gmp llvm@7 pkgconfig doxygen [email protected] jq boost || :
brew install git cmake python libtool libusb graphviz automake wget gmp llvm@7 pkgconfig doxygen [email protected] jq boost || :
# install mongoDB
cd ~
curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.6.3.tgz
Expand Down
2 changes: 1 addition & 1 deletion .cicd/platforms/unpinned/ubuntu-18.04-unpinned.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt-get update && \
bzip2 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 patch llvm-7-dev clang-7 ccache vim-common jq
libcurl4-gnutls-dev pkg-config patch llvm-7-dev clang-7 vim-common jq
# build cmake.
RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
tar -xzf cmake-3.13.2.tar.gz && \
Expand Down
29 changes: 13 additions & 16 deletions .cicd/submodule-regression-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
set -eo pipefail
declare -A PR_MAP
declare -A BASE_MAP
# Support Travis and BK
if ${TRAVIS:-false}; then
[[ -z $TRAVIS_PULL_REQUEST_BRANCH ]] && echo "Unable to find TRAVIS_PULL_REQUEST_BRANCH ENV. Skipping submodule regression check." && exit 0
BASE_BRANCH=$TRAVIS_BRANCH
CURRENT_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
[[ ! -z $TRAVIS_PULL_REQUEST_SLUG ]] && CURRENT_BRANCH=$TRAVIS_COMMIT # When we're not running from a PR, the slug is not set. When we are, we need to use the TRAVIS_COMMIT to be sure we're supporting the Forked PR's merge/code that's in the EOS repo. This is needed for the git log below.
else

if [[ $BUILDKITE == true ]]; then
[[ -z $BUILDKITE_PULL_REQUEST_BASE_BRANCH ]] && echo "Unable to find BUILDKITE_PULL_REQUEST_BASE_BRANCH ENV. Skipping submodule regression check." && exit 0
BASE_BRANCH=$BUILDKITE_PULL_REQUEST_BASE_BRANCH
CURRENT_BRANCH=$BUILDKITE_BRANCH
else
[[ -z $GITHUB_BASE_REF ]] && echo "Cannot find \$GITHUB_BASE_REF, so we have nothing to compare submodules to. Skipping submodule regression check." && exit 0
BASE_BRANCH=$GITHUB_BASE_REF
CURRENT_BRANCH=$GITHUB_SHA
fi

echo "getting submodule info for $CURRENT_BRANCH"
Expand All @@ -27,17 +26,15 @@ while read -r a b; do
done < <(git submodule --quiet foreach --recursive 'echo $path `git log -1 --format=%ct`')

# We need to switch back to the PR ref/head so we can git log properly
if [[ $TRAVIS == true && ! -z $TRAVIS_PULL_REQUEST_SLUG ]]; then
echo "git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge:"
git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge: 1> /dev/null
echo "switching back to $TRAVIS_COMMIT"
echo 'git checkout -qf FETCH_HEAD'
git checkout -qf FETCH_HEAD 1> /dev/null
elif [[ $BUILDKITE == true ]]; then
echo "switching back to $CURRENT_BRANCH"
git checkout -f $CURRENT_BRANCH 1> /dev/null
if [[ $BUILDKITE != true ]]; then
echo "git fetch origin +$GITHUB_REF:"
git fetch origin +${GITHUB_REF}: 1> /dev/null
fi

echo "switching back to $CURRENT_BRANCH..."
echo "git checkout -qf $CURRENT_BRANCH"
git checkout -qf $CURRENT_BRANCH 1> /dev/null

for k in "${!BASE_MAP[@]}"; do
base_ts=${BASE_MAP[$k]}
pr_ts=${PR_MAP[$k]}
Expand Down
Loading

0 comments on commit 94354d2

Please sign in to comment.