Skip to content

Commit

Permalink
[KEW-1617] Upgrade to v1.8.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestopskins committed Sep 26, 2019
2 parents 44decdd + 7c0b0d3 commit ef06a6f
Show file tree
Hide file tree
Showing 20 changed files with 652 additions and 381 deletions.
42 changes: 26 additions & 16 deletions .cicd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,57 @@
set -eo pipefail
. ./.cicd/helpers/general.sh
mkdir -p $BUILD_DIR
CMAKE_EXTRAS="-DBUILD_MONGO_DB_PLUGIN=true -DCMAKE_BUILD_TYPE='Release'"
if [[ $(uname) == 'Darwin' ]]; then
CMAKE_EXTRAS="-DCMAKE_BUILD_TYPE='Release'"
if [[ "$(uname)" == 'Darwin' ]]; then
# You can't use chained commands in execute
[[ $TRAVIS == true ]] && export PINNED=false && ccache -s && CMAKE_EXTRAS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" && ./$CICD_DIR/platforms/macos-10.14.sh
( [[ ! $PINNED == false || $UNPINNED == true ]] ) && CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_TOOLCHAIN_FILE=$HELPERS_DIR/clang.make"
if [[ "$TRAVIS" == 'true' ]]; then
export PINNED=false
ccache -s
CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
./$CICD_DIR/platforms/macos-10.14.sh
else
CMAKE_EXTRAS="$CMAKE_EXTRAS -DBUILD_MONGO_DB_PLUGIN=true"
fi
[[ ! "$PINNED" == 'false' || "$UNPINNED" == 'true' ]] && CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_TOOLCHAIN_FILE=$HELPERS_DIR/clang.make"
cd $BUILD_DIR
echo "cmake $CMAKE_EXTRAS .."
cmake $CMAKE_EXTRAS ..
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"}
. $HELPERS_DIR/file-hash.sh $CICD_DIR/platforms/$IMAGE_TAG.dockerfile
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' ]]; then
[[ ! "$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' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib64/ccache:\\\$PATH"
elif [[ $IMAGE_TAG == 'centos-7.6' ]]; then
elif [[ "$IMAGE_TAG" == 'centos-7.6' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib64/ccache:\\\$PATH"
elif [[ $IMAGE_TAG == 'ubuntu-16.04' ]]; then
elif [[ "$IMAGE_TAG" == 'ubuntu-16.04' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib/ccache:\\\$PATH"
elif [[ $IMAGE_TAG == 'ubuntu-18.04' ]]; then
elif [[ "$IMAGE_TAG" == 'ubuntu-18.04' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib/ccache:\\\$PATH"
elif [[ $IMAGE_TAG == 'amazon_linux-2-unpinned' ]]; then
elif [[ "$IMAGE_TAG" == 'amazon_linux-2-unpinned' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib64/ccache:\\\$PATH"
CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_C_COMPILER='clang'"
elif [[ $IMAGE_TAG == 'centos-7.6-unpinned' ]]; then
elif [[ "$IMAGE_TAG" == 'centos-7.6-unpinned' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && source /opt/rh/devtoolset-8/enable && source /opt/rh/rh-python36/enable && export PATH=/usr/lib64/ccache:\\\$PATH"
elif [[ $IMAGE_TAG == 'ubuntu-18.04-unpinned' ]]; then
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++' -DCMAKE_C_COMPILER='clang'"
fi
BUILD_COMMANDS="cmake $CMAKE_EXTRAS .. && make -j$JOBS"
# Docker Commands
if [[ $BUILDKITE == true ]]; then
if [[ "$BUILDKITE" == 'true' ]]; then
# Generate Base Images
$CICD_DIR/generate-base-images.sh
[[ $ENABLE_INSTALL == true ]] && COMMANDS="cp -r $MOUNTED_DIR /root/eosio && cd /root/eosio/build &&"
[[ "$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
[[ "$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"
fi
Expand Down
272 changes: 182 additions & 90 deletions .cicd/generate-pipeline.sh

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .cicd/platforms/amazon_linux-2-unpinned.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN yum update -y && \
yum install -y which git sudo procps-ng util-linux autoconf automake \
libtool make bzip2 bzip2-devel openssl-devel gmp-devel libstdc++ libcurl-devel \
libusbx-devel python3 python3-devel python-devel libedit-devel doxygen \
graphviz clang patch
graphviz clang 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
2 changes: 1 addition & 1 deletion .cicd/platforms/amazon_linux-2.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN yum update -y && \
yum install -y which git sudo procps-ng util-linux autoconf automake \
libtool make bzip2 bzip2-devel openssl-devel gmp-devel libstdc++ libcurl-devel \
libusbx-devel python3 python3-devel python-devel libedit-devel doxygen \
graphviz patch gcc gcc-c++
graphviz patch gcc gcc-c++ 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
3 changes: 2 additions & 1 deletion .cicd/platforms/centos-7.6-unpinned.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ FROM centos:7.6.1810
ENV VERSION 1
# install dependencies.
RUN yum update -y && \
yum install -y epel-release && \
yum --enablerepo=extras install -y centos-release-scl && \
yum --enablerepo=extras install -y devtoolset-8 && \
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 vim-common jq
# build cmake.
RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
source /opt/rh/devtoolset-8/enable && \
Expand Down
3 changes: 2 additions & 1 deletion .cicd/platforms/centos-7.6.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ FROM centos:7.6.1810
ENV VERSION 1
# install dependencies.
RUN yum update -y && \
yum install -y epel-release && \
yum --enablerepo=extras install -y centos-release-scl && \
yum --enablerepo=extras install -y devtoolset-8 && \
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 vim-common jq
# build cmake.
RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
source /opt/rh/devtoolset-8/enable && \
Expand Down
2 changes: 1 addition & 1 deletion .cicd/platforms/macos-10.14.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@4 pkgconfig doxygen openssl || true
brew install git cmake python@2 python libtool libusb graphviz automake wget gmp llvm@4 pkgconfig doxygen openssl jq || :
if [[ ! $PINNED == false || $UNPINNED == true ]]; then
# install clang from source
git clone --single-branch --branch release_80 https://git.llvm.org/git/llvm.git clang8
Expand Down
5 changes: 3 additions & 2 deletions .cicd/platforms/ubuntu-16.04.dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM ubuntu:16.04
ENV VERSION 1
# install dependencies.
RUN apt-get update && apt-get upgrade -y && \
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 apt-transport-https
sudo ruby libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config apt-transport-https 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
5 changes: 3 additions & 2 deletions .cicd/platforms/ubuntu-18.04-unpinned.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM ubuntu:18.04
ENV VERSION 1
# install dependencies.
RUN apt-get update && apt-get upgrade -y && \
RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y git make \
bzip2 automake libbz2-dev libssl-dev doxygen graphviz libgmp3-dev \
autotools-dev libicu-dev python2.7 python2.7-dev python3 python3-dev \
autoconf libtool g++ gcc curl zlib1g-dev sudo ruby libusb-1.0-0-dev \
libcurl4-gnutls-dev pkg-config patch llvm-4.0 clang ccache
libcurl4-gnutls-dev pkg-config patch llvm-4.0 clang ccache 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
5 changes: 3 additions & 2 deletions .cicd/platforms/ubuntu-18.04.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM ubuntu:18.04
ENV VERSION 1
# install dependencies.
RUN apt-get update && apt-get upgrade -y && \
RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y git make \
bzip2 automake libbz2-dev libssl-dev doxygen graphviz libgmp3-dev \
autotools-dev libicu-dev python2.7 python2.7-dev python3 python3-dev \
autoconf libtool g++ gcc curl zlib1g-dev sudo ruby libusb-1.0-0-dev \
libcurl4-gnutls-dev pkg-config patch ccache
libcurl4-gnutls-dev pkg-config patch ccache 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
25 changes: 21 additions & 4 deletions .cicd/submodule-regression-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ 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:-$TRAVIS_BRANCH} # We default to TRAVIS_BRANCH if it's not a PR so it passes on non PR runs
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
BASE_BRANCH=${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-$BUILDKITE_BRANCH}
[[ -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
fi

echo "getting submodule info for $CURRENT_BRANCH"
while read -r a b; do
PR_MAP[$a]=$b
Expand All @@ -20,15 +24,28 @@ git submodule update --init &> /dev/null
while read -r a b; do
BASE_MAP[$a]=$b
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: &> /dev/null
echo "switching back to $TRAVIS_COMMIT"
echo 'git checkout -qf FETCH_HEAD'
git checkout -qf FETCH_HEAD &> /dev/null
elif [[ $BUILDKITE == true ]]; then
echo "switching back to $CURRENT_BRANCH"
git checkout -f $CURRENT_BRANCH &> /dev/null
fi

for k in "${!BASE_MAP[@]}"; do
base_ts=${BASE_MAP[$k]}
pr_ts=${PR_MAP[$k]}
echo "submodule $k"
echo " timestamp on $CURRENT_BRANCH: $pr_ts"
echo " timestamp on $BASE_BRANCH: $base_ts"
if (( $pr_ts < $base_ts)); then
echo "$k is older on $CURRENT_BRANCH than $BASE_BRANCH; investigating..."
if for c in `git log $CURRENT_BRANCH ^$BASE_BRANCH --pretty=format:"%H"`; do git show --pretty="" --name-only $c; done | grep -q "^$k$"; then
echo "$k is older on $CURRENT_BRANCH than $BASE_BRANCH; investigating the difference between $CURRENT_BRANCH and $BASE_BRANCH to look for $k changing..."
if [[ ! -z $(for c in $(git --no-pager log $CURRENT_BRANCH ^$BASE_BRANCH --pretty=format:"%H"); do git show --pretty="" --name-only $c; done | grep "^$k$") ]]; then
echo "ERROR: $k has regressed"
exit 1
else
Expand Down
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,24 @@ matrix:
homebrew:
update: true
packages:
- graphviz
- ccache
- jq
- boost
- python@2
- python
- libtool
- libusb
- graphviz
- automake
- wget
- gmp
- llvm@4
- pkgconfig
- python
- python@2
- doxygen
- libusb
- openssl
- boost@1.70
- ccache
env:
- PATH="/usr/local/opt/ccache/libexec:$PATH"
script: "ccache --max-size=1G && ./.cicd/build.sh && ./.cicd/test.sh scripts/parallel-test.sh && ./.cicd/test.sh scripts/serial-test.sh"
script: "ccache --max-size=1G && ./.cicd/build.sh && ./.cicd/test.sh scripts/parallel-test.sh && ./.cicd/test.sh scripts/serial-test.sh && if [[ $(uname) != 'Darwin' ]]; then ./.cicd/submodule-regression-check.sh; fi"
notifications:
webhooks:
secure: gmqODqoFAil2cR7v++ibqRNECBOSD/VJX+2qPa7XptkVWmVMzbII5CNgBQAscjFsp9arHPMXCCzkBi847PCSiHdsnYFQ4T273FLRWr3cDbLjfmR+BJ7dGKvQnlpSi2Ze2TtAPJyRl+iv+cxDj7cWE5zw2c4xbgh1a/cNO+/ayUfFkyMEIfVWRsHkdkra4gOLywou0XRLHr4CX1V60uU7uuqATnIMMi7gQYwiKKtZqjkbf8wcBvZirDhjQ6lDPN5tnZo6L4QHmqjtzNJg/UrD4h+zES53dLVI4uxlXRAwwpw+mJOFA3QE/3FT+bMQjLCffUz4gZaWcdgebPYzrwSWUbJoFdWAOwcTqivQY0FIQzcz/r6uGWcwWTavzkPEbg68BVM2BZId/0110J6feeTkpJ3MPV+UsIoGTvbg50vi/I06icftuZ/cLqDj3+Emifm7Jlr1sRTSdqtYAJj/2ImUfsb46cwgjAVhFOTvc+KuPgJQgvOXV7bZkxEr5qDWo8Al2sV8BWb83j1rMlZ4LfERokImDVqxu2kkcunchzvhtYFTesSpmwegVpwceCtOtO0rEUgATnfTEHzk2rm8nuz4UtidsQnluUKqmKD0QCqHXFfn+3ZRJsDqr+iCYdxv1BAeAVc9q1L7bgrKDMGiJgkxuhZ2v3J2SflWLvjZjFDduuc=
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ IMPROVEMENTS:

BUG FIXES:

## wax-1.8.4-1.0.0

BREAKING CHANGES:
- [KEW-1564] Bump to v1.8.4.

FEATURES:

IMPROVEMENTS:

BUG FIXES:

## wax-1.8.3-1.0.0

BREAKING CHANGES:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set( CXX_STANDARD_REQUIRED ON)

set(VERSION_MAJOR 1)
set(VERSION_MINOR 8)
set(VERSION_PATCH 3)
set(VERSION_PATCH 4)
#set(VERSION_SUFFIX develop)

if(VERSION_SUFFIX)
Expand Down
5 changes: 3 additions & 2 deletions libraries/chain/include/eosio/chain/wasm_eosio_injection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,9 @@ namespace eosio { namespace chain { namespace wasm_injections {


struct post_op_injectors : wasm_ops::op_types<pass_injector> {
using loop_t = wasm_ops::loop <checktime_injection>;
using call_t = wasm_ops::call <fix_call_index>;
using loop_t = wasm_ops::loop <checktime_injection>;
using call_t = wasm_ops::call <fix_call_index>;
using grow_memory_t = wasm_ops::grow_memory <checktime_injection>;
};

template <typename ... Visitors>
Expand Down
Loading

0 comments on commit ef06a6f

Please sign in to comment.