Skip to content

Commit a06a712

Browse files
authored
Merge pull request #2271 from bitshares/release
Merge release into master for 5.0
2 parents 349e006 + 4e18152 commit a06a712

File tree

96 files changed

+4209
-787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+4209
-787
lines changed
Lines changed: 364 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,364 @@
1+
name: Github Autobuild
2+
on: [ push, pull_request ]
3+
env:
4+
CCACHE_COMPRESS: exists means true
5+
CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime,time_macros
6+
# The following are for windows cross-build only:
7+
BOOST_VERSION: 1_69_0
8+
BOOST_DOTTED_VERSION: 1.69.0
9+
CURL_VERSION: 7.67.0
10+
OPENSSL_VERSION: 1.1.1d
11+
ZLIB_VERSION: 1.2.11
12+
jobs:
13+
test-release:
14+
name: Build and run tests in Release mode
15+
runs-on: ubuntu-latest
16+
services:
17+
elasticsearch:
18+
image: docker://elasticsearch:7.4.2
19+
options: --env discovery.type=single-node --publish 9200:9200 --publish 9300:9300
20+
steps:
21+
- name: Install dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y \
25+
ccache \
26+
parallel \
27+
libboost-thread-dev \
28+
libboost-iostreams-dev \
29+
libboost-date-time-dev \
30+
libboost-system-dev \
31+
libboost-filesystem-dev \
32+
libboost-program-options-dev \
33+
libboost-chrono-dev \
34+
libboost-test-dev \
35+
libboost-context-dev \
36+
libboost-regex-dev \
37+
libboost-coroutine-dev \
38+
libcurl4-openssl-dev
39+
sudo apt-get auto-remove -y
40+
sudo apt-get clean -y
41+
df -h
42+
- uses: actions/checkout@v2
43+
with:
44+
submodules: recursive
45+
- name: Configure
46+
run: |
47+
mkdir -p _build
48+
pushd _build
49+
export -n BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR
50+
cmake -D CMAKE_BUILD_TYPE=Release \
51+
-D CMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON \
52+
-D CMAKE_C_COMPILER=gcc \
53+
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
54+
-D CMAKE_CXX_COMPILER=g++ \
55+
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
56+
..
57+
popd
58+
- name: Load Cache
59+
uses: actions/cache@v1
60+
with:
61+
path: ccache
62+
key: ccache-release-${{ github.ref }}-${{ github.sha }}
63+
restore-keys: |
64+
ccache-release-${{ github.ref }}-
65+
ccache-release-
66+
- name: Build
67+
run: |
68+
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
69+
mkdir -p "$CCACHE_DIR"
70+
make -j 2 -C _build
71+
df -h
72+
- name: Unit-Tests
73+
run: |
74+
_build/tests/app_test -l message
75+
_build/tests/es_test -l message
76+
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l message
77+
libraries/fc/tests/run-parallel-tests.sh _build/tests/cli_test -l message
78+
df -h
79+
- name: Node-Test
80+
run: |
81+
df -h
82+
pushd _build
83+
../programs/build_helpers/run-node-test
84+
df -h
85+
test-debug:
86+
name: Build and run tests in Debug mode
87+
runs-on: ubuntu-latest
88+
services:
89+
elasticsearch:
90+
image: docker://elasticsearch:7.4.2
91+
options: --env discovery.type=single-node --publish 9200:9200 --publish 9300:9300
92+
steps:
93+
- name: Install dependencies
94+
run: |
95+
df -h
96+
sudo apt-get update
97+
sudo apt-get install -y \
98+
ccache \
99+
parallel \
100+
libboost-thread-dev \
101+
libboost-iostreams-dev \
102+
libboost-date-time-dev \
103+
libboost-system-dev \
104+
libboost-filesystem-dev \
105+
libboost-program-options-dev \
106+
libboost-chrono-dev \
107+
libboost-test-dev \
108+
libboost-context-dev \
109+
libboost-regex-dev \
110+
libboost-coroutine-dev \
111+
libcurl4-openssl-dev
112+
sudo apt-get auto-remove -y
113+
sudo apt-get clean -y
114+
df -h
115+
sudo du -hs /mnt/*
116+
sudo ls -alr /mnt/
117+
- uses: actions/checkout@v2
118+
with:
119+
submodules: recursive
120+
- name: Configure
121+
run: |
122+
pwd
123+
df -h .
124+
mkdir -p _build
125+
sudo mkdir -p /_build/libraries /_build/programs /mnt/_build/tests
126+
sudo chmod a+rwx /_build/libraries /_build/programs /mnt/_build/tests
127+
ln -s /_build/libraries _build/libraries
128+
ln -s /_build/programs _build/programs
129+
ln -s /mnt/_build/tests _build/tests
130+
sudo ln -s /_build/libraries /mnt/_build/libraries
131+
sudo ln -s /_build/programs /mnt/_build/programs
132+
sudo ln -s /mnt/_build/tests /_build/tests
133+
ls -al _build
134+
pushd _build
135+
export -n BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR
136+
cmake -D CMAKE_BUILD_TYPE=Debug \
137+
-D CMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON \
138+
-D CMAKE_C_COMPILER=gcc \
139+
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
140+
-D CMAKE_CXX_COMPILER=g++ \
141+
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
142+
..
143+
popd
144+
- name: Load Cache
145+
uses: actions/cache@v1
146+
with:
147+
path: ccache
148+
key: ccache-debug-${{ github.ref }}-${{ github.sha }}
149+
restore-keys: |
150+
ccache-debug-${{ github.ref }}-
151+
ccache-debug-
152+
- name: Build
153+
run: |
154+
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
155+
mkdir -p "$CCACHE_DIR"
156+
df -h
157+
make -j 2 -C _build
158+
df -h
159+
du -hs _build/libraries/* _build/programs/* _build/tests/*
160+
du -hs _build/*
161+
du -hs /_build/*
162+
- name: Unit-Tests
163+
run: |
164+
_build/tests/app_test -l message
165+
df -h
166+
_build/tests/es_test -l message
167+
df -h
168+
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l message
169+
libraries/fc/tests/run-parallel-tests.sh _build/tests/cli_test -l message
170+
df -h
171+
- name: Node-Test
172+
run: |
173+
df -h
174+
pushd _build
175+
../programs/build_helpers/run-node-test
176+
df -h
177+
prepare-mingw64-libs:
178+
name: Build 3rd-party libraries required for windows cross-build
179+
runs-on: ubuntu-latest
180+
steps:
181+
- name: Load Cache
182+
id: cache-libs
183+
uses: actions/cache@v1
184+
with:
185+
path: libs
186+
key: mingw64-libs-${{ env.BOOST_VERSION }}_${{ env.CURL_VERSION }}_${{ env.OPENSSL_VERSION }}_${{ env.ZLIB_VERSION }}
187+
- name: Install dependencies
188+
if: steps.cache-libs.outputs.cache-hit != 'true'
189+
run: |
190+
sudo apt-get update
191+
sudo apt-get install -y \
192+
g++-mingw-w64-x86-64 \
193+
mingw-w64-tools
194+
- name: Download library sources
195+
if: steps.cache-libs.outputs.cache-hit != 'true'
196+
run: |
197+
curl -LO https://dl.bintray.com/boostorg/release/${{ env.BOOST_DOTTED_VERSION }}/source/boost_${{ env.BOOST_VERSION }}.tar.bz2
198+
curl -LO https://curl.haxx.se/download/curl-${{ env.CURL_VERSION }}.tar.bz2
199+
curl -LO https://www.openssl.org/source/openssl-${{ env.OPENSSL_VERSION }}.tar.gz
200+
curl -LO https://zlib.net/zlib-${{ env.ZLIB_VERSION }}.tar.gz
201+
- name: Build zlib
202+
if: steps.cache-libs.outputs.cache-hit != 'true'
203+
run: |
204+
LIBS="`pwd`/libs"
205+
ZLIB="`echo zlib-*`"
206+
tar xfz "$ZLIB"
207+
pushd "${ZLIB%.tar.gz}"
208+
CROSS_PREFIX=x86_64-w64-mingw32- ./configure --prefix="$LIBS" --static --64
209+
make install
210+
- name: Build openssl
211+
if: steps.cache-libs.outputs.cache-hit != 'true'
212+
run: |
213+
LIBS="`pwd`/libs"
214+
OPENSSL="`echo openssl-*`"
215+
tar xfz "$OPENSSL"
216+
pushd "${OPENSSL%.tar.gz}"
217+
./Configure --prefix="$LIBS" --cross-compile-prefix=x86_64-w64-mingw32- \
218+
no-shared zlib threads \
219+
mingw64
220+
make CPPFLAGS="-I$LIBS/include" LDFLAGS="-L$LIBS/lib" build_libs
221+
make -j 2 install_dev
222+
- name: Build curl
223+
if: steps.cache-libs.outputs.cache-hit != 'true'
224+
run: |
225+
LIBS="`pwd`/libs"
226+
CURL="`echo curl-*`"
227+
tar xfj "$CURL"
228+
pushd "${CURL%.tar.bz2}"
229+
sed -i 's=-lgdi32=-lcrypt32 \0=' configure
230+
PKG_CONFIG_PATH="$LIBS/lib/pkgconfig" ./configure --host=x86_64-w64-mingw32 \
231+
--prefix="$LIBS" \
232+
--disable-shared \
233+
--disable-tftpf \
234+
--disable-ldap \
235+
--with-zlib \
236+
--without-ssl --with-winssl \
237+
--disable-tftp \
238+
--disable-ldap
239+
make -j 2 install
240+
- name: Build boost
241+
if: steps.cache-libs.outputs.cache-hit != 'true'
242+
run: |
243+
LIBS="`pwd`/libs"
244+
BOOST="`echo boost_*`"
245+
tar xfj "$BOOST"
246+
pushd "${BOOST%.tar.bz2}"
247+
# See https://github.com/boostorg/context/issues/101
248+
sed -i '/os.\(name\|platform\)/d;/local tmp = /s=elf=pe=;/local tmp = /s=sysv=ms=' libs/context/build/Jamfile.v2
249+
./bootstrap.sh --prefix=$LIBS
250+
echo "using gcc : mingw32 : x86_64-w64-mingw32-g++ ;" > user-config.jam
251+
./b2 --user-config=user-config.jam \
252+
--without-python \
253+
toolset=gcc-mingw32 \
254+
target-os=windows \
255+
variant=release \
256+
link=static \
257+
threading=multi \
258+
runtime-link=static \
259+
address-model=64 \
260+
abi=ms \
261+
install
262+
build-mingw64:
263+
name: Cross-build for windows using mingw
264+
runs-on: ubuntu-latest
265+
needs: prepare-mingw64-libs
266+
steps:
267+
- name: Install dependencies
268+
run: |
269+
sudo apt-get update
270+
sudo apt-get install -y \
271+
ccache \
272+
g++-mingw-w64-x86-64 \
273+
mingw-w64-tools
274+
sudo apt-get auto-remove -y
275+
sudo apt-get clean -y
276+
df -h
277+
- uses: actions/checkout@v2
278+
with:
279+
submodules: recursive
280+
- name: Load external libraries
281+
uses: actions/cache@v1
282+
with:
283+
path: libs
284+
key: mingw64-libs-${{ env.BOOST_VERSION }}_${{ env.CURL_VERSION }}_${{ env.OPENSSL_VERSION }}_${{ env.ZLIB_VERSION }}
285+
- name: Configure
286+
run: |
287+
LIBS="`pwd`/libs"
288+
mkdir -p _build
289+
pushd _build
290+
cmake -D CMAKE_BUILD_TYPE=Release \
291+
-D CMAKE_C_COMPILER=/usr/bin/x86_64-w64-mingw32-gcc-posix \
292+
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
293+
-D CMAKE_CXX_COMPILER=/usr/bin/x86_64-w64-mingw32-g++-posix \
294+
-D CMAKE_CXX_FLAGS=-Wa,-mbig-obj \
295+
-D CMAKE_SYSTEM_NAME=Windows \
296+
-D CURL_STATICLIB=ON \
297+
-D CMAKE_EXE_LINKER_FLAGS=--static \
298+
-D CMAKE_FIND_ROOT_PATH="/usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/;$LIBS" \
299+
-D CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
300+
-D CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
301+
-D CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
302+
-D GRAPHENE_DISABLE_UNITY_BUILD=ON \
303+
..
304+
- name: Load Cache
305+
uses: actions/cache@v1
306+
with:
307+
path: ccache
308+
key: ccache-mingw64-${{ github.ref }}-${{ github.sha }}
309+
restore-keys: |
310+
ccache-mingw64-${{ github.ref }}-
311+
ccache-mingw64-
312+
- name: Build
313+
run: |
314+
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
315+
mkdir -p "$CCACHE_DIR"
316+
make -j 2 -C _build witness_node cli_wallet
317+
build-osx:
318+
name: Build and run tests on OSX
319+
runs-on: macos-latest
320+
steps:
321+
- name: Install dependencies
322+
run: |
323+
brew install autoconf automake libtool
324+
brew install ccache
325+
brew search boost
326+
brew install bitshares/boost160/[email protected]
327+
- uses: actions/checkout@v2
328+
with:
329+
submodules: recursive
330+
- name: Configure
331+
run: |
332+
mkdir -p _build
333+
pushd _build
334+
cmake -D CMAKE_BUILD_TYPE=Release \
335+
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
336+
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
337+
-D BOOST_ROOT=/usr/local/opt/[email protected] \
338+
-D OPENSSL_ROOT_DIR=/usr/local/opt/openssl \
339+
..
340+
- name: Load Cache
341+
uses: actions/cache@v1
342+
with:
343+
path: ccache
344+
key: ccache-osx-${{ github.ref }}-${{ github.sha }}
345+
restore-keys: |
346+
ccache-osx-${{ github.ref }}-
347+
ccache-osx-
348+
- name: Build
349+
run: |
350+
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
351+
mkdir -p "$CCACHE_DIR"
352+
make -j 2 -C _build witness_node cli_wallet app_test cli_test chain_test
353+
df -h
354+
- name: Unit-Tests
355+
run: |
356+
_build/tests/app_test -l message
357+
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l message
358+
libraries/fc/tests/run-parallel-tests.sh _build/tests/cli_test -l message
359+
df -h
360+
- name: Node-Test
361+
run: |
362+
df -h
363+
pushd _build
364+
../programs/build_helpers/run-node-test

CONTRIBUTORS.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Valentine Zavgorodnev <[email protected]>
2929
Michael Vandeberg <[email protected]>
3030
James Calfee <[email protected]>
3131
Alexey Frolov <[email protected]>
32+
3233
3334
Nicolas Wack <[email protected]>
3435
Taconator <[email protected]>
@@ -40,8 +41,10 @@ Zapata <[email protected]>
4041
btcinshares <[email protected]>
4142
crazybits <[email protected]>
4243
Anzhy Cherrnyavski <[email protected]>
44+
Tengfei Niu <[email protected]>
4345
Tiago Peralta <[email protected]>
4446
47+
Karl Semich <[email protected]>
4548
Michael Vandeberg <[email protected]>
4649
SahkanDesertHawk <[email protected]>
4750
Scott Howard <[email protected]>
@@ -62,7 +65,6 @@ Haruka Ma <[email protected]>
6265
Jaewoo Cho <[email protected]>
6366
Jose Marcial Vieira Bisneto <[email protected]>
6467
Jozef Knaperek <[email protected]>
65-
Karl Semich <[email protected]>
6668
6769
Krzysztof Szumny <[email protected]>
6870
Paul Brossier <[email protected]>

0 commit comments

Comments
 (0)