Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3091e6d6f | ||
|
|
1a996e5407 | ||
|
|
f927e475ff | ||
|
|
fbd6bac81a |
@@ -80,6 +80,7 @@ environment:
|
|||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
- CMP: vs2019
|
- CMP: vs2019
|
||||||
BASE: 3.15
|
BASE: 3.15
|
||||||
|
CLEAN_DEPS: NO
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
- CMP: vs2019
|
- CMP: vs2019
|
||||||
BASE: 3.14
|
BASE: 3.14
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ jobs:
|
|||||||
- env: SET=test01 BCFG=static-debug
|
- env: SET=test01 BCFG=static-debug
|
||||||
dist: bionic
|
dist: bionic
|
||||||
|
|
||||||
- env: SET=test01
|
- env: SET=test01 CLEAN_DEPS=NO
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
|
||||||
- env: SET=test01 BCFG=static-debug
|
- env: SET=test01 BCFG=static-debug
|
||||||
|
|||||||
@@ -251,6 +251,10 @@ location for the dependency builds. [default is `$HOME/.cache`]
|
|||||||
Set `PARALLEL_MAKE` to the number of parallel make jobs that you want your
|
Set `PARALLEL_MAKE` to the number of parallel make jobs that you want your
|
||||||
build to use. [default is the number of CPUs on the runner]
|
build to use. [default is the number of CPUs on the runner]
|
||||||
|
|
||||||
|
Set `CLEAN_DEPS` to `NO` if you want to leave the object file directories
|
||||||
|
(`**/O.*`) in the cached dependencies. [default is to run `make clean`
|
||||||
|
after building a dependency]
|
||||||
|
|
||||||
Service specific options are described in the README files
|
Service specific options are described in the README files
|
||||||
in the service specific subdirectories:
|
in the service specific subdirectories:
|
||||||
|
|
||||||
|
|||||||
41
cue.py
41
cue.py
@@ -71,6 +71,9 @@ def detect_context():
|
|||||||
if 'CHOCO' in os.environ:
|
if 'CHOCO' in os.environ:
|
||||||
ci['choco'].extend(os.environ['CHOCO'].split())
|
ci['choco'].extend(os.environ['CHOCO'].split())
|
||||||
|
|
||||||
|
if 'APT' in os.environ:
|
||||||
|
ci['apt'].extend(os.environ['APT'].split())
|
||||||
|
|
||||||
ci['test'] = True
|
ci['test'] = True
|
||||||
if 'TEST' in os.environ and os.environ['TEST'].lower() == 'no':
|
if 'TEST' in os.environ and os.environ['TEST'].lower() == 'no':
|
||||||
ci['test'] = False
|
ci['test'] = False
|
||||||
@@ -79,8 +82,14 @@ def detect_context():
|
|||||||
if 'PARALLEL_MAKE' in os.environ:
|
if 'PARALLEL_MAKE' in os.environ:
|
||||||
ci['parallel_make'] = os.environ['PARALLEL_MAKE']
|
ci['parallel_make'] = os.environ['PARALLEL_MAKE']
|
||||||
|
|
||||||
logger.debug('Detected a build hosted on %s, using %s on %s (%s) configured as %s (test: %s)',
|
ci['clean_deps'] = True
|
||||||
ci['service'], ci['compiler'], ci['os'], ci['platform'], ci['configuration'], ci['test'])
|
if 'CLEAN_DEPS' in os.environ and os.environ['CLEAN_DEPS'].lower() == 'no':
|
||||||
|
ci['clean_deps'] = False
|
||||||
|
|
||||||
|
logger.debug('Detected a build hosted on %s, using %s on %s (%s) configured as %s '
|
||||||
|
+ '(test: %s, clean_deps: %s)',
|
||||||
|
ci['service'], ci['compiler'], ci['os'], ci['platform'], ci['configuration'],
|
||||||
|
ci['test'], ci['clean_deps'])
|
||||||
|
|
||||||
|
|
||||||
curdir = os.getcwd()
|
curdir = os.getcwd()
|
||||||
@@ -120,6 +129,7 @@ def clear_lists():
|
|||||||
ci['configuration'] = '<unknown>'
|
ci['configuration'] = '<unknown>'
|
||||||
ci['scriptsdir'] = ''
|
ci['scriptsdir'] = ''
|
||||||
ci['choco'] = ['make']
|
ci['choco'] = ['make']
|
||||||
|
ci['apt'] = []
|
||||||
|
|
||||||
|
|
||||||
clear_lists()
|
clear_lists()
|
||||||
@@ -634,6 +644,21 @@ def setup_for_build(args):
|
|||||||
extra_makeargs.append(os.environ[tag])
|
extra_makeargs.append(os.environ[tag])
|
||||||
|
|
||||||
|
|
||||||
|
def fix_etc_hosts():
|
||||||
|
# Several travis-ci images throw us a curveball in /etc/hosts
|
||||||
|
# by including two entries for localhost. The first for 127.0.1.1
|
||||||
|
# causes epicsSockResolveTest to fail.
|
||||||
|
# cat /etc/hosts
|
||||||
|
# ...
|
||||||
|
# 127.0.1.1 localhost localhost ip4-loopback
|
||||||
|
# 127.0.0.1 localhost nettuno travis vagrant travis-job-....
|
||||||
|
|
||||||
|
logger.debug("EXEC sudo sed -ie '/^127\.0\.1\.1/ s|localhost\s*||g' /etc/hosts")
|
||||||
|
sys.stdout.flush()
|
||||||
|
exitcode = sp.call(['sudo', 'sed', '-ie', '/^127\.0\.1\.1/ s|localhost\s*||g', '/etc/hosts'])
|
||||||
|
logger.debug('EXEC DONE')
|
||||||
|
|
||||||
|
|
||||||
def prepare(args):
|
def prepare(args):
|
||||||
host_info()
|
host_info()
|
||||||
|
|
||||||
@@ -654,6 +679,9 @@ def prepare(args):
|
|||||||
|
|
||||||
logger.debug('Effective module list: %s', modlist())
|
logger.debug('Effective module list: %s', modlist())
|
||||||
|
|
||||||
|
if ci['service'] == 'travis' and ci['os'] == 'linux':
|
||||||
|
fix_etc_hosts()
|
||||||
|
|
||||||
# we're working with tags (detached heads) a lot: suppress advice
|
# we're working with tags (detached heads) a lot: suppress advice
|
||||||
call_git(['config', '--global', 'advice.detachedHead', 'false'])
|
call_git(['config', '--global', 'advice.detachedHead', 'false'])
|
||||||
|
|
||||||
@@ -816,6 +844,11 @@ USR_CXXFLAGS += {0}'''.format(os.environ['USR_CXXFLAGS'])
|
|||||||
sp.check_call(['choco', 'install'] + ci['choco'])
|
sp.check_call(['choco', 'install'] + ci['choco'])
|
||||||
fold_end('install.choco', 'Installing CHOCO packages')
|
fold_end('install.choco', 'Installing CHOCO packages')
|
||||||
|
|
||||||
|
if ci['os'] == 'linux' and ci['apt']:
|
||||||
|
fold_start('install.apt', 'Installing APT packages')
|
||||||
|
sp.check_call(['sudo', 'apt-get', '-y', 'install'] + ci['apt'])
|
||||||
|
fold_end('install.apt', 'Installing APT packages')
|
||||||
|
|
||||||
if ci['os'] == 'linux' and 'RTEMS' in os.environ:
|
if ci['os'] == 'linux' and 'RTEMS' in os.environ:
|
||||||
tar_name = 'i386-rtems{0}-trusty-20171203-{0}.tar.bz2'.format(os.environ['RTEMS'])
|
tar_name = 'i386-rtems{0}-trusty-20171203-{0}.tar.bz2'.format(os.environ['RTEMS'])
|
||||||
print('Downloading RTEMS {0} cross compiler: {1}'
|
print('Downloading RTEMS {0} cross compiler: {1}'
|
||||||
@@ -854,6 +887,8 @@ USR_CXXFLAGS += {0}'''.format(os.environ['USR_CXXFLAGS'])
|
|||||||
place = places[setup[mod + "_VARNAME"]]
|
place = places[setup[mod + "_VARNAME"]]
|
||||||
print('{0}Building dependency {1} in {2}{3}'.format(ANSI_YELLOW, mod, place, ANSI_RESET))
|
print('{0}Building dependency {1} in {2}{3}'.format(ANSI_YELLOW, mod, place, ANSI_RESET))
|
||||||
call_make(cwd=place, silent=silent_dep_builds)
|
call_make(cwd=place, silent=silent_dep_builds)
|
||||||
|
if ci['clean_deps']:
|
||||||
|
call_make(args=['clean'], cwd=place, silent=silent_dep_builds)
|
||||||
fold_end('build.dependencies', 'Build missing/outdated dependencies')
|
fold_end('build.dependencies', 'Build missing/outdated dependencies')
|
||||||
|
|
||||||
print('{0}Dependency module information{1}'.format(ANSI_CYAN, ANSI_RESET))
|
print('{0}Dependency module information{1}'.format(ANSI_CYAN, ANSI_RESET))
|
||||||
@@ -876,7 +911,7 @@ USR_CXXFLAGS += {0}'''.format(os.environ['USR_CXXFLAGS'])
|
|||||||
def build(args):
|
def build(args):
|
||||||
setup_for_build(args)
|
setup_for_build(args)
|
||||||
fold_start('build.module', 'Build the main module')
|
fold_start('build.module', 'Build the main module')
|
||||||
call_make(args.makeargs)
|
call_make(args.makeargs, use_extra=True)
|
||||||
fold_end('build.module', 'Build the main module')
|
fold_end('build.module', 'Build the main module')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user