From 84e678e9ff68c1242b02c59d43387582614dcc66 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 8 Jul 2018 19:08:29 -0700 Subject: [PATCH] TravisCI armv6hf build (aka Raspberry Pi build) --- .prepare_deploy | 10 +++++++++- .travis.yml | 11 +++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.prepare_deploy b/.prepare_deploy index 6997b94..dcf0346 100755 --- a/.prepare_deploy +++ b/.prepare_deploy @@ -27,7 +27,7 @@ do zip "${file%.*}.zip" README.txt LICENSE.txt "$file" done -for file in *.linux +for file in *.linux-x86_64 do base="${file%.*}" cp "$file" "shellcheck" @@ -35,6 +35,14 @@ do rm "shellcheck" done +for file in *.linux-armv6hf +do + base="${file%.*}" + cp "$file" "shellcheck" + tar -cJf "$base.linux.armv6hf.tar.xz" --transform="s:^:$base/:" README.txt LICENSE.txt shellcheck + rm "shellcheck" +done + for file in ./* do sha512sum "$file" > "$file.sha512sum" diff --git a/.travis.yml b/.travis.yml index d22f507..8a86307 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,18 +30,21 @@ script: - docker rm "$id" - ls -l shellcheck - ./shellcheck myscript - - for tag in $TAGS; do cp "shellcheck" "deploy/shellcheck-$tag.linux"; done + - for tag in $TAGS; do cp "shellcheck" "deploy/shellcheck-$tag.linux-x86_64"; done # Linux Alpine based Docker image - name="$DOCKER_BASE-alpine" - DOCKER_BUILDS="$DOCKER_BUILDS $name" - sed -e '/DELETE-MARKER/,$d' Dockerfile > Dockerfile.alpine - docker build -f Dockerfile.alpine -t "$name:current" . - docker run "$name:current" sh -c 'shellcheck --version' + # Linux armv6hf static executable + - docker run -v "$PWD:/mnt" koalaman/armv6hf-builder -c 'compile-shellcheck' + - for tag in $TAGS; do cp "shellcheck" "deploy/shellcheck-$tag.linux-armv6hf"; done + - rm -f shellcheck || true # Windows .exe - - docker pull koalaman/winghc - - docker run --user="$UID" --rm -v "$PWD:/appdata" koalaman/winghc cuib + - docker run --user="$UID" -v "$PWD:/appdata" koalaman/winghc cuib - for tag in $TAGS; do cp "dist/build/ShellCheck/shellcheck.exe" "deploy/shellcheck-$tag.exe"; done - - rm -rf dist || true + - rm -rf dist shellcheck || true # Misc packaging - ./.prepare_deploy