Skip to content

Commit

Permalink
Merge pull request #2271 from bitshares/release
Browse files Browse the repository at this point in the history
Merge release into master for 5.0
  • Loading branch information
abitmore authored Sep 21, 2020
2 parents 349e006 + 4e18152 commit a06a712
Show file tree
Hide file tree
Showing 96 changed files with 4,209 additions and 787 deletions.
364 changes: 364 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,364 @@
name: Github Autobuild
on: [ push, pull_request ]
env:
CCACHE_COMPRESS: exists means true
CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime,time_macros
# The following are for windows cross-build only:
BOOST_VERSION: 1_69_0
BOOST_DOTTED_VERSION: 1.69.0
CURL_VERSION: 7.67.0
OPENSSL_VERSION: 1.1.1d
ZLIB_VERSION: 1.2.11
jobs:
test-release:
name: Build and run tests in Release mode
runs-on: ubuntu-latest
services:
elasticsearch:
image: docker://elasticsearch:7.4.2
options: --env discovery.type=single-node --publish 9200:9200 --publish 9300:9300
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
ccache \
parallel \
libboost-thread-dev \
libboost-iostreams-dev \
libboost-date-time-dev \
libboost-system-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-chrono-dev \
libboost-test-dev \
libboost-context-dev \
libboost-regex-dev \
libboost-coroutine-dev \
libcurl4-openssl-dev
sudo apt-get auto-remove -y
sudo apt-get clean -y
df -h
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Configure
run: |
mkdir -p _build
pushd _build
export -n BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR
cmake -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON \
-D CMAKE_C_COMPILER=gcc \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER=g++ \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
..
popd
- name: Load Cache
uses: actions/cache@v1
with:
path: ccache
key: ccache-release-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-release-${{ github.ref }}-
ccache-release-
- name: Build
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
make -j 2 -C _build
df -h
- name: Unit-Tests
run: |
_build/tests/app_test -l message
_build/tests/es_test -l message
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l message
libraries/fc/tests/run-parallel-tests.sh _build/tests/cli_test -l message
df -h
- name: Node-Test
run: |
df -h
pushd _build
../programs/build_helpers/run-node-test
df -h
test-debug:
name: Build and run tests in Debug mode
runs-on: ubuntu-latest
services:
elasticsearch:
image: docker://elasticsearch:7.4.2
options: --env discovery.type=single-node --publish 9200:9200 --publish 9300:9300
steps:
- name: Install dependencies
run: |
df -h
sudo apt-get update
sudo apt-get install -y \
ccache \
parallel \
libboost-thread-dev \
libboost-iostreams-dev \
libboost-date-time-dev \
libboost-system-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-chrono-dev \
libboost-test-dev \
libboost-context-dev \
libboost-regex-dev \
libboost-coroutine-dev \
libcurl4-openssl-dev
sudo apt-get auto-remove -y
sudo apt-get clean -y
df -h
sudo du -hs /mnt/*
sudo ls -alr /mnt/
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Configure
run: |
pwd
df -h .
mkdir -p _build
sudo mkdir -p /_build/libraries /_build/programs /mnt/_build/tests
sudo chmod a+rwx /_build/libraries /_build/programs /mnt/_build/tests
ln -s /_build/libraries _build/libraries
ln -s /_build/programs _build/programs
ln -s /mnt/_build/tests _build/tests
sudo ln -s /_build/libraries /mnt/_build/libraries
sudo ln -s /_build/programs /mnt/_build/programs
sudo ln -s /mnt/_build/tests /_build/tests
ls -al _build
pushd _build
export -n BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR
cmake -D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON \
-D CMAKE_C_COMPILER=gcc \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER=g++ \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
..
popd
- name: Load Cache
uses: actions/cache@v1
with:
path: ccache
key: ccache-debug-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-debug-${{ github.ref }}-
ccache-debug-
- name: Build
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
df -h
make -j 2 -C _build
df -h
du -hs _build/libraries/* _build/programs/* _build/tests/*
du -hs _build/*
du -hs /_build/*
- name: Unit-Tests
run: |
_build/tests/app_test -l message
df -h
_build/tests/es_test -l message
df -h
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l message
libraries/fc/tests/run-parallel-tests.sh _build/tests/cli_test -l message
df -h
- name: Node-Test
run: |
df -h
pushd _build
../programs/build_helpers/run-node-test
df -h
prepare-mingw64-libs:
name: Build 3rd-party libraries required for windows cross-build
runs-on: ubuntu-latest
steps:
- name: Load Cache
id: cache-libs
uses: actions/cache@v1
with:
path: libs
key: mingw64-libs-${{ env.BOOST_VERSION }}_${{ env.CURL_VERSION }}_${{ env.OPENSSL_VERSION }}_${{ env.ZLIB_VERSION }}
- name: Install dependencies
if: steps.cache-libs.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install -y \
g++-mingw-w64-x86-64 \
mingw-w64-tools
- name: Download library sources
if: steps.cache-libs.outputs.cache-hit != 'true'
run: |
curl -LO https://dl.bintray.com/boostorg/release/${{ env.BOOST_DOTTED_VERSION }}/source/boost_${{ env.BOOST_VERSION }}.tar.bz2
curl -LO https://curl.haxx.se/download/curl-${{ env.CURL_VERSION }}.tar.bz2
curl -LO https://www.openssl.org/source/openssl-${{ env.OPENSSL_VERSION }}.tar.gz
curl -LO https://zlib.net/zlib-${{ env.ZLIB_VERSION }}.tar.gz
- name: Build zlib
if: steps.cache-libs.outputs.cache-hit != 'true'
run: |
LIBS="`pwd`/libs"
ZLIB="`echo zlib-*`"
tar xfz "$ZLIB"
pushd "${ZLIB%.tar.gz}"
CROSS_PREFIX=x86_64-w64-mingw32- ./configure --prefix="$LIBS" --static --64
make install
- name: Build openssl
if: steps.cache-libs.outputs.cache-hit != 'true'
run: |
LIBS="`pwd`/libs"
OPENSSL="`echo openssl-*`"
tar xfz "$OPENSSL"
pushd "${OPENSSL%.tar.gz}"
./Configure --prefix="$LIBS" --cross-compile-prefix=x86_64-w64-mingw32- \
no-shared zlib threads \
mingw64
make CPPFLAGS="-I$LIBS/include" LDFLAGS="-L$LIBS/lib" build_libs
make -j 2 install_dev
- name: Build curl
if: steps.cache-libs.outputs.cache-hit != 'true'
run: |
LIBS="`pwd`/libs"
CURL="`echo curl-*`"
tar xfj "$CURL"
pushd "${CURL%.tar.bz2}"
sed -i 's=-lgdi32=-lcrypt32 \0=' configure
PKG_CONFIG_PATH="$LIBS/lib/pkgconfig" ./configure --host=x86_64-w64-mingw32 \
--prefix="$LIBS" \
--disable-shared \
--disable-tftpf \
--disable-ldap \
--with-zlib \
--without-ssl --with-winssl \
--disable-tftp \
--disable-ldap
make -j 2 install
- name: Build boost
if: steps.cache-libs.outputs.cache-hit != 'true'
run: |
LIBS="`pwd`/libs"
BOOST="`echo boost_*`"
tar xfj "$BOOST"
pushd "${BOOST%.tar.bz2}"
# See https://github.com/boostorg/context/issues/101
sed -i '/os.\(name\|platform\)/d;/local tmp = /s=elf=pe=;/local tmp = /s=sysv=ms=' libs/context/build/Jamfile.v2
./bootstrap.sh --prefix=$LIBS
echo "using gcc : mingw32 : x86_64-w64-mingw32-g++ ;" > user-config.jam
./b2 --user-config=user-config.jam \
--without-python \
toolset=gcc-mingw32 \
target-os=windows \
variant=release \
link=static \
threading=multi \
runtime-link=static \
address-model=64 \
abi=ms \
install
build-mingw64:
name: Cross-build for windows using mingw
runs-on: ubuntu-latest
needs: prepare-mingw64-libs
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
ccache \
g++-mingw-w64-x86-64 \
mingw-w64-tools
sudo apt-get auto-remove -y
sudo apt-get clean -y
df -h
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Load external libraries
uses: actions/cache@v1
with:
path: libs
key: mingw64-libs-${{ env.BOOST_VERSION }}_${{ env.CURL_VERSION }}_${{ env.OPENSSL_VERSION }}_${{ env.ZLIB_VERSION }}
- name: Configure
run: |
LIBS="`pwd`/libs"
mkdir -p _build
pushd _build
cmake -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER=/usr/bin/x86_64-w64-mingw32-gcc-posix \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER=/usr/bin/x86_64-w64-mingw32-g++-posix \
-D CMAKE_CXX_FLAGS=-Wa,-mbig-obj \
-D CMAKE_SYSTEM_NAME=Windows \
-D CURL_STATICLIB=ON \
-D CMAKE_EXE_LINKER_FLAGS=--static \
-D CMAKE_FIND_ROOT_PATH="/usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/;$LIBS" \
-D CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
-D CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-D CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-D GRAPHENE_DISABLE_UNITY_BUILD=ON \
..
- name: Load Cache
uses: actions/cache@v1
with:
path: ccache
key: ccache-mingw64-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-mingw64-${{ github.ref }}-
ccache-mingw64-
- name: Build
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
make -j 2 -C _build witness_node cli_wallet
build-osx:
name: Build and run tests on OSX
runs-on: macos-latest
steps:
- name: Install dependencies
run: |
brew install autoconf automake libtool
brew install ccache
brew search boost
brew install bitshares/boost160/[email protected]
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Configure
run: |
mkdir -p _build
pushd _build
cmake -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D BOOST_ROOT=/usr/local/opt/[email protected] \
-D OPENSSL_ROOT_DIR=/usr/local/opt/openssl \
..
- name: Load Cache
uses: actions/cache@v1
with:
path: ccache
key: ccache-osx-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-osx-${{ github.ref }}-
ccache-osx-
- name: Build
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
make -j 2 -C _build witness_node cli_wallet app_test cli_test chain_test
df -h
- name: Unit-Tests
run: |
_build/tests/app_test -l message
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l message
libraries/fc/tests/run-parallel-tests.sh _build/tests/cli_test -l message
df -h
- name: Node-Test
run: |
df -h
pushd _build
../programs/build_helpers/run-node-test
4 changes: 3 additions & 1 deletion CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Valentine Zavgorodnev <[email protected]>
Michael Vandeberg <[email protected]>
James Calfee <[email protected]>
Alexey Frolov <[email protected]>
syalon <[email protected]>
takaaki7 <[email protected]>
Nicolas Wack <[email protected]>
Taconator <[email protected]>
Expand All @@ -40,8 +41,10 @@ Zapata <[email protected]>
btcinshares <[email protected]>
crazybits <[email protected]>
Anzhy Cherrnyavski <[email protected]>
Tengfei Niu <[email protected]>
Tiago Peralta <[email protected]>
ioBanker <[email protected]>
Karl Semich <[email protected]>
Michael Vandeberg <[email protected]>
SahkanDesertHawk <[email protected]>
Scott Howard <[email protected]>
Expand All @@ -62,7 +65,6 @@ Haruka Ma <[email protected]>
Jaewoo Cho <[email protected]>
Jose Marcial Vieira Bisneto <[email protected]>
Jozef Knaperek <[email protected]>
Karl Semich <[email protected]>
Ken Code <[email protected]>
Krzysztof Szumny <[email protected]>
Paul Brossier <[email protected]>
Expand Down
Loading

0 comments on commit a06a712

Please sign in to comment.