STT/taskcluster/test-android-opt-base.tyml

62 lines
2.6 KiB
Plaintext

$if: '(event.event != "push") && (event.event != "tag")'
then:
taskId: ${taskcluster.taskId}
provisionerId: ${taskcluster.docker.provisionerId}
workerType: ${build.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: { $fromNow: '7 days' }
scopes:
- "docker-worker:capability:device:kvm"
payload:
maxRunTime: { $eval: to_int(build.maxRunTime) }
image: "ubuntu:18.04"
capabilities:
devices:
kvm: true
env:
$let:
training: { $eval: as_slugid(build.test_model_task) }
android_arm64_build: { $eval: as_slugid("android-arm64-cpu-opt") }
android_armv7_build: { $eval: as_slugid("android-armv7-cpu-opt") }
in:
DEEPSPEECH_TEST_MODEL: https://community-tc.services.mozilla.com/api/queue/v1/task/${training}/artifacts/public/output_graph.pb
EXPECTED_TENSORFLOW_VERSION: "${build.tensorflow_git_desc}"
command:
- "/bin/bash"
- "--login"
- "-cxe"
- $let:
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
in: >
apt-get -qq update && apt-get -qq -y install curl git gnupg pixz python-simplejson sox sudo wget unzip software-properties-common xvfb &&
add-apt-repository --yes ppa:openjdk-r/ppa && apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --force-yes install openjdk-8-jdk && java -version && update-ca-certificates -f &&
${extraSystemSetup} && chmod 777 /dev/kvm &&
adduser --system --home ${system.homedir.linux} ${system.username} &&
cd ${system.homedir.linux} &&
echo -e "#!/bin/bash\nset -xe\n env && id && mkdir ~/DeepSpeech/ && git clone --quiet ${event.head.repo.url} ~/DeepSpeech/ds/ && cd ~/DeepSpeech/ds && git checkout --quiet ${event.head.sha} && wget -O - ${build.cache.url} | tar -C ${system.homedir.linux} -xzf - && if [ ! -z "${build.gradle_cache.url}" ]; then wget -O - ${build.gradle_cache.url} | tar -C ${system.homedir.linux}/ -xzf - ; fi;" > /tmp/clone.sh && chmod +x /tmp/clone.sh &&
sudo -H -u ${system.username} /bin/bash /tmp/clone.sh &&
sudo -H -u ${system.username} --preserve-env /bin/bash ${build.args.tests_cmdline}
artifacts:
"public":
type: "directory"
path: "/tmp/artifacts/"
expires: { $fromNow: '7 days' }
metadata:
name: ${build.metadata.name}
description: ${build.metadata.description}
owner: ${event.head.user.email}
source: ${event.head.repo.url}