зеркало из https://github.com/mozilla/DeepSpeech.git
67 строки
2.7 KiB
Plaintext
67 строки
2.7 KiB
Plaintext
$if: 'event.event in build.allowed'
|
|
then:
|
|
taskId: ${taskcluster.taskId}
|
|
provisionerId: ${taskcluster.docker.provisionerId}
|
|
workerType: ${taskcluster.docker.workerType}
|
|
taskGroupId: ${taskcluster.taskGroupId}
|
|
schedulerId: ${taskcluster.schedulerId}
|
|
dependencies:
|
|
$map: { $eval: build.dependencies }
|
|
each(b):
|
|
$eval: as_slugid(b)
|
|
created: { $fromNow: '0 sec' }
|
|
deadline: { $fromNow: '1 day' }
|
|
expires:
|
|
$if: '(event.event == "push") || (event.event == "tag")'
|
|
then: { $fromNow: '6 months' }
|
|
else: { $fromNow: '7 days' }
|
|
|
|
extra:
|
|
nc_asset_name: { $eval: build.nc_asset_name }
|
|
github:
|
|
$if: '(event.event == "push") || (event.event == "tag")'
|
|
then: { $eval: taskcluster.github_events.merge }
|
|
else: { $eval: taskcluster.github_events.pull_request }
|
|
|
|
routes:
|
|
$if: '(event.event == "push") || (event.event == "tag")'
|
|
then:
|
|
{ $eval: build.routes }
|
|
|
|
payload:
|
|
maxRunTime: { $eval: to_int(build.maxRunTime) }
|
|
image: "ubuntu:14.04"
|
|
|
|
command:
|
|
- "/bin/bash"
|
|
- "--login"
|
|
- "-cxe"
|
|
- $let:
|
|
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
|
|
extraSystemConfig: { $eval: strip(str(build.system_config)) }
|
|
in: >
|
|
apt-get -qq -y remove --purge ubuntu-advantage-tools &&
|
|
${aptEc2Mirrors} &&
|
|
adduser --system --home ${system.homedir.linux} ${system.username} &&
|
|
apt-get -qq update && apt-get -qq -y install realpath git wget curl make && ${extraSystemSetup} &&
|
|
cd ${system.homedir.linux}/ &&
|
|
echo -e "#!/bin/bash\nset -xe\n env && id && git clone --quiet ${event.head.repo.url} ~/DeepSpeech/ds/ && cd ~/DeepSpeech/ds && git checkout --quiet ${event.head.sha} && mkdir -p ~/DeepSpeech/tf/ && touch ~/DeepSpeech/tf/tc-vars.sh && chmod +x ~/DeepSpeech/tf/tc-vars.sh && mkdir -p ${system.homedir.linux}/.cache/node-gyp/ && wget -O - ${system.node_gyp_cache.url} | tar -C ${system.homedir.linux}/.cache/node-gyp/ -xzf -" > /tmp/clone.sh && chmod +x /tmp/clone.sh &&
|
|
sudo -H -u ${system.username} /bin/bash /tmp/clone.sh && ${extraSystemConfig} &&
|
|
sudo -H -u ${system.username} --preserve-env /bin/bash ${system.homedir.linux}/DeepSpeech/ds/${build.scripts.build} &&
|
|
sudo -H -u ${system.username} /bin/bash ${system.homedir.linux}/DeepSpeech/ds/${build.scripts.package}
|
|
|
|
artifacts:
|
|
"public":
|
|
type: "directory"
|
|
path: "/tmp/artifacts/"
|
|
expires:
|
|
$if: '(event.event == "push") || (event.event == "tag")'
|
|
then: { $fromNow: '6 months' }
|
|
else: { $fromNow: '7 days' }
|
|
|
|
metadata:
|
|
name: ${build.metadata.name}
|
|
description: ${build.metadata.description}
|
|
owner: ${event.head.user.email}
|
|
source: ${event.head.repo.url}
|