This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1105 from EOSIO/merge-release-1.8.x-to-master
Merge release/1.8.x to master for v1.8.0
- Loading branch information
Showing
300 changed files
with
16,358 additions
and
5,790 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
echo '--- :evergreen_tree: Configuring Environment' | ||
set -euo pipefail | ||
|
||
buildkite-agent artifact download '*.deb' --step ':ubuntu: Ubuntu 18.04 - Package Builder' . | ||
echo ":done: download successful" | ||
|
||
SANITIZED_BRANCH=$(echo "$BUILDKITE_BRANCH" | sed 's.^/..' | sed 's/[:/]/_/g') | ||
SANITIZED_TAG=$(echo "$BUILDKITE_TAG" | sed 's.^/..' | tr '/' '_') | ||
echo "$SANITIZED_BRANCH" | ||
echo "$SANITIZED_TAG" | ||
|
||
# do docker build | ||
echo '+++ :docker: Building Container' | ||
echo ":docker::build: Building image..." | ||
DOCKERHUB_REGISTRY="docker.io/eosio/eosio.cdt" | ||
|
||
BUILD_TAG=${BUILDKITE_BUILD_NUMBER:-latest} | ||
DOCKER_BUILD_GEN="docker build -t eosio_cdt_image:$BUILD_TAG -f ./docker/dockerfile ." | ||
echo "$ $DOCKER_BUILD_GEN" | ||
eval $DOCKER_BUILD_GEN | ||
|
||
#tag and push on each destination AWS & DOCKERHUB | ||
echo '+++ :arrow_up: Pushing Container' | ||
EOSIO_REGS=("$EOSIO_CDT_REGISTRY" "$DOCKERHUB_REGISTRY") | ||
for REG in ${EOSIO_REGS[@]}; do | ||
DOCKER_TAG_COMMIT="docker tag eosio_cdt_image:$BUILD_TAG $REG:$BUILDKITE_COMMIT" | ||
DOCKER_TAG_BRANCH="docker tag eosio_cdt_image:$BUILD_TAG $REG:$SANITIZED_BRANCH" | ||
echo -e "$ Tagging Images: \n$DOCKER_TAG_COMMIT \n$DOCKER_TAG_BRANCH" | ||
eval $DOCKER_TAG_COMMIT | ||
eval $DOCKER_TAG_BRANCH | ||
DOCKER_PUSH_COMMIT="docker push $REG:$BUILDKITE_COMMIT" | ||
DOCKER_PUSH_BRANCH="docker push $REG:$SANITIZED_BRANCH" | ||
echo -e "$ Pushing Images: \n$DOCKER_PUSH_COMMIT \n$DOCKER_PUSH_BRANCH" | ||
eval $DOCKER_PUSH_COMMIT | ||
eval $DOCKER_PUSH_BRANCH | ||
CLEAN_IMAGE_COMMIT="docker rmi $REG:$BUILDKITE_COMMIT" | ||
CLEAN_IMAGE_BRANCH="docker rmi $REG:$SANITIZED_BRANCH" | ||
echo -e "Cleaning Up: \n$CLEAN_IMAGE_COMMIT \n$CLEAN_IMAGE_BRANCH$" | ||
eval $CLEAN_IMAGE_COMMIT | ||
eval $CLEAN_IMAGE_BRANCH | ||
if [[ ! -z "$SANITIZED_TAG" ]]; then | ||
DOCKER_TAG="docker tag eosio_cdt_image $REG:$SANITIZED_TAG" | ||
DOCKER_REM="docker rmi $REG:$SANITIZED_TAG" | ||
echo -e "$ \n Tagging Image: \n$DOCKER_TAG \n Cleaning Up: \n$DOCKER_REM" | ||
eval $DOCKER_TAG | ||
eval $DOCKER_REM | ||
fi | ||
done | ||
|
||
DOCKER_GEN="docker rmi eosio_cdt_image:$BUILD_TAG" | ||
echo "Clean up base image" | ||
eval $DOCKER_GEN |
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
25 changes: 19 additions & 6 deletions
25
.cicd/docker/centos-7.6.dockerfile → .cicd/docker/centos-7.7.dockerfile
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 |
---|---|---|
@@ -1,28 +1,41 @@ | ||
FROM centos:7.6.1810 | ||
FROM centos:7.7.1908 | ||
# install dependencies | ||
RUN yum update -y && \ | ||
yum --enablerepo=extras install -y centos-release-scl && \ | ||
yum install -y devtoolset-7 && \ | ||
yum install -y python33.x86_64 git autoconf automake bzip2 \ | ||
yum install -y git autoconf automake bzip2 \ | ||
libtool ocaml.x86_64 doxygen graphviz-devel.x86_64 \ | ||
libicu-devel.x86_64 bzip2.x86_64 bzip2-devel.x86_64 openssl-devel.x86_64 \ | ||
gmp-devel.x86_64 python-devel.x86_64 gettext-devel.x86_64 gcc-c++.x86_64 perl | ||
gmp-devel.x86_64 gettext-devel.x86_64 gcc-c++.x86_64 perl \ | ||
libffi-devel.x86_64 | ||
|
||
# build Python 3.7.4 | ||
RUN curl -LO https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz && \ | ||
source /opt/rh/devtoolset-7/enable && \ | ||
tar xzf Python-3.7.4.tgz && \ | ||
cd Python-3.7.4 && \ | ||
./configure --enable-optimizations && \ | ||
make -j$(nproc) altinstall && \ | ||
cd .. && \ | ||
rm -rf Python-3.7.4 && rm -rf Python-3.7.4.tgz | ||
|
||
# build lcov | ||
RUN git clone https://github.com/linux-test-project/lcov.git && \ | ||
source /opt/rh/python33/enable && \ | ||
source /opt/rh/devtoolset-7/enable && \ | ||
cd lcov && \ | ||
make install && \ | ||
cd / && \ | ||
rm -rf lcov/ | ||
|
||
# build cmake | ||
RUN curl -LO https://cmake.org/files/v3.10/cmake-3.10.2.tar.gz && \ | ||
source /opt/rh/python33/enable && \ | ||
source /opt/rh/devtoolset-7/enable && \ | ||
tar -xzf cmake-3.10.2.tar.gz && \ | ||
cd cmake-3.10.2 && \ | ||
./bootstrap --prefix=/usr/local && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd .. && \ | ||
rm -f cmake-3.10.2.tar.gz | ||
rm -f cmake-3.10.2.tar.gz | ||
|
||
RUN ln -sfn /usr/local/bin/python3.7 /usr/local/bin/python3 |
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,9 @@ | ||
FROM centos:8 | ||
# install dependencies | ||
RUN yum update -y && \ | ||
yum install -y gdisk && \ | ||
yum install -y cmake && \ | ||
yum install -y git autoconf automake bzip2 \ | ||
libtool make \ | ||
libicu-devel.x86_64 bzip2.x86_64 bzip2-devel.x86_64 openssl-devel.x86_64 \ | ||
gmp-devel.x86_64 python38 python3-devel gettext-devel.x86_64 gcc-c++.x86_64 perl |
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 |
---|---|---|
@@ -1,7 +1,20 @@ | ||
FROM ubuntu:18.04 | ||
# install dependencies | ||
|
||
RUN apt-get update && apt-get upgrade -y && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y git clang-4.0 \ | ||
lldb-4.0 libclang-4.0-dev cmake make automake libbz2-dev libssl-dev \ | ||
libgmp3-dev autotools-dev build-essential libicu-dev python2.7-dev \ | ||
python3-dev autoconf libtool curl zlib1g-dev doxygen graphviz | ||
libgmp3-dev autotools-dev build-essential libicu-dev python2.7-dev \ | ||
autoconf libtool curl zlib1g-dev doxygen graphviz \ | ||
libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev | ||
|
||
# install Python 3.7.4 | ||
RUN curl -LO https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz && \ | ||
tar xzf Python-3.7.4.tgz && \ | ||
cd Python-3.7.4 && \ | ||
./configure --enable-optimizations && \ | ||
make -j$(nproc) altinstall && \ | ||
cd .. && \ | ||
rm -rf Python-3.7.4 && rm -rf Python-3.7.4.tar.gz | ||
|
||
RUN ln -sfn /usr/local/bin/python3.7 /usr/local/bin/python3 |
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,11 @@ | ||
FROM ubuntu:20.04 | ||
# install dependencies | ||
|
||
RUN apt-get update && apt-get upgrade -y && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y git clang-8 \ | ||
lldb-8 libclang-8-dev cmake make automake libbz2-dev libssl-dev \ | ||
libgmp3-dev autotools-dev build-essential libicu-dev python2.7-dev python3 \ | ||
autoconf libtool curl zlib1g-dev doxygen graphviz \ | ||
libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev | ||
|
||
RUN ln -sfn /usr/bin/python3 /usr/local/bin/python3 |
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,46 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
. ./.cicd/helpers/general.sh | ||
|
||
mkdir -p $BUILD_DIR | ||
|
||
PRE_COMMANDS="cd $MOUNTED_DIR/build" | ||
TEST="ctest -j$JOBS -L integration_tests -V -T Test" | ||
COMMANDS="$PRE_COMMANDS && $TEST" | ||
|
||
ARGS=${ARGS:-"--rm --init -v $(pwd):$MOUNTED_DIR"} | ||
|
||
# . $HELPERS_DIR/docker-hash.sh | ||
|
||
# Load BUILDKITE Environment Variables for use in docker run | ||
if [[ -f $BUILDKITE_ENV_FILE ]]; then | ||
evars="" | ||
while read -r var; do | ||
evars="$evars --env ${var%%=*}" | ||
done < "$BUILDKITE_ENV_FILE" | ||
fi | ||
|
||
if [[ "$BUILDKITE" == 'true' && "$IMAGE_TAG" == 'ubuntu-18.04' ]]; then | ||
FULL_TAG='eosio/ci-contracts-builder:base-ubuntu-18.04-develop' | ||
fi | ||
|
||
set +e | ||
eval docker run $ARGS $evars $FULL_TAG bash -c \"$COMMANDS\" | ||
EXIT_STATUS=$? | ||
|
||
# buildkite | ||
if [[ "$BUILDKITE" == 'true' ]]; then | ||
cd build | ||
# upload artifacts | ||
echo '+++ :arrow_up: Uploading Artifacts' | ||
echo 'Exporting xUnit XML' | ||
mv -f ./Testing/$(ls ./Testing/ | grep '2' | tail -n 1)/Test.xml test-results.xml | ||
echo 'Uploading artifacts' | ||
buildkite-agent artifact upload test-results.xml | ||
echo 'Done uploading artifacts.' | ||
fi | ||
# re-throw | ||
if [[ "$EXIT_STATUS" != 0 ]]; then | ||
echo "Failing due to non-zero exit status from ctest: $EXIT_STATUS" | ||
exit $EXIT_STATUS | ||
fi |
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
Oops, something went wrong.