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

[1.8.x] Travis CI + Buildkite 3.0 #7839

Merged
merged 575 commits into from
Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
575 commits
Select commit Hold shift + click to select a range
13af56d
quick fixes
Aug 15, 2019
c3842d9
quick fixes
Aug 15, 2019
d75e220
quick fixes
Aug 15, 2019
0ab6cbb
quick fixes
Aug 15, 2019
d3812a1
quick fixes
Aug 16, 2019
5ba4598
quick fixes
Aug 16, 2019
172861f
mac
Aug 16, 2019
1434b16
quick fixes
Aug 16, 2019
16569d0
quick fixes
Aug 16, 2019
94cc7af
Reset pipeline file. Debugging in other branch.
scottarnette Aug 16, 2019
2890645
quick fixes
Aug 16, 2019
bc06ce4
quick fixes
Aug 16, 2019
4f08d48
quick fixes
Aug 16, 2019
74cf8c6
quick fixes
Aug 16, 2019
61d8b4a
quick fixes
Aug 16, 2019
8151870
quick fixes
Aug 16, 2019
7089b02
quick fixes
Aug 16, 2019
5f6d82d
quick fixes
Aug 16, 2019
7c0ded4
quick fixes
Aug 16, 2019
3f20748
quick fixes
Aug 16, 2019
b123f2a
quick fixes
Aug 16, 2019
a0628cd
quick fixes
Aug 16, 2019
5debd60
split serial tests
Aug 16, 2019
b099626
merged in split code
Aug 16, 2019
d44f581
quick fix
Aug 16, 2019
593bcc1
Standardize dockerfiles.
scottarnette Aug 16, 2019
00c0cd4
removed useless bash
Aug 16, 2019
81a4a1a
test
Aug 16, 2019
096e7a3
unit tests
Aug 16, 2019
d0cd6f3
added it all back
Aug 16, 2019
b31bbad
Removed buildkite agent. Fixed centos.
scottarnette Aug 16, 2019
7b4055e
merged trav-poc
Aug 16, 2019
f68bdc6
Fixed spacing.
scottarnette Aug 16, 2019
1272cdb
Zane's changes
Aug 19, 2019
b0ea246
Merge pull request #7751 from EOSIO/trav-poc-standardization
NorseGaud Aug 19, 2019
25bd8d4
Changed typo from COMMAND to COMMANDS when ENABLE_INSTALL is set.
scottarnette Aug 19, 2019
692f031
Merge pull request #7775 from EOSIO/trav-poc-install-typo
scottarnette Aug 19, 2019
a47295b
removed
Aug 20, 2019
049be2b
Quick fix for wrong packages?
scottarnette Aug 20, 2019
56e2ccb
Fix package builder pipeline steps.
scottarnette Aug 20, 2019
a94562f
Debugging.
scottarnette Aug 20, 2019
dc6dab4
Debugging.
scottarnette Aug 21, 2019
7d2b6a7
Debugging.
scottarnette Aug 21, 2019
57a2746
Re-enable pipeline.
scottarnette Aug 21, 2019
2c844fb
Test full fix for package building.
scottarnette Aug 21, 2019
29cedd4
Debugging.
scottarnette Aug 21, 2019
87fe9ab
Fix Mac issue. Enable pipeline.
scottarnette Aug 21, 2019
2a1510e
Merge pull request #7780 from EOSIO/trav-poc-wrong-artifacts
scottarnette Aug 21, 2019
fa90a81
Merge pull request #7778 from EOSIO/docker-login-removal
NorseGaud Aug 22, 2019
45e5d98
Add missing ENVs for lambdas.
scottarnette Aug 23, 2019
2d0bf75
Merge pull request #7798 from EOSIO/trav-poc-lambda-fix
scottarnette Aug 23, 2019
645f648
started pinned dockerfiles
Aug 26, 2019
4fe006b
dedup of dockerfiles
Aug 26, 2019
d2b57de
package fixes for mac
Aug 26, 2019
27410c9
mongo failure
Aug 26, 2019
e6e5f55
Test a2 pinned build.
scottarnette Aug 26, 2019
11da631
Merge resolved.
scottarnette Aug 26, 2019
efcc637
Test a2 pinned build.
scottarnette Aug 26, 2019
a076d12
Updated more pinned dockerfiles.
scottarnette Aug 26, 2019
639dd88
Test pinned C7 and U18.
scottarnette Aug 26, 2019
db6157c
C7 needs devtoolset to create clang.
scottarnette Aug 26, 2019
5b28669
Default pipeline is pinned. Made unpinned the outlier dockerfiles.
scottarnette Aug 26, 2019
d61046f
Continue on unpinned dockerfiles.
scottarnette Aug 26, 2019
916d88d
Attempting full build due to dockerfile rename.
scottarnette Aug 26, 2019
1c74e6f
Keep gcc packages for deps, but still force pinned builds.
scottarnette Aug 26, 2019
8be947a
Keep gcc packages for deps, but still force pinned builds.
scottarnette Aug 26, 2019
5dea9cb
Adjust settings for unpinned builds.
scottarnette Aug 26, 2019
1785405
New logic for setting CMAKE_EXTRAS.
scottarnette Aug 27, 2019
98bbd26
Pinned C7 may need patch.
scottarnette Aug 27, 2019
9e899f6
Pinned C7 may need patch.
scottarnette Aug 27, 2019
4a52d1f
Pinned C7 may need patch.
scottarnette Aug 27, 2019
37d6901
Changes for pinned Mac builds. Disabled for now.
scottarnette Aug 27, 2019
3454320
Debugging c7 pinned.
scottarnette Aug 27, 2019
5696bd5
Debugging c7 pinned.
scottarnette Aug 27, 2019
bce4951
Debugging c7 pinned.
scottarnette Aug 27, 2019
430ea11
Debugging c7 pinned.
scottarnette Aug 27, 2019
5a1f42a
Debugging c7 pinned.
scottarnette Aug 27, 2019
ebce59f
Added flag for pinned Mac builds.
scottarnette Aug 27, 2019
952fb5e
Full pipeline test.
scottarnette Aug 27, 2019
7f61aab
Full pipeline test.
scottarnette Aug 27, 2019
9ebe30b
Full pipeline test.
scottarnette Aug 27, 2019
718c4a1
Created macos-10.14.sh script for creating Anka base images for pinne…
kj4ezj Aug 27, 2019
f545571
Split unpinned into different pipeline file.
scottarnette Aug 27, 2019
f358a04
Merge branch 'zach-clang-build' into trav-poc-pinned
scottarnette Aug 27, 2019
e64e7ac
Added script for pinned Mac builds.
scottarnette Aug 27, 2019
a28d2e3
Removed unpinned skip.
scottarnette Aug 27, 2019
9f06a8a
Improved dockerfile cleanup.
scottarnette Aug 27, 2019
d524f18
Fix brew.
scottarnette Aug 27, 2019
bb64b02
forgot the removal of docker login from installation-build
Aug 27, 2019
cbb69a2
Fix conditional cmake flags and PRE_COMMANDS.
scottarnette Aug 27, 2019
8edcc45
Fix Mac unit test label. Clang appears to be picky.
scottarnette Aug 27, 2019
75d9794
Fix Mac unit test label.
scottarnette Aug 27, 2019
a96fee5
Clang appears to be picky.
scottarnette Aug 27, 2019
fd897fa
Add missing libusb for Mac.
scottarnette Aug 28, 2019
b9b78e8
Debugging pinned Mac.
scottarnette Aug 28, 2019
2f9504e
Added ENVs to package builder required by lambdas.
scottarnette Aug 28, 2019
77e1a1b
Limit clang build on Mac.
scottarnette Aug 28, 2019
41a0c7f
Limit clang build on Mac.
scottarnette Aug 28, 2019
666b9d2
Limit clang build on Mac.
scottarnette Aug 28, 2019
bd1062a
Remove line continuations
kj4ezj Aug 28, 2019
fd854a7
MacOS should use correct packaging script.
scottarnette Aug 28, 2019
4dbc449
Docker login not required.
scottarnette Aug 28, 2019
0a277e6
Fix regression of packaging steps.
scottarnette Aug 28, 2019
c33de1e
Merge branch 'trav-poc-pinned' of ssh://github.com/EOSIO/eos into tra…
scottarnette Aug 28, 2019
319f115
quick fixes
Aug 28, 2019
bac919e
Fix regression of packaging steps.
scottarnette Aug 28, 2019
c30f1e8
quick fixes
Aug 28, 2019
846aa6f
quick fixes
Aug 28, 2019
ccb8742
quick fixes
Aug 28, 2019
bd0fe01
quick fixes
Aug 28, 2019
24009f9
quick fixes
Aug 28, 2019
a2d79f7
quick fixes
Aug 28, 2019
1e622d1
quick fixes
Aug 28, 2019
352b051
quick fixes
Aug 28, 2019
326a5f8
quick fixes
Aug 28, 2019
0bea98b
quick fixes
Aug 28, 2019
e7f87bd
quick fixes
Aug 28, 2019
763bfe1
quick fixes
Aug 28, 2019
7fcf676
quick fixes
Aug 28, 2019
4a99639
quick fixes
Aug 28, 2019
fb42bf9
quick fixes
Aug 28, 2019
1ff809a
quick fixes
Aug 28, 2019
8de2605
quick fixes
Aug 28, 2019
a772311
quick fixes
Aug 28, 2019
f158c32
quick fixes
Aug 28, 2019
37a711f
quick fixes
Aug 28, 2019
6e2e091
Remove duplicate patch file.
scottarnette Aug 28, 2019
d451356
quick fixes
Aug 28, 2019
00dcd75
quick fixes
Aug 28, 2019
0fd857f
quick fixes
Aug 28, 2019
21bb72f
quick fixes
Aug 28, 2019
773e66e
quick fixes
Aug 28, 2019
a30db8f
Merge pull request #7813 from EOSIO/trav-poc-pinned
scottarnette Aug 28, 2019
f073f00
quick fixes
Aug 28, 2019
a2e3935
quick fixes
Aug 28, 2019
fe80ac9
quick fixes
Aug 28, 2019
8591488
quick fixes
Aug 28, 2019
7f1d416
merged trav-poc
Aug 28, 2019
f775a62
quick fixes
Aug 29, 2019
3549f56
quick fixes
Aug 29, 2019
71ab0c4
quick fixes
Aug 29, 2019
a563da7
quick fixes
Aug 29, 2019
0ffa210
quick fixes
Aug 29, 2019
25f1be4
quick fixes
Aug 29, 2019
7ebb8cd
Added mongo install steps for Travis.
scottarnette Aug 29, 2019
ce90675
quick fixes
Aug 29, 2019
882dadd
quick fixes
Aug 29, 2019
80eddac
quick fixes
Aug 29, 2019
b368ecf
quick fixes
Aug 29, 2019
9450eff
quick fixes
Aug 29, 2019
e54d657
quick fixes
Aug 29, 2019
7abb121
quick fixes
Aug 29, 2019
fd8e889
quick fixes
Aug 29, 2019
85c5d38
Darwin on Travis needs UNPINNED=true.
scottarnette Aug 29, 2019
89abe58
Darwin on Travis needs UNPINNED=true.
scottarnette Aug 29, 2019
d16c21d
quick fixes
Aug 29, 2019
e1c8c30
Merge branch 'trav-poc-code-gen' of github.com:EOSIO/eos into trav-po…
Aug 29, 2019
b96a994
quick fixes
Aug 29, 2019
6b42412
quick fixes
Aug 29, 2019
4667e16
skip steps
Aug 29, 2019
c0868c3
removmongod
Aug 29, 2019
e291439
logic fix
Aug 29, 2019
2674501
logic fix
Aug 29, 2019
786b21e
quick fixes
Aug 29, 2019
55e5864
quick fixes
Aug 29, 2019
d051956
quick fixes
Aug 29, 2019
436d6b2
quick fixes
Aug 29, 2019
a4864ed
quick fixes
Aug 29, 2019
60a7a1a
quick fixes
Aug 29, 2019
46260b3
quick fixes
Aug 29, 2019
2ace3ff
quick fixes
Aug 29, 2019
59da192
quick fixes
Aug 29, 2019
6080e7d
quick fixes
Aug 29, 2019
0570d6e
quick fixes
Aug 29, 2019
a5a9a0f
Because 'brew install' fails when packages already exist...
scottarnette Aug 29, 2019
4de86ff
quick fixes
Aug 29, 2019
e01cfbb
Merge branch 'trav-poc-code-gen' of github.com:EOSIO/eos into trav-po…
Aug 29, 2019
18e5038
quick fixes
Aug 29, 2019
a61e027
Create long-running-test.sh
kj4ezj Aug 29, 2019
8ae985f
Create parallel-test.sh
kj4ezj Aug 29, 2019
8c7a11c
Create serial-test.sh
kj4ezj Aug 29, 2019
0191aa0
Testing missing mongod.
scottarnette Aug 29, 2019
e2502e9
quick fixes
Aug 29, 2019
c82e9f3
Add description to general.sh.capitalize()
kj4ezj Aug 29, 2019
6e00349
quick fixes
Aug 29, 2019
8c1c595
Created /.cicd/helpers/general.sh.buildkite-intrinsics()
kj4ezj Aug 29, 2019
933f53e
All scripts now use general.sh.buildkite-intrinsics() to load Buildki…
kj4ezj Aug 29, 2019
8e48a0f
Change return statement to echo statement
kj4ezj Aug 29, 2019
3837fbb
Remove unnecessary whitespace
kj4ezj Aug 29, 2019
45bdef2
Change "#!/usr/bin/env bash" to "#!/bin/bash"
kj4ezj Aug 29, 2019
fcaef56
Don't forget to use general.sh.buildkite-intrinsics() in long-running…
kj4ezj Aug 29, 2019
868de85
Renamed scripts to match repo naming scheme
kj4ezj Aug 29, 2019
59f84a4
Add CentOS-specific configuration to the test scripts
kj4ezj Aug 29, 2019
8c02f14
Remove dev-toolset-8 and ccache from CentOS-specific test setup
kj4ezj Aug 29, 2019
d16261e
Call test scripts instead of building test commands from scratch
kj4ezj Aug 29, 2019
1032604
Replace individual test scripts with test runner
kj4ezj Aug 29, 2019
1fb977b
Add comments to test runner
kj4ezj Aug 29, 2019
e4ffaf9
Test Runner: Catch and re-throw errors
kj4ezj Aug 29, 2019
c228f55
Test Runner: Export Buildkite artifacts
kj4ezj Aug 29, 2019
a20d27a
Add shell prompt to mongoDB echo statement
kj4ezj Aug 29, 2019
93e4b51
Extend timeout for Mac test steps.
scottarnette Aug 30, 2019
3c710e7
LRT step needs to run LRTs.
scottarnette Aug 30, 2019
8ce69b4
Ensure there is a data directory for mongoDB
kj4ezj Aug 30, 2019
bd9c12f
package building to generate script
Aug 30, 2019
31e1116
SKIPS for unpinned
Aug 30, 2019
c02940b
SKIPS for unpinned
Aug 30, 2019
52d062e
SKIPS for unpinned
Aug 30, 2019
bbf05ae
SKIPS for unpinned
Aug 30, 2019
09f8cfd
SKIPS for unpinned
Aug 30, 2019
3f71ff3
SKIPS for unpinned
Aug 30, 2019
46ba9b4
SKIPS for unpinned
Aug 30, 2019
2d5093b
Don't forget to point Travis at the new test runner
kj4ezj Aug 30, 2019
0650d81
-V to test to get travis to pass
Aug 30, 2019
2fe9260
test-result.xml is exported in test runner, delete from YAML generation
kj4ezj Aug 30, 2019
1b37a1d
Increase timeouts on non-parallelizable tests
kj4ezj Aug 30, 2019
d594ff3
LRT split
Aug 30, 2019
670a682
LRT split
Aug 30, 2019
6104747
LRT split
Aug 30, 2019
8183f0e
quick fixes
Aug 30, 2019
3d430d7
mongo = true for mac
Aug 30, 2019
63030c3
quick fixes
Aug 30, 2019
459d158
merged zach's changes
Aug 30, 2019
19d939d
quick fixes
Aug 30, 2019
2274adf
quick fixes
Aug 30, 2019
f903258
quick fixes
Aug 30, 2019
b47bbc7
quick fixes
Aug 30, 2019
064669d
quick fixes
Aug 30, 2019
7a18e9a
quick fixes
Aug 30, 2019
abcd0a5
quick fixes
Aug 30, 2019
f905156
quick fixes
Aug 30, 2019
b9c5e4a
quick fixes
Aug 30, 2019
6e878fd
quick fixes
Aug 30, 2019
4086890
Fix whitespace to match repo
kj4ezj Aug 30, 2019
56d35a2
Add comments to macos-10.14.sh
kj4ezj Aug 30, 2019
8f33555
Merge pull request #7824 from EOSIO/trav-poc-code-gen
kj4ezj Aug 30, 2019
6c10a80
Merge branch 'release/1.8.x' into trav-poc
scottarnette Sep 3, 2019
78e921b
Merge in unittests/CMakeLists.txt from r1.8.x branch.
scottarnette Sep 3, 2019
86dd2dd
Match r1.8.x submodule.
scottarnette Sep 3, 2019
3ca5be4
added automation-basic-builder-fleet to generate
Sep 3, 2019
c9b9d38
Remove verbose output on serial tests. Remove mongo dependency on Tra…
scottarnette Sep 3, 2019
4d7cf6d
Fix Mojave Package Builder step label
kj4ezj Sep 3, 2019
6d952d8
Moved "Git Submodule Regression Check" YAML into generate-pipeline.sh
kj4ezj Sep 3, 2019
5f3fee1
Created "Brew Updater" step
kj4ezj Sep 3, 2019
9e33018
Merge branch '1.8.x-trav-poc' of ssh://github.com/EOSIO/eos into 1.8.…
scottarnette Sep 3, 2019
c3c5980
Move "Ubuntu 18.04 - Contract Builder" step to end
kj4ezj Sep 3, 2019
30c2666
Merge branch '1.8.x-trav-poc' of ssh://github.com/EOSIO/eos into 1.8.…
scottarnette Sep 3, 2019
61f1dd3
Removed dead code
kj4ezj Sep 3, 2019
7c2ca28
Merge branch '1.8.x-trav-poc' of ssh://github.com/EOSIO/eos into 1.8.…
scottarnette Sep 4, 2019
c92689e
Add mac script back.
scottarnette Sep 4, 2019
1f36d42
added versions to platform files
Sep 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .cicd/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash
set -eo pipefail
. ./.cicd/helpers/general.sh
mkdir -p $BUILD_DIR
CMAKE_EXTRAS="-DBUILD_MONGO_DB_PLUGIN=true"
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"
cd $BUILD_DIR
cmake $CMAKE_EXTRAS ..
make -j$JOBS
else # Linux
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
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib64/ccache:\\\$PATH"
elif [[ $IMAGE_TAG == 'centos-7.6' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib64/ccache:\\\$PATH"
elif [[ $IMAGE_TAG == 'ubuntu-16.04' ]]; then
PRE_COMMANDS="$PRE_COMMANDS && export PATH=/usr/lib/ccache:\\\$PATH"
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
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
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
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 -DCMAKE_BUILD_TYPE='Release' .. && make -j$JOBS"
# Docker Commands
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 &&"
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"
fi
COMMANDS="$PRE_COMMANDS && $COMMANDS"
echo "$ docker run $ARGS $(buildkite-intrinsics) $FULL_TAG bash -c \"$COMMANDS\""
eval docker run $ARGS $(buildkite-intrinsics) $FULL_TAG bash -c \"$COMMANDS\"
fi
16 changes: 16 additions & 0 deletions .cicd/generate-base-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -eo pipefail
. ./.cicd/helpers/general.sh
. $HELPERS_DIR/file-hash.sh $CICD_DIR/platforms/${IMAGE_TAG}.dockerfile
# look for Docker image
echo "+++ :mag_right: Looking for $FULL_TAG"
ORG_REPO=$(echo $FULL_TAG | cut -d: -f1)
TAG=$(echo $FULL_TAG | cut -d: -f2)
EXISTS=$(curl -s -H "Authorization: Bearer $(curl -sSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${ORG_REPO}:pull" | jq --raw-output .token)" "https://registry.hub.docker.com/v2/${ORG_REPO}/manifests/$TAG")
# build, if neccessary
if [[ $EXISTS =~ '404 page not found' || $EXISTS =~ 'manifest unknown' ]]; then # if we cannot pull the image, we build and push it first
docker build -t $FULL_TAG -f $CICD_DIR/platforms/${IMAGE_TAG}.dockerfile .
docker push $FULL_TAG
else
echo "$FULL_TAG already exists."
fi
366 changes: 366 additions & 0 deletions .cicd/generate-pipeline.sh

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions .cicd/helpers/clang.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)
set(CMAKE_C_COMPILER /usr/local/bin/clang)
set(CMAKE_CXX_COMPILER /usr/local/bin/clang++)
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES /usr/local/include/c++/v1 /usr/local/include /usr/include)
set(CMAKE_CXX_FLAGS_INIT "-nostdinc++")
set(CMAKE_EXE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++")
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++")
set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++")
set(CMAKE_CXX_STANDARD_LIBRARIES "/usr/local/lib/libc++.a /usr/local/lib/libc++abi.a")
8 changes: 8 additions & 0 deletions .cicd/helpers/file-hash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -eo pipefail
[[ -z $1 ]] && echo "Please provide the file to be hashed" && exit 1
FILE_NAME=$(basename $1 | awk '{split($0,a,/\.(d|s)/); print a[1] }')
export DETERMINED_HASH=$(sha1sum $1 | awk '{ print $1 }')
( [[ $FILE_NAME =~ 'macos' ]] && [[ $PINNED == false || $UNPINNED == true ]] ) && FILE_NAME="${FILE_NAME}-unpinned"
export HASHED_IMAGE_TAG="eos-${FILE_NAME}-${DETERMINED_HASH}"
export FULL_TAG="eosio/producer:$HASHED_IMAGE_TAG"
28 changes: 28 additions & 0 deletions .cicd/helpers/general.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export ROOT_DIR=$( dirname "${BASH_SOURCE[0]}" )/../..
export BUILD_DIR=$ROOT_DIR/build
export CICD_DIR=$ROOT_DIR/.cicd
export HELPERS_DIR=$CICD_DIR/helpers
export JOBS=${JOBS:-"$(getconf _NPROCESSORS_ONLN)"}
export MOUNTED_DIR='/workdir'

# capitalize each word in a string
function capitalize()
{
if [[ ! $1 =~ 'mac' ]]; then # Don't capitalize mac
echo $1 | awk '{$1=toupper(substr($1,1,1))substr($1,2)}1'
else
echo $1
fi
}

# load buildkite intrinsic environment variables for use in docker run
function buildkite-intrinsics()
{
BK_ENV=''
if [[ -f $BUILDKITE_ENV_FILE ]]; then
while read -r var; do
BK_ENV="$BK_ENV --env ${var%%=*}"
done < "$BUILDKITE_ENV_FILE"
fi
echo "$BK_ENV"
}
22 changes: 22 additions & 0 deletions .cicd/installation-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
set -eo pipefail
. ./.cicd/helpers/general.sh
export ENABLE_INSTALL=true
if [[ $BUILDKITE_BRANCH =~ ^release/[0-9].[0-9]+.x$ || $BUILDKITE_BRANCH =~ ^master$ || $BUILDKITE_BRANCH =~ ^develop$ || $FORCE_BINARIES_BUILD == true ]]; then
export BRANCH=$(echo $BUILDKITE_BRANCH | sed 's/\//\_/')
export CONTRACTS_BUILDER_TAG="eosio/ci-contracts-builder:base-ubuntu-18.04"
export ARGS="--name ci-contracts-builder-$BUILDKITE_COMMIT --init -v $(pwd):$MOUNTED_DIR"
$CICD_DIR/build.sh
docker commit ci-contracts-builder-$BUILDKITE_COMMIT $CONTRACTS_BUILDER_TAG-latest
docker commit ci-contracts-builder-$BUILDKITE_COMMIT $CONTRACTS_BUILDER_TAG-$BUILDKITE_COMMIT
docker commit ci-contracts-builder-$BUILDKITE_COMMIT $CONTRACTS_BUILDER_TAG-$BRANCH
docker commit ci-contracts-builder-$BUILDKITE_COMMIT $CONTRACTS_BUILDER_TAG-$BRANCH-$BUILDKITE_COMMIT
docker push $CONTRACTS_BUILDER_TAG-latest
docker push $CONTRACTS_BUILDER_TAG-$BUILDKITE_COMMIT
docker push $CONTRACTS_BUILDER_TAG-$BRANCH
docker push $CONTRACTS_BUILDER_TAG-$BRANCH-$BUILDKITE_COMMIT
docker stop ci-contracts-builder-$BUILDKITE_COMMIT && docker rm ci-contracts-builder-$BUILDKITE_COMMIT
else
echo "This pipeline will only generate images against master, develop, and release branches. Set FORCE_BINARIES_BUILD=true to force a build on another branch. Exiting..."
exit 0
fi
Loading