DeepSpeech/taskcluster/darwin-opt-base.tyml
2020-02-20 11:46:43 +01:00

126 lines
4.1 KiB
Plaintext

taskId: ${taskcluster.taskId}
provisionerId: ${taskcluster.generic.provisionerId}
workerType: ${taskcluster.generic.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 }
scopes:
$if: '(event.event != "push") && (event.event != "tag")'
then:
- generic-worker:cache:deepspeech-macos-pyenv
payload:
maxRunTime: { $eval: to_int(build.maxRunTime) }
env:
TENSORFLOW_BUILD_ARTIFACT: ${build.tensorflow}
# There is no VM yet running tasks on OSX
# so one should install by hand:
# - brew
# - xcode (brew would install)
# - brew install gnu-tar
# - brew install git
# - brew install pixz
# - brew cask install java
# - sudo easy_install pip
command:
- - "/bin/bash"
- "--login"
- "-cxe"
- >
export TASKCLUSTER_ARTIFACTS="$(pwd)/public/" &&
export TASKCLUSTER_ORIG_TASKDIR="$(pwd)" && cd ../tc-workdir/ &&
(mv $TASKCLUSTER_ORIG_TASKDIR/pyenv.cache/ pyenv.cache/ || true) &&
export TASKCLUSTER_TASK_DIR="$(pwd)" &&
export LC_ALL=C &&
export MACOSX_DEPLOYMENT_TARGET=10.10 &&
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/ &&
export HOMEBREW_NO_AUTO_UPDATE=1 &&
env &&
trap "export TASKCLUSTER_TASK_EXIT_CODE=$? &&
(mv $TASKCLUSTER_TASK_DIR/pyenv.cache/ $TASKCLUSTER_ORIG_TASKDIR/pyenv.cache/ || true) &&
cd $TASKCLUSTER_ORIG_TASKDIR/ && rm -fr $TASKCLUSTER_TASK_DIR/ &&
exit $TASKCLUSTER_TASK_EXIT_CODE" 0 &&
(pixz -d < $TASKCLUSTER_ORIG_TASKDIR/home.tar.xz | gtar -C $TASKCLUSTER_TASK_DIR -xf - ) &&
git clone --quiet ${event.head.repo.url} $TASKCLUSTER_TASK_DIR/DeepSpeech/ds/ &&
cd $TASKCLUSTER_TASK_DIR/DeepSpeech/ds && git checkout --quiet ${event.head.sha} &&
ln -s $TASKCLUSTER_TASK_DIR/DeepSpeech/ds/native_client/ $TASKCLUSTER_TASK_DIR/DeepSpeech/tf/native_client &&
cd $TASKCLUSTER_TASK_DIR &&
$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/${build.scripts.build} &&
$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/${build.scripts.package}
artifacts:
- type: "directory"
path: "public/"
expires:
$if: '(event.event == "push") || (event.event == "tag")'
then: { $fromNow: '6 months' }
else: { $fromNow: '7 days' }
mounts:
$if: '(event.event != "push") && (event.event != "tag")'
then:
- cacheName: deepspeech-macos-pyenv
directory: pyenv.cache/
- directory: ${system.homedir.osx}/Library/Caches/node-gyp/
format: tar.gz
content:
url: ${system.node_gyp_cache.url}
- directory: ds-swig
format: tar.gz
content:
url: ${system.swig.cache.darwin_amd64}
- file: home.tar.xz
content:
url: ${build.tensorflow}
- directory: ../tc-workdir/homebrew-builds
format: tar.gz
content:
url: ${system.homebrew_builds.url}
else:
- directory: ${system.homedir.osx}/Library/Caches/node-gyp/
format: tar.gz
content:
url: ${system.node_gyp_cache.url}
- directory: ds-swig
format: tar.gz
content:
url: ${system.swig.cache.darwin_amd64}
- file: home.tar.xz
content:
url: ${build.tensorflow}
- directory: ../tc-workdir/homebrew-builds
format: tar.gz
content:
url: ${system.homebrew_builds.url}
metadata:
name: ${build.metadata.name}
description: ${build.metadata.description}
owner: ${event.head.user.email}
source: ${event.head.repo.url}