зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1085620 part3: Add emulator build task. r=lightsofapollo
The "mach ci-build" has a new optional argument called b2g-config. This allows the user to pass the b2g config directory for the target. This argument is necessary for emulator and phone builds. --HG-- extra : rebase_source : 40724b5d1b9b33961180e2a019a7237ca13410b4 extra : source : c20ec1fd15670422f517c352c388bd036c454fb6
This commit is contained in:
Родитель
ec6d8af21f
Коммит
7fb5abde92
|
@ -15,9 +15,15 @@ if [ ! -d mozharness ]; then
|
|||
hg clone https://hg.mozilla.org/build/mozharness mozharness
|
||||
fi
|
||||
|
||||
OBJDIR=$HOME/object-folder
|
||||
mkdir -p $OBJDIR
|
||||
git clone https://git.mozilla.org/b2g/B2G.git $OBJDIR/B2G
|
||||
OBJDIR="$HOME/object-folder-$B2G_CONFIG-$B2G_DEBUG"
|
||||
|
||||
if [ ! -d $OBJDIR ]; then
|
||||
mkdir -p $OBJDIR
|
||||
fi
|
||||
|
||||
if [ ! -d $OBJDIR/B2G ]; then
|
||||
git clone https://git.mozilla.org/b2g/B2G.git $OBJDIR/B2G
|
||||
fi
|
||||
|
||||
./mozharness/scripts/b2g_build.py \
|
||||
--config b2g/taskcluster-emulator.py \
|
||||
|
|
|
@ -213,11 +213,13 @@ class CIBuild(object):
|
|||
help='revision in gecko to use in sub tasks')
|
||||
@CommandArgument('--repository',
|
||||
help='full path to hg repository to use in sub tasks')
|
||||
@CommandArgument('--b2g-config',
|
||||
help='(emulators/phones only) in tree build configuration directory')
|
||||
@CommandArgument('--owner',
|
||||
help='email address of who owns this graph')
|
||||
@CommandArgument('build_task',
|
||||
help='path to build task definition')
|
||||
def create_ci_build(self, build_task, revision="", repository="", owner=""):
|
||||
def create_ci_build(self, build_task, revision="", repository="", b2g_config="", owner=""):
|
||||
# TODO handle git repos
|
||||
if not repository:
|
||||
repository = get_hg_url()
|
||||
|
@ -229,6 +231,9 @@ class CIBuild(object):
|
|||
'docker_image': docker_image,
|
||||
'repository': repository,
|
||||
'revision': revision,
|
||||
'b2g-config': b2g_config,
|
||||
'debug': debug,
|
||||
'build-type': 'Debug' if debug else 'Opt',
|
||||
'owner': owner,
|
||||
'from_now': json_time_from_now,
|
||||
'now': current_json_time()
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
taskId: {{build_slugid}}
|
||||
task:
|
||||
created: '{{now}}'
|
||||
deadline: '{{#from_now}}24 hours{{/from_now}}'
|
||||
metadata:
|
||||
source: http://todo.com/soon
|
||||
owner: {{owner}}
|
||||
name: B2G Emulator {{build-type}}
|
||||
description: B2G Emulator {{build-type}}
|
||||
|
||||
workerType: b2gbuild
|
||||
provisionerId: aws-provisioner
|
||||
|
||||
scopes:
|
||||
- 'docker-worker:cache:build-emulator-objects'
|
||||
|
||||
payload:
|
||||
cache:
|
||||
build-emulator-objects: '/home/worker/object-folder-{{b2g-config}}-{{debug}}'
|
||||
|
||||
env:
|
||||
TARGET: 'emulator'
|
||||
B2G_CONFIG: '{{b2g-config}}'
|
||||
# revision/project params defined originally here https://github.com/taskcluster/taskcluster-try/blob/master/try/instantiate.js
|
||||
REVISION: '{{revision}}'
|
||||
REPOSITORY: '{{repository}}'
|
||||
|
||||
image: '{{#docker_image}}builder{{/docker_image}}'
|
||||
maxRunTime: 7200
|
||||
|
||||
command:
|
||||
- build-emulator.sh
|
||||
|
||||
artifacts:
|
||||
'public/build':
|
||||
type: directory
|
||||
path: '/home/worker/artifacts/'
|
||||
expires: '{{#from_now}}1 year{{/from_now}}'
|
||||
|
||||
extra:
|
||||
# Rather then enforcing particular conventions we require that all build
|
||||
# tasks provide the "build" extra field to specify where the build and tests
|
||||
# files are located.
|
||||
locations:
|
||||
build: 'public/build/emulator.tar.gz'
|
||||
tests: ['public/build/b2g-tests.zip', 'public/build/gaia-tests.zip']
|
||||
symbols: 'public/build/b2g-crashreporter-symbols.zip'
|
||||
sources: 'public/build/sources.xml'
|
||||
|
||||
treeherder:
|
||||
symbol: B
|
Загрузка…
Ссылка в новой задаче