"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/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']
"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
build_dir = "build" deploy_dir = os.path.join(os.environ['BUILD_DIR'],'deploy', '') 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 #ccache https://bintray.com/homebrew/bottles/download_file?file_path=ccache-3.7.6.high_sierra.bottle.tar.gz nci.call_retry_on_fail('brew install --force https://assets.nebl.io/dependencies/macos/ccache-3.7.6.high_sierra.bottle.tar.gz') #qt https://bintray.com/homebrew/bottles/download_file?file_path=qt-5.13.2.high_sierra.bottle.tar.gz nci.call_retry_on_fail('brew install --force https://assets.nebl.io/dependencies/macos/qt-5.13.2.high_sierra.bottle.tar.gz')
build_target_alt = '' if(os.environ['target_v'] == "rpi_daemon"): build_target = 'bfxd' build_target_alt = 'bfxd' elif(os.environ['target_v'] == "rpi_wallet_test"): build_target = 'tests-bfx-qt' build_target_alt = 'tests-BFX-Qt' else: build_target = 'bfx-qt' build_target_alt = 'BFX-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 if (os.environ.get('TRAVIS_BUILD_DIR') is not None): # move ccache dir for travis nci.mkdir_p(os.path.join(os.environ['HOME'],'.ccache', '')) nci.call_with_err_code('mv ' + os.path.join(os.environ['HOME'],'.ccache', '') + ' ' + os.path.join(deploy_dir,'.ccache', '')) else: # move ccache for github actions nci.mkdir_p(os.path.join(working_dir,'.ccache', '')) nci.call_with_err_code('mv ' + os.path.join(working_dir,'.ccache', '') + ' ' + os.path.join(deploy_dir,'.ccache', '')) # Start Docker Container to Build bfxd or BFX-Qt if (os.environ.get('TRAVIS_BUILD_DIR') is not None): nci.call_with_err_code('timeout --signal=SIGKILL 42m sudo docker run -e BRANCH=' + os.environ['BRANCH'] + ' -e BUILD=' + build_target + ' -v ' + os.environ['BUILD_DIR'] + ':/root/vol -t bfxteam/bfxd-build-ccache-rpi') else:
nci.mkdir_p(deploy_dir) os.chdir(deploy_dir) build_target = '' build_target_alt = '' if (os.environ['target_v'] == "linux_daemon"): build_target = 'bfxd' build_target_alt = 'bfxd' elif (os.environ['target_v'] == "linux_wallet_test"): build_target = 'tests-bfx-qt' build_target_alt = 'tests-BFX-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 = 'bfx-qt' build_target_alt = 'BFX-Qt'
"lib32z1", "libx32z1", "libx32z1-dev", "zlib1g", "zlib1g-dev", "lib32z1-dev", "libsodium-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 ../build_scripts/CompileOpenSSL-Linux.py') nci.call_with_err_code('python ../build_scripts/CompileCurl-Linux.py') nci.call_with_err_code('python ../build_scripts/CompileQREncode-Linux.py') nci.call_with_err_code('python ../build_scripts/CompileBoost-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, 'qrencode_build/include/')