Avoid task_TIMESTAMP use on macOS generic-worker
This commit is contained in:
parent
c7e6759293
commit
32a75d1d9d
@ -79,54 +79,16 @@ payload:
|
|||||||
- "-cxe"
|
- "-cxe"
|
||||||
- >
|
- >
|
||||||
export TASKCLUSTER_ARTIFACTS="$(pwd)/public/" &&
|
export TASKCLUSTER_ARTIFACTS="$(pwd)/public/" &&
|
||||||
|
export TASKCLUSTER_ORIG_TASKDIR="$(pwd)" &&
|
||||||
|
(mkdir ../tc-workdir/ || rm -fr ../tc-workdir/*) && cd ../tc-workdir/ &&
|
||||||
|
(mv $TASKCLUSTER_ORIG_TASKDIR/homebrew/ homebrew/ || true) &&
|
||||||
|
(mv $TASKCLUSTER_ORIG_TASKDIR/homebrew.cache/ homebrew.cache/ || true) &&
|
||||||
export TASKCLUSTER_TASK_DIR="$(pwd)" &&
|
export TASKCLUSTER_TASK_DIR="$(pwd)" &&
|
||||||
export LC_ALL=C &&
|
export LC_ALL=C &&
|
||||||
export TASKCLUSTER_ORIGIN_PATH="${system.homedir.osx}/TaskCluster/.*/task_[[:digit:]]\{10\}" &&
|
|
||||||
export TASKCLUSTER_REWRITE_PATH="$TASKCLUSTER_TASK_DIR" &&
|
|
||||||
export PKG_CONFIG_PATH="$TASKCLUSTER_TASK_DIR/homebrew/lib/pkgconfig" &&
|
export PKG_CONFIG_PATH="$TASKCLUSTER_TASK_DIR/homebrew/lib/pkgconfig" &&
|
||||||
export MACOSX_DEPLOYMENT_TARGET=10.10 &&
|
export MACOSX_DEPLOYMENT_TARGET=10.10 &&
|
||||||
env &&
|
env &&
|
||||||
(
|
(wget -O - $TENSORFLOW_BUILD_ARTIFACT | pixz -d | gtar -C $TASKCLUSTER_TASK_DIR -xf - ) &&
|
||||||
(
|
|
||||||
for link in $(find -L "$TASKCLUSTER_TASK_DIR/homebrew/" -type l);
|
|
||||||
do
|
|
||||||
newloc=$(readlink "$link" | sed -e "s|$TASKCLUSTER_ORIGIN_PATH|$TASKCLUSTER_REWRITE_PATH|g");
|
|
||||||
ln -hfs "$newloc" "$link";
|
|
||||||
done) || true) &&
|
|
||||||
(
|
|
||||||
(
|
|
||||||
for lib in $(find "$TASKCLUSTER_TASK_DIR/homebrew/" -type f -name "*.dylib");
|
|
||||||
do
|
|
||||||
chmod +w "$lib";
|
|
||||||
for id in $(otool -D "$lib" | grep "$TASKCLUSTER_ORIGIN_PATH");
|
|
||||||
do
|
|
||||||
newid=$(echo $id | sed -e "s|$TASKCLUSTER_ORIGIN_PATH|$TASKCLUSTER_REWRITE_PATH|g");
|
|
||||||
install_name_tool -id "$newid" "$lib";
|
|
||||||
done;
|
|
||||||
|
|
||||||
for dep in $(otool -L "$lib" | awk '{ print $1 }' | grep "$TASKCLUSTER_ORIGIN_PATH");
|
|
||||||
do
|
|
||||||
newdep=$(echo $dep | sed -e "s|$TASKCLUSTER_ORIGIN_PATH|$TASKCLUSTER_REWRITE_PATH|g");
|
|
||||||
install_name_tool -change "$dep" "$newdep" "$lib";
|
|
||||||
done;
|
|
||||||
chmod -w "$lib";
|
|
||||||
otool -L "$lib";
|
|
||||||
done) || true) &&
|
|
||||||
(
|
|
||||||
(
|
|
||||||
for bin in $(find "$TASKCLUSTER_TASK_DIR/homebrew/" -perm +111 -type f);
|
|
||||||
do
|
|
||||||
chmod +w "$bin";
|
|
||||||
for dep in $(otool -L "$bin" | awk '{ print $1 }' | grep "$TASKCLUSTER_ORIGIN_PATH");
|
|
||||||
do
|
|
||||||
newdep=$(echo $dep | sed -e "s|$TASKCLUSTER_ORIGIN_PATH|$TASKCLUSTER_REWRITE_PATH|g");
|
|
||||||
install_name_tool -change "$dep" "$newdep" "$bin";
|
|
||||||
done;
|
|
||||||
chmod -w "$bin";
|
|
||||||
otool -L "$bin";
|
|
||||||
done) || true) &&
|
|
||||||
(wget -O - $TENSORFLOW_BUILD_ARTIFACT | pixz -d | gtar -C $TASKCLUSTER_TASK_DIR --transform "s|$TASKCLUSTER_ORIGIN_PATH|$TASKCLUSTER_REWRITE_PATH|g" -xf - ) &&
|
|
||||||
((grep -R -I --files-with-matches "$TASKCLUSTER_ORIGIN_PATH" $TASKCLUSTER_TASK_DIR | grep -v "$TASKCLUSTER_TASK_DIR/generic-worker/" | xargs -n 1 -P 16 sed -i '' -e "s|$TASKCLUSTER_ORIGIN_PATH|$TASKCLUSTER_REWRITE_PATH|g") || true) &&
|
|
||||||
git clone --quiet ${event.head.repo.url} $TASKCLUSTER_TASK_DIR/DeepSpeech/ds/ &&
|
git clone --quiet ${event.head.repo.url} $TASKCLUSTER_TASK_DIR/DeepSpeech/ds/ &&
|
||||||
cd $TASKCLUSTER_TASK_DIR/DeepSpeech/ds && git checkout --quiet ${event.head.sha} &&
|
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 &&
|
ln -s $TASKCLUSTER_TASK_DIR/DeepSpeech/ds/native_client/ $TASKCLUSTER_TASK_DIR/DeepSpeech/tf/native_client &&
|
||||||
@ -134,7 +96,10 @@ payload:
|
|||||||
$TASKCLUSTER_TASK_DIR/DeepSpeech/tf/tc-brew.sh &&
|
$TASKCLUSTER_TASK_DIR/DeepSpeech/tf/tc-brew.sh &&
|
||||||
${swig.patch_nodejs.osx} &&
|
${swig.patch_nodejs.osx} &&
|
||||||
$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/${build.scripts.build} &&
|
$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/${build.scripts.build} &&
|
||||||
$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/${build.scripts.package}
|
$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/${build.scripts.package} ;
|
||||||
|
mv $TASKCLUSTER_TASK_DIR/homebrew/ $TASKCLUSTER_ORIG_TASKDIR/homebrew/ &&
|
||||||
|
mv $TASKCLUSTER_TASK_DIR/homebrew.cache/ $TASKCLUSTER_ORIG_TASKDIR/homebrew.cache/ &&
|
||||||
|
cd $TASKCLUSTER_TASK_DIR/../ && rm -fr tc-workdir/
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- type: "directory"
|
- type: "directory"
|
||||||
|
@ -23,6 +23,8 @@ then:
|
|||||||
|
|
||||||
scopes: [
|
scopes: [
|
||||||
"queue:route:notify.irc-channel.*",
|
"queue:route:notify.irc-channel.*",
|
||||||
|
"generic-worker:cache:deepspeech-homebrew-bin",
|
||||||
|
"generic-worker:cache:deepspeech-homebrew-cache",
|
||||||
]
|
]
|
||||||
|
|
||||||
payload:
|
payload:
|
||||||
@ -49,6 +51,10 @@ then:
|
|||||||
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
|
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
|
||||||
in: >
|
in: >
|
||||||
export TASKCLUSTER_ARTIFACTS="$(pwd)/public/" &&
|
export TASKCLUSTER_ARTIFACTS="$(pwd)/public/" &&
|
||||||
|
export TASKCLUSTER_ORIG_TASKDIR="$(pwd)" &&
|
||||||
|
(mkdir ../tc-workdir/ || rm -fr ../tc-workdir/*) && cd ../tc-workdir/ &&
|
||||||
|
(mv $TASKCLUSTER_ORIG_TASKDIR/homebrew/ homebrew/ || true) &&
|
||||||
|
(mv $TASKCLUSTER_ORIG_TASKDIR/homebrew.cache/ homebrew.cache/ || true) &&
|
||||||
export TASKCLUSTER_TASK_DIR="$(pwd)" &&
|
export TASKCLUSTER_TASK_DIR="$(pwd)" &&
|
||||||
export TASKCLUSTER_TMP_DIR="$TASKCLUSTER_TASK_DIR/tmp" &&
|
export TASKCLUSTER_TMP_DIR="$TASKCLUSTER_TASK_DIR/tmp" &&
|
||||||
export LC_ALL=C &&
|
export LC_ALL=C &&
|
||||||
@ -59,7 +65,16 @@ then:
|
|||||||
cd $TASKCLUSTER_TASK_DIR/DeepSpeech/ds && git checkout --quiet ${event.head.sha} &&
|
cd $TASKCLUSTER_TASK_DIR/DeepSpeech/ds && git checkout --quiet ${event.head.sha} &&
|
||||||
cd $TASKCLUSTER_TASK_DIR &&
|
cd $TASKCLUSTER_TASK_DIR &&
|
||||||
source $TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-brew-tests.sh && ${extraSystemSetup} &&
|
source $TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-brew-tests.sh && ${extraSystemSetup} &&
|
||||||
/bin/bash ${build.args.tests_cmdline}
|
/bin/bash ${build.args.tests_cmdline} ;
|
||||||
|
mv $TASKCLUSTER_TASK_DIR/homebrew/ $TASKCLUSTER_ORIG_TASKDIR/homebrew/ &&
|
||||||
|
mv $TASKCLUSTER_TASK_DIR/homebrew.cache/ $TASKCLUSTER_ORIG_TASKDIR/homebrew.cache/ &&
|
||||||
|
cd $TASKCLUSTER_TASK_DIR/../ && rm -fr tc-workdir/
|
||||||
|
|
||||||
|
mounts:
|
||||||
|
- cacheName: deepspeech-homebrew-bin
|
||||||
|
directory: homebrew/
|
||||||
|
- cacheName: deepspeech-homebrew-cache
|
||||||
|
directory: homebrew.cache/
|
||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
name: ${build.metadata.name}
|
name: ${build.metadata.name}
|
||||||
|
@ -37,7 +37,7 @@ install_local_homebrew()
|
|||||||
mkdir -p "${LOCAL_HOMEBREW_DIRECTORY}"
|
mkdir -p "${LOCAL_HOMEBREW_DIRECTORY}"
|
||||||
mkdir -p "${HOMEBREW_CACHE}"
|
mkdir -p "${HOMEBREW_CACHE}"
|
||||||
|
|
||||||
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C "${LOCAL_HOMEBREW_DIRECTORY}"
|
curl -L https://github.com/Homebrew/brew/tarball/1.7.7 | tar xz --strip 1 -C "${LOCAL_HOMEBREW_DIRECTORY}"
|
||||||
export PATH=${LOCAL_HOMEBREW_DIRECTORY}/bin:$PATH
|
export PATH=${LOCAL_HOMEBREW_DIRECTORY}/bin:$PATH
|
||||||
|
|
||||||
if [ ! -x "${LOCAL_HOMEBREW_DIRECTORY}/bin/brew" ]; then
|
if [ ! -x "${LOCAL_HOMEBREW_DIRECTORY}/bin/brew" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user