From 4a65b58772ff8a6fc822a8c875b9df8f4ae3b01d Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 26 Mar 2020 15:50:32 -0500 Subject: [PATCH] Fix arm builds --- .travis.yml | 2 ++ ci/image/run.sh | 13 +++++++++++++ ci/release.sh | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index deecc893..0cf1b572 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,6 +47,8 @@ deploy: local_dir: release-upload on: tags: true + # TODO: The gcs provider fails to install on arm64. + condition: $TRAVIS_CPU_ARCH = amd64 cache: timeout: 600 diff --git a/ci/image/run.sh b/ci/image/run.sh index 6a1831b0..f9810d41 100755 --- a/ci/image/run.sh +++ b/ci/image/run.sh @@ -5,9 +5,22 @@ set -euo pipefail main() { cd "$(dirname "$0")/../.." + # This, strangely enough, fixes the arm build being terminated for not having + # output on Travis. It's as if output is buffered and only displayed once a + # certain amount is collected. Five seconds didn't work but one second seems + # to generate enough output to make it work. + local pid + while true; do + echo 'Still running...' + sleep 1 + done & + pid=$! + docker build ci/image imageTag="$(docker build -q ci/image)" docker run -t --rm -e CI -e GITHUB_TOKEN -e TRAVIS_TAG -v "$(yarn cache dir):/usr/local/share/.cache/yarn/v6" -v "$PWD:/repo" -w /repo "$imageTag" "$*" + + kill $pid } main "$@" diff --git a/ci/release.sh b/ci/release.sh index 864ca5bb..86b89177 100755 --- a/ci/release.sh +++ b/ci/release.sh @@ -17,7 +17,7 @@ function package() { fi local arch - arch="$(uname -m)" + arch=$(uname -m | sed 's/aarch/arm/') echo -n "Creating release..."