Пример #1
0
build_dir = "build"

packages_to_install = \
[
    "wget",
    "make",
    "binutils"
]

nci.install_packages_debian(packages_to_install)

working_dir = os.getcwd()

mxe_path = "/mxe/mxe/"
# download the toolchain for windows
nci.call_with_err_code("wget https://nebl.io/dependencies/mxe-trusty.tar.gz")
# extract it
nci.call_with_err_code("tar -xf mxe-trusty.tar.gz")
# move it to /mxe, where it was built the first time
nci.call_with_err_code("sudo mv mxe /")

# add mxe to PATH
mxe_bin_path = os.path.join(mxe_path, "usr/bin/")
os.environ["PATH"] += (":" + mxe_bin_path)

#build leveldb
print("Building leveldb...")
CC_path = os.path.join(mxe_bin_path, "i686-w64-mingw32.static-gcc")
CXX_path = os.path.join(mxe_bin_path, "i686-w64-mingw32.static-g++")
os.chdir("src/leveldb")
print("Cleaning leveldb...")
Пример #2
0
[
    "wget",
    "make",
    "binutils"
]

nci.install_packages_debian(packages_to_install)

working_dir = os.getcwd()
deploy_dir = os.path.join(os.environ['TRAVIS_BUILD_DIR'], 'deploy', '')
nci.mkdir_p(deploy_dir)

mxe_path = "/mxe/mxe/"
# download the toolchain for windows
nci.call_with_err_code(
    "wget --progress=dot:giga https://neblio-files.ams3.digitaloceanspaces.com/dependencies/mxe_x86_64.tar.gz"
)
# extract it
nci.call_with_err_code("tar -xf mxe_x86_64.tar.gz")
# move it to /mxe, where it was built the first time
nci.call_with_err_code("sudo mv mxe /")

# add mxe to PATH
mxe_bin_path = os.path.join(mxe_path, "usr/bin/")
os.environ["PATH"] += (":" + mxe_bin_path)

os.chdir(working_dir)

# prepend ccache to the path, necessary since prior steps prepend things to the path
os.environ['PATH'] = '/usr/lib/ccache:' + os.environ['PATH']
Пример #3
0
    "build-essential",
    "libboost-dev",
    "libboost-system-dev",
    "libboost-filesystem-dev",
    "libboost-program-options-dev",
    "libboost-thread-dev",
    "libboost-regex-dev",
    "libssl-dev",
    "libdb++-dev",
    "libminiupnpc-dev",
    "libqrencode-dev",
    "libcurl4-openssl-dev"
]

nci.install_packages_debian(packages_to_install)

nci.mkdir_p(build_dir)
os.chdir(build_dir)
nci.call_with_err_code(
    'qmake "USE_UPNP=1" "USE_QRCODE=0" "RELEASE=1" "NEBLIO_CONFIG += Tests" ../neblio-wallet.pro'
)
nci.call_with_err_code("make -j3")

# run tests
nci.call_with_err_code("./wallet/test/neblio-tests")

print("")
print("")
print("Building finished successfully.")
print("")
Пример #4
0
    "librtmp-dev",
    "lib32z1",
    "libx32z1",
    "libx32z1-dev",
    "zlib1g",
    "zlib1g-dev",
    "lib32z1-dev"
]

nci.install_packages_debian(packages_to_install)

nci.mkdir_p(deploy_dir)
nci.mkdir_p(build_dir)
os.chdir(build_dir)

nci.call_with_err_code('ccache -s')

nci.call_with_err_code(
    'python $TRAVIS_BUILD_DIR/build_scripts/CompileOpenSSL-Linux.py')
nci.call_with_err_code(
    'python $TRAVIS_BUILD_DIR/build_scripts/CompileCurl-Linux.py')
nci.call_with_err_code(
    'python $TRAVIS_BUILD_DIR/build_scripts/CompileQREncode-Linux.py')

pkg_config_path = os.path.join(working_dir, build_dir,
                               'curl_build/lib/pkgconfig/')
openssl_include_path = os.path.join(working_dir, build_dir,
                                    'openssl_build/include/')
openssl_lib_path = os.path.join(working_dir, build_dir, 'openssl_build/lib/')
qrencode_lib_path = os.path.join(working_dir, build_dir, 'qrencode_build/lib/')
qrencode_include_path = os.path.join(working_dir, build_dir,
Пример #5
0
build_target = ''
build_target_alt = ''
if (os.environ['target_v'] == "rpi_daemon"):
    build_target = 'nebliod'
    build_target_alt = 'nebliod'
elif (os.environ['target_v'] == "rpi_wallet_test"):
    build_target = 'tests-neblio-qt'
    build_target_alt = 'tests-neblio-Qt'
else:
    build_target = 'neblio-qt'
    build_target_alt = 'neblio-Qt'

# Install docker
nci.call_with_err_code(
    'curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh && rm get-docker.sh'
)

# Prepare qemu
nci.call_with_err_code(
    'docker run --rm --privileged multiarch/qemu-user-static:register --reset')

# move .ccache folder to our deploy directory
nci.call_with_err_code('mv ' +
                       os.path.join(os.environ['HOME'], '.ccache', '') + ' ' +
                       os.path.join(deploy_dir, '.ccache', ''))

# Start Docker Container to Build nebliod or neblio-Qt
nci.call_with_err_code(
    'timeout --signal=SIGKILL 42m sudo docker run -e BRANCH=' +
    os.environ['TRAVIS_BRANCH'] + ' -e BUILD=' + build_target + ' -v ' +
Пример #6
0
nci.mkdir_p(deploy_dir)
os.chdir(deploy_dir)

build_target = ''
build_target_alt = ''
if (os.environ['target_v'] == "rpi_daemon"):
    build_target = 'nebliod'
    build_target_alt = 'nebliod'
else:
    build_target = 'neblio-qt'
    build_target_alt = 'neblio-Qt'

# Install docker
nci.call_with_err_code(
    'curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh && rm get-docker.sh'
)

# Prepare qemu
nci.call_with_err_code(
    'docker run --rm --privileged multiarch/qemu-user-static:register --reset')

# move .ccache folder to our deploy directory
nci.call_with_err_code('mv ' +
                       os.path.join(os.environ['HOME'], '.ccache', '') + ' ' +
                       os.path.join(deploy_dir, '.ccache', ''))

# Start Docker Container to Build nebliod or neblio-Qt
nci.call_with_err_code(
    'timeout --signal=SIGKILL 42m sudo docker run -e BRANCH=' +
    os.environ['TRAVIS_BRANCH'] + ' -e BUILD=' + build_target + ' -v ' +
Пример #7
0
    "libidn11-dev",
    "librtmp-dev",
    "lib32z1",
    "libx32z1",
    "libx32z1-dev",
    "zlib1g",
    "zlib1g-dev",
    "lib32z1-dev"
]

nci.install_packages_debian(packages_to_install)

nci.mkdir_p(deploy_dir)
os.chdir(build_dir)

nci.call_with_err_code('ccache -s')

nci.call_with_err_code(
    'python $TRAVIS_BUILD_DIR/build_scripts/CompileOpenSSL-Linux.py')
nci.call_with_err_code(
    'python $TRAVIS_BUILD_DIR/build_scripts/CompileCurl-Linux.py')

os.environ['PKG_CONFIG_PATH'] = os.path.join(working_dir, build_dir,
                                             'curl_build/lib/pkgconfig/')
os.environ['OPENSSL_INCLUDE_PATH'] = os.path.join(working_dir, build_dir,
                                                  'openssl_build/include/')
os.environ['OPENSSL_LIB_PATH'] = os.path.join(working_dir, build_dir,
                                              'openssl_build/lib/')

nci.call_with_err_code('ccache -s')
Пример #8
0
parser = argparse.ArgumentParser()
parser.add_argument('--test',
                    '-t',
                    help='Only build and run tests',
                    action='store_true')
args = parser.parse_args()

nci.mkdir_p(deploy_dir)
nci.mkdir_p(build_dir)
os.chdir(build_dir)

# do not auto update homebrew as it is very slow
os.environ['HOMEBREW_NO_AUTO_UPDATE'] = '1'

# remove existing deps that come pre installed
nci.call_with_err_code('brew uninstall --ignore-dependencies ccache || true')
nci.call_with_err_code('brew uninstall --ignore-dependencies qt || true')
nci.call_with_err_code(
    'brew uninstall --ignore-dependencies berkeley-db@4 || true')
nci.call_with_err_code('brew uninstall --ignore-dependencies boost || true')
nci.call_with_err_code(
    'brew uninstall --ignore-dependencies miniupnpc || true')
nci.call_with_err_code('brew uninstall --ignore-dependencies curl || true')
nci.call_with_err_code('brew uninstall --ignore-dependencies openssl || true')
nci.call_with_err_code(
    'brew uninstall --ignore-dependencies [email protected] || true')
nci.call_with_err_code('brew uninstall --ignore-dependencies qrencode || true')
nci.call_with_err_code(
    'brew uninstall --ignore-dependencies libsodium || true')

# Install High Seirra Versions of Depeendencies, due to that being the minimum version we support
Пример #9
0
packages_to_install = \
[
    "qt5-default",
    "qt5-qmake",
    "qtbase5-dev-tools",
    "qttools5-dev-tools",
    "build-essential",
    "libboost-dev",
    "libboost-system-dev",
    "libboost-filesystem-dev",
    "libboost-program-options-dev",
    "libboost-thread-dev",
    "libboost-regex-dev",
    "libssl-dev",
    "libdb++-dev",
    "libminiupnpc-dev",
    "libqrencode-dev",
    "libcurl4-openssl-dev"
]

nci.install_packages_debian(packages_to_install)

nci.mkdir_p("src/obj/zerocoin")
os.chdir(build_dir)
nci.call_with_err_code('make "STATIC=1" -B -w -f makefile.unix -j3')

print("")
print("")
print("Building finished successfully.")
print("")
Пример #10
0
    "ccache",
    "wget",
    "make",
    "binutils"
]

nci.install_packages_debian(packages_to_install)

working_dir = os.getcwd()
deploy_dir = os.path.join(os.environ['BUILD_DIR'], 'deploy', '')
nci.mkdir_p(deploy_dir)

mxe_path = "/mxe/mxe/"
# download the toolchain for windows
nci.call_with_err_code(
    "wget --progress=dot:giga https://files.nebl.io/dependencies/parts=12/mxe.tar.gz"
)
# extract it
nci.call_with_err_code("tar -xf mxe.tar.gz")
# move it to /mxe, where it was built the first time
nci.call_with_err_code("sudo mv mxe /")

# add mxe to PATH
mxe_bin_path = os.path.join(mxe_path, "usr/bin/")
os.environ["PATH"] += (":" + mxe_bin_path)

os.chdir(working_dir)

# prepend ccache to the path, necessary since prior steps prepend things to the path
os.environ['PATH'] = '/usr/lib/ccache:' + os.environ['PATH']
Пример #11
0
nci.mkdir_p(deploy_dir)
os.chdir(deploy_dir)

build_target = ''
build_target_alt = ''
if (os.environ['target_v'] == "linux_daemon"):
    build_target = 'nebliod'
    build_target_alt = 'nebliod'
elif (os.environ['target_v'] == "linux_wallet_test"):
    build_target = 'tests-neblio-qt'
    build_target_alt = 'tests-neblio-Qt'
    os.chdir(os.environ['BUILD_DIR'])
    # download test data
    nci.call_with_err_code(
        'wget --progress=dot:giga https://files.nebl.io/test_data_mainnet.tar.xz -O ./wallet/test/data/test_data_mainnet.tar.xz'
    )
    nci.call_with_err_code(
        'wget --progress=dot:giga https://files.nebl.io/test_data_testnet.tar.xz -O ./wallet/test/data/test_data_testnet.tar.xz'
    )
    nci.call_with_err_code(
        'tar -xJvf ./wallet/test/data/test_data_mainnet.tar.xz -C ./wallet/test/data'
    )
    nci.call_with_err_code(
        'tar -xJvf ./wallet/test/data/test_data_testnet.tar.xz -C ./wallet/test/data'
    )
    nci.call_with_err_code('rm ./wallet/test/data/*.tar.xz')
    os.chdir(deploy_dir)
else:
    build_target = 'neblio-qt'
    build_target_alt = 'neblio-Qt'
Пример #12
0
    "qt5-default",
    "qt5-qmake",
    "qtbase5-dev-tools",
    "qttools5-dev-tools",
    "build-essential",
    "libboost-dev",
    "libboost-system-dev",
    "libboost-filesystem-dev",
    "libboost-program-options-dev",
    "libboost-thread-dev",
    "libboost-regex-dev",
    "libssl-dev",
    "libdb++-dev",
    "libminiupnpc-dev",
    "libqrencode-dev",
    "libcurl4-openssl-dev"
]

nci.install_packages_debian(packages_to_install)

nci.mkdir_p(build_dir)
os.chdir(build_dir)
nci.call_with_err_code(
    'qmake "USE_UPNP=1" "USE_QRCODE=0" "RELEASE=1" ../neblio-qt.pro')
nci.call_with_err_code("make -j3")

print("")
print("")
print("Building finished successfully.")
print("")
Пример #13
0
parser = argparse.ArgumentParser()
parser.add_argument('--test',
                    '-t',
                    help='Only build and run tests',
                    action='store_true')
args = parser.parse_args()

nci.mkdir_p(deploy_dir)
nci.mkdir_p(build_dir)
os.chdir(build_dir)

# do not auto update homebrew as it is very slow
os.environ['HOMEBREW_NO_AUTO_UPDATE'] = '1'

# set up ccache
nci.call_with_err_code(
    'brew fetch --retry ccache        && brew install ccache --force')

nci.call_with_err_code(
    'brew fetch --retry qt            && brew install qt --force')
nci.call_with_err_code(
    'brew fetch --retry berkeley-db@4 && brew install berkeley-db@4 --force')
nci.call_with_err_code(
    'brew fetch --retry [email protected]    && brew install [email protected] --force')
nci.call_with_err_code(
    'brew fetch --retry miniupnpc     && brew install miniupnpc --force')
nci.call_with_err_code(
    'brew fetch --retry curl          && brew install curl --force')
nci.call_with_err_code(
    'brew fetch --retry openssl       && brew install openssl --force')
nci.call_with_err_code(
    'brew fetch --retry qrencode      && brew install qrencode --force')
Пример #14
0
    "librtmp-dev",
    "lib32z1",
    "libx32z1",
    "libx32z1-dev",
    "zlib1g",
    "zlib1g-dev",
    "lib32z1-dev",
    "libsodium-dev"
]

nci.install_packages_debian(packages_to_install)

nci.mkdir_p(deploy_dir)
os.chdir(build_dir)

nci.call_with_err_code('ccache -s')

nci.call_with_err_code('python ../build_scripts/CompileOpenSSL-Linux.py')
nci.call_with_err_code('python ../build_scripts/CompileCurl-Linux.py')
nci.call_with_err_code('python ../build_scripts/CompileBoost-Linux.py')

os.environ['PKG_CONFIG_PATH'] = os.path.join(working_dir, build_dir,
                                             'curl_build/lib/pkgconfig/')
os.environ['OPENSSL_INCLUDE_PATH'] = os.path.join(working_dir, build_dir,
                                                  'openssl_build/include/')
os.environ['OPENSSL_LIB_PATH'] = os.path.join(working_dir, build_dir,
                                              'openssl_build/lib/')

nci.call_with_err_code('ccache -s')

# prepend ccache to the path, necessary since prior steps prepend things to the path