Skip to content

Commit 9e2f76c

Browse files
authored
Merge pull request #235 from galpHub/UpdateMaster
Update master
2 parents 4d4e34a + 590edcd commit 9e2f76c

474 files changed

Lines changed: 17604 additions & 13579 deletions

File tree

Some content is hidden

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

.cirrus.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
continous_integration_task:
2+
container:
3+
dockerfile: divi/DockerfileForCI
4+
test_script:
5+
- pushd divi/qa/rpc-tests && split --numeric-suffixes --lines=60 test_list.txt test_list && rm test_list.txt && popd
6+
- pushd divi/src/GMock && autoreconf -fvi && popd
7+
- pushd divi/ && { make distclean || true ; } && ./autogen.sh && ./configure --without-gui NO_QT=1 && popd
8+
- pushd divi/ && make && make -j check && popd
9+
- pushd divi/qa/rpc-tests && ./test_runner.py --test_suite_file test_list00 --exclude proxy_test.py,rpcbind_test.py --jobs=1 --cli_timeout=60.0 && popd
10+
- pushd divi/qa/rpc-tests && ./test_runner.py --test_suite_file test_list01 --exclude proxy_test.py,rpcbind_test.py --jobs=1 --cli_timeout=60.0 && popd

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ doxygen/*
66
developer_stuff
77
documents/*
88
doxygen/
9+
*/divi_regtest/*
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +0,0 @@
1-
b064ff156dad8c5e60e5b836bbe79ad0094faf4a
2-
e3f9a6592f18bded5b4355880707a8be9488f0ee
3-
f7e41254d2357b23184367a0f4d305feb9709702
4-
0e85c951d20c61298a295717ffed3795072435d2
5-
fb7c7142cbeddc3a07b2182a40cd2ccdfcafd851
6-
2d996d92af6f698c847daa2192876624afdc8108
7-
c486ba3ced3f9840bb5b8b7906d6f7c73032eddf
8-
13d3eb96e89e329e8f42d21cb9e3821af7266ad1
9-
44bc2d0f1560fd3b44c2e24ba338a058744e642b
10-
5b15ae43174cb2d884726ce7002557940298e01a
11-
1a9c10df4119a56a5038d472fad79b1788883f8a
12-
320f3c57f4ebf8485d6021db121631741c021eb6
13-
06db2f697a30bc960402faee048c1fb3549285cc
14-
0adb94a83698c9c4b787509ce2a3db91533221f3
15-
1b424747ceeb744362ec18b6dc6a1ca829921d73
16-
1b2613983a029fd7e332fdb57338050c71d338ab
17-
515ee8b9d0ed7c2dc246def30882c31ac913ee60
18-
119fe55587f5593bccac1f0573c8d22a4a9731bb
19-
987d866a1573a29c3bc0314a7f3b38489674b325
20-
d501f3dbb061306940b792454a5a6852d3e1428c
21-
5eb5b40d08214af2545408eea1e7158ddb1368dc
22-
8b10201f2f07e93ea4582e5b8c465beab764e6cb
23-
ee1328d04749b0ca93b1bd8be79ea50679568410
24-
23b4e8afb8771f51db9446b845f430545f78749a
25-
f5cc2c1f383531571858270ccc78578382fdc254

DeploymentScripts/README.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# This tool was designed to be used in an Ubuntu 18.04 environment
2-
# It provides a quick way of building divi binaries without all the
3-
# maneuvering that's otherwise required. A few dependencies like the MacOSX10.9 sdk
4-
# as well as the raspberrypi-tools. These are downloaded as part of the tidy_build.sh
5-
# but require care as these tools have not been thoroughly tested against careless
6-
# usage.
7-
# First time usage should be './continuous_build.sh clean'
8-
# Later usages that wish to skip the download of the 3rd party dependencies
9-
# can ommit the call to clean
10-
# Note that these deployment scripts point to a specific remote repo and branch
11-
# namely the development branch being managed by @galpHub. These should be updated
12-
# whenever these change
1+
Release Process Procedure (For Ubuntu 20.04 OS base machine - e.g. Digital Ocean)
2+
* sudo apt-get update
3+
* sudo apt-get -y upgrade
4+
* sudo apt-get install -y ruby rename
5+
* git clone --depth=1 <development-repo> Divi
6+
* cp Divi/DeploymentScripts DeploymentScripts && cd DeploymentScripts
7+
* ./install_docker_20-04.sh
8+
* sudo chmod +x download_dependencies.sh continuous_build.sh tidy_build.sh build.sh
9+
* ./download_dependencies.sh
10+
If development binaries are desired:
11+
* rm LastBuiltDevelopment && nohup ./continuous_build.sh dev > build_process.log 2>&1 &
12+
If production binaries are desired:
13+
* rm LastBuiltDevelopment && nohup ./continuous_build.sh > build_process.log 2>&1 &
1314

14-
## Pre-requisites to be run in ~/build_dependencies
15-
# curl -L https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz | tar -xJf - &&
16-
# tar -cJf MacOSX10.9.sdk.tar.xz ./ &&
17-
# rm -r MacOSX10.9.sdk &&
18-
# git clone -q https://github.com/raspberrypi/tools.git && tar -czf raspberrypi-tools.tar.gz ./tools &&
19-
# rm -rf ./tools
15+
Additonal notes:
16+
* Should have at least 4 ram and 2 cpus of hardware for building
17+
* Built binaries are stored under /divi_binaries/
18+
* LastBuiltDevelopment is a list of recently built commit hashes. The build process ignores the last commit hash in this file.
19+
* It's important to run the build process in the background as it can slow down the reponsiveness of the shell on which it executes potentially cancelling the build in the event of disconnection

DeploymentScripts/build.sh

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,31 @@ last_failed_build=""
2929
if ! $MayBuild; then
3030
echo "Cannot build current configuration"
3131
fi
32-
all_builds_succeeded=false
32+
all_builds_succeeded=true
33+
builds=(linux win osx rpi2)
3334
if $MayBuild; then
3435
echo "Working from commit: $1 -> $COMMIT & source: $2"
3536
rm -rf /blddv/upload/ &&
36-
mkdir -p /blddv/upload/ &&
37-
mkdir -p /blddv/upload/ubuntu &&
38-
mkdir -p /blddv/upload/windows &&
39-
mkdir -p /blddv/upload/osx &&
40-
mkdir -p /blddv/upload/rpi2
37+
mkdir -p /blddv/upload/
4138

4239
cd /blddv/gitian-builder/ &&
4340
mkdir -p /blddv/gitian-builder/inputs/ &&
4441
cp /blddv/build_dependencies/* /blddv/gitian-builder/inputs/
4542

4643
[ -d "/blddv/gitian-builder/inputs/divi/" ] && rm -rf /blddv/gitian-builder/inputs/divi/
4744

48-
all_builds_succeeded=false &&
4945
cd /blddv/gitian-builder/ &&
50-
/blddv/gitian-builder/bin/make-base-vm --docker --suite trusty && wait &&
51-
last_failed_build="ubuntu" &&
52-
/blddv/gitian-builder/bin/gbuild --commit divi=$COMMIT --url divi=/blddv/Divi/ /blddv/Divi/divi/contrib/gitian-descriptors/gitian-linux.yml &&
53-
cp -r /blddv/gitian-builder/build/out/* /blddv/upload/ubuntu/ &&
54-
last_failed_build="windows" &&
55-
/blddv/gitian-builder/bin/gbuild --commit divi=$COMMIT --url divi=/blddv/Divi/ /blddv/Divi/divi/contrib/gitian-descriptors/gitian-win.yml &&
56-
cp -r /blddv/gitian-builder/build/out/* /blddv/upload/windows/ &&
57-
last_failed_build="mac" &&
58-
/blddv/gitian-builder/bin/gbuild --commit divi=$COMMIT --url divi=/blddv/Divi/ /blddv/Divi/divi/contrib/gitian-descriptors/gitian-osx.yml &&
59-
cp -r /blddv/gitian-builder/build/out/* /blddv/upload/osx/ &&
60-
last_failed_build="rpi" &&
61-
/blddv/gitian-builder/bin/make-base-vm --docker --suite trusty && wait &&
62-
/blddv/gitian-builder/bin/gbuild --commit divi=$COMMIT --url divi=/blddv/Divi/ /blddv/Divi/divi/contrib/gitian-descriptors/gitian-rpi2.yml &&
63-
cp -r /blddv/gitian-builder/build/out/* /blddv/upload/rpi2/ &&
64-
all_builds_succeeded=true
46+
for build_id in ${builds[@]}
47+
do
48+
if [ "${last_failed_build}" = "${build_id}" ]; then all_builds_succeeded=false && break ; fi
49+
last_failed_build="${build_id}" &&
50+
/blddv/gitian-builder/bin/make-base-vm --docker --suite bionic && wait &&
51+
/blddv/gitian-builder/bin/gbuild -j 1 --commit divi=$COMMIT --url divi=/blddv/Divi/ /blddv/Divi/divi/contrib/gitian-descriptors/gitian-${build_id}.yml &&
52+
mkdir -p /blddv/upload/${build_id} &&
53+
cp -r /blddv/gitian-builder/build/out/* /blddv/upload/${build_id}/ &&
54+
last_failed_build="" &&
55+
docker container stop $( docker ps -a -q )
56+
done
6557
fi
6658

6759
mkdir -p /divi_binaries/

DeploymentScripts/continuous_build.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,20 @@ oldHash=$(tac LastBuiltDevelopment | head -n 1)
77
remoteDevelopment="https://github.com/galpHub/Divi.git"
88
remoteMaster="https://github.com/DiviProject/Divi.git"
99

10-
branch_name="Development"
11-
remoteRepo=$remoteDevelopment
10+
clean_mode=false
11+
if [[ -z $1 ]] ; then
12+
branch_name="master"
13+
remoteRepo=$remoteMaster
14+
echo "Building master..."
15+
elif [[ ! -z $1 ]] && [[ $1 == "dev" ]] ; then
16+
branch_name="Development"
17+
remoteRepo=$remoteDevelopment
18+
echo "Building Development..."
19+
fi
20+
21+
if [[ ! -z $2 ]] ; then
22+
clean_mode=true
23+
fi
1224

1325
git clone --depth=1 $remoteRepo --branch $branch_name /tmp/Divi/
1426
pushd /tmp/Divi/
@@ -17,7 +29,11 @@ popd
1729
rm -r /tmp/Divi/
1830
zero=0
1931
if [[ $oldHash != $newestHash ]]; then
20-
./tidy_build.sh $branch_name $remoteRepo $1
32+
if $clean_mode ; then
33+
./tidy_build.sh $branch_name $remoteRepo clean
34+
else
35+
./tidy_build.sh $branch_name $remoteRepo
36+
fi
2137
if [[ $? ]]; then
2238
if [[ -d "/divi_binaries/$newestHash" ]]; then
2339
echo "Build complete!"
@@ -37,4 +53,4 @@ else
3753
fi
3854

3955
}
40-
run $1
56+
run $1 $2

DeploymentScripts/derp_build.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

DeploymentScripts/download_dependencies.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pushd MacOSX10.9.sdk &&
99
find . -type f ! -iname "sha256checksums" -print0 | sort -z | xargs -r0 sha256sum > sha256checksums &&
1010
echo "5c4e5b294f196c7f88f755c35e8ecc688f80da5a33f00d8078ed4c6f9ff4d3d8 sha256checksums" | sha256sum -c &&
1111
rm sha256checksums && popd &&
12-
tar -cJf MacOSX10.9.sdk.tar.xz ./ &&
12+
{ tar -cJf MacOSX10.9.sdk.tar.xz ./ || true ; } &&
1313
rm -r MacOSX10.9.sdk &&
1414
git clone -q https://github.com/raspberrypi/tools.git &&
1515
tar -czf raspberrypi-tools.tar.gz ./tools &&
@@ -22,4 +22,4 @@ git config --global user.name "DevBot" &&
2222
git commit -m "Remove proxy"
2323
}
2424

25-
run
25+
run
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apt-get update &&
2+
apt-get -y install sudo &&
3+
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common &&
4+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - &&
5+
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" &&
6+
apt-cache policy docker-ce &&
7+
apt-cache search docker-ce &&
8+
sudo apt install -y docker-ce

0 commit comments

Comments
 (0)