98 lines
3.1 KiB
YAML
98 lines
3.1 KiB
YAML
language: shell
|
|
os: linux
|
|
|
|
services:
|
|
- docker
|
|
|
|
jobs:
|
|
include:
|
|
- stage: Build
|
|
# This must weirdly not have a dash, otherwise an empty job is created
|
|
env: BUILD=linux
|
|
workspaces:
|
|
create:
|
|
name: ws-linux
|
|
paths: deploy
|
|
- env: BUILD=windows
|
|
workspaces:
|
|
create:
|
|
name: ws-windows
|
|
paths: deploy
|
|
- env: BUILD=armv6hf
|
|
workspaces:
|
|
create:
|
|
name: ws-armv6hf
|
|
paths: deploy
|
|
- env: BUILD=aarch64
|
|
workspaces:
|
|
create:
|
|
name: ws-aarch64
|
|
paths: deploy
|
|
- env: BUILD=osx
|
|
os: osx
|
|
workspaces:
|
|
create:
|
|
name: ws-osx
|
|
paths: deploy
|
|
|
|
- stage: Upload Artifacts to GitHub
|
|
workspaces:
|
|
use:
|
|
- ws-osx
|
|
- ws-linux
|
|
- ws-armv6hf
|
|
- ws-aarch64
|
|
- ws-windows
|
|
script:
|
|
- ls -la ${CASHER_DIR}/ || true
|
|
# Kludge broken TravisCI workspaces
|
|
- tar -xvf ${CASHER_DIR}/ws-osx-fetch.tgz --strip-components=5
|
|
- ls -la deploy
|
|
- ./.github_deploy
|
|
|
|
- stage: Deploy docker image
|
|
# Deploy only for pushes to master branch, not other branches, not PRs.
|
|
if: type = push
|
|
script:
|
|
- source ./.multi_arch_docker
|
|
- set -ex; multi_arch_docker::main; set +x
|
|
|
|
# This is in global context and runs for every stage that doesn't override it.
|
|
before_install: |
|
|
DOCKER_BASE="$DOCKER_USERNAME/shellcheck"
|
|
DOCKER_BUILDS=""
|
|
export TAGS=""
|
|
test "$TRAVIS_BRANCH" = master && TAGS="$TAGS latest" || true
|
|
test -n "$TRAVIS_TAG" && TAGS="$TAGS stable $TRAVIS_TAG" || true
|
|
echo "Tags are $TAGS"
|
|
|
|
# This is in global context and runs for every stage that doesn't override it.
|
|
script:
|
|
- mkdir -p deploy
|
|
- source ./.compile_binaries
|
|
- ./striptests
|
|
- set -ex; build_"$BUILD"; set +x;
|
|
- ./.prepare_deploy
|
|
|
|
# This is in global context and runs for every stage that doesn't override it.
|
|
after_failure: |
|
|
id
|
|
pwd
|
|
df -h
|
|
find . -name '*.log' -type f -exec grep "" /dev/null {} +
|
|
find . -ls
|
|
|
|
# This is in global context and runs for every stage that doesn't override it.
|
|
deploy:
|
|
provider: gcs
|
|
skip_cleanup: true
|
|
access_key_id: GOOG7MDN7WEH6IIGBDCA
|
|
secret_access_key:
|
|
secure: Bcx2cT0/E2ikj7sdamVq52xlLZF9dz9ojGPtoKfPyQhkkZa+McVI4xgUSuyyoSxyKj77sofx2y8m6PJYYumT4g5hREV1tfeUkl0J2DQFMbGDYEt7kxVkXCxojNvhHwTzLFv0ezstrxWWxQm81BfQQ4U9lggRXtndAP4czZnOeHPINPSiue1QNwRAEw05r5UoIUJXy/5xyUrjIxn381pAs+gJqP2COeN9kTKYH53nS/AAws29RprfZFnPlo7xxWmcjRcdS5KPdGXI/c6tQp5zl2iTh510VC1PN2w1Wvnn/oNWhiNdqPyVDsojIX5+sS3nejzJA+KFMxXSBlyXIY3wPpS/MdscU79X6Q5f9ivsFfsm7gNBmxHUPNn0HAvU4ROT/CCE9j6jSbs5PC7QBo3CK4++jxAwE/pd9HUc2rs3k0ofx3rgveJ7txpy5yPKfwIIBi98kVKlC4w7dLvNTOfjW1Imt2yH87XTfsE0UIG9st1WII6s4l/WgBx2GuwKdt6+3QUYiAlCFckkxWi+fAvpHZUEL43Qxub5fN+ZV7Zib1n7opchH4QKGBb6/y0WaDCmtCfu0lppoe/TH6saOTjDFj67NJSElK6ZDxGZ3uw4R+ret2gm6WRKT2Oeub8J33VzSa7VkmFpMPrAAfPa9N1Z4ewBLoTmvxSg2A0dDrCdJio=
|
|
bucket: shellcheck-private
|
|
local_dir: deploy
|
|
on:
|
|
repo: koalaman/shellcheck
|
|
condition: $TRAVIS_BUILD_STAGE_NAME = Build
|
|
all_branches: true
|