2017-06-21 00:23:13 +00:00
|
|
|
dist: trusty
|
|
|
|
sudo: false
|
|
|
|
|
2015-10-28 02:20:37 +00:00
|
|
|
language: php
|
2017-06-21 00:23:13 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache/files
|
|
|
|
|
|
|
|
jobs:
|
2017-06-12 18:11:04 +00:00
|
|
|
include:
|
2017-06-21 00:23:13 +00:00
|
|
|
# Test stage
|
2017-06-12 18:11:04 +00:00
|
|
|
- php: 5.3
|
|
|
|
dist: precise
|
2017-06-21 00:23:13 +00:00
|
|
|
- php: 5.4
|
|
|
|
- php: 5.5
|
|
|
|
- php: 5.6
|
|
|
|
- php: 7.0
|
|
|
|
- php: 7.1
|
2017-11-25 20:47:20 +00:00
|
|
|
- php: 7.2
|
2017-06-21 00:23:13 +00:00
|
|
|
- php: nightly
|
|
|
|
- php: hhvm
|
|
|
|
- php: hhvm-nightly
|
|
|
|
|
|
|
|
# Deployment stage
|
|
|
|
- stage: deploy
|
2017-11-05 01:36:50 +00:00
|
|
|
sudo: required
|
2017-06-21 00:23:13 +00:00
|
|
|
install:
|
|
|
|
- '[ "$TRAVIS_PULL_REQUEST" == "false" ] || travis_terminate 0'
|
2017-11-05 01:36:50 +00:00
|
|
|
- '[ -n "$TRAVIS_TAG" ] || [[ ",$DEPLOY_PHPDOC_BRANCHES," == *,"$TRAVIS_BRANCH",* ]] || travis_terminate 0'
|
|
|
|
- install.sh --deploy
|
2017-06-21 00:23:13 +00:00
|
|
|
script:
|
2017-11-05 01:36:50 +00:00
|
|
|
- deploy.sh
|
2017-06-21 00:23:13 +00:00
|
|
|
before_deploy:
|
2018-03-29 20:48:24 +00:00
|
|
|
- '[ "$TRAVIS_TAG" == "v$(php -r "require_once(\"lib/Pico.php\"); echo Pico::VERSION;")" ]'
|
2018-04-07 20:14:14 +00:00
|
|
|
- create-release.sh "$TRAVIS_BUILD_DIR/pico-release-$TRAVIS_TAG.tar.gz"
|
2017-06-21 00:23:13 +00:00
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key: ${GITHUB_OAUTH_TOKEN}
|
|
|
|
file: pico-release-$TRAVIS_TAG.tar.gz
|
|
|
|
skip_cleanup: true
|
2018-07-01 13:22:40 +00:00
|
|
|
tag_name: $TRAVIS_TAG
|
|
|
|
target_commitish: $TRAVIS_COMMIT
|
2018-07-29 10:47:06 +00:00
|
|
|
name: Version ${TRAVIS_TAG:1}
|
2017-10-28 20:53:25 +00:00
|
|
|
draft: true
|
2017-11-05 01:36:50 +00:00
|
|
|
on:
|
|
|
|
tags: true
|
2017-06-21 00:23:13 +00:00
|
|
|
|
|
|
|
# Ignore nightly build failures
|
2015-11-25 19:04:46 +00:00
|
|
|
allow_failures:
|
|
|
|
- php: nightly
|
2016-10-11 16:21:14 +00:00
|
|
|
- php: hhvm-nightly
|
2015-11-25 19:04:46 +00:00
|
|
|
fast-finish: true
|
|
|
|
|
2017-06-13 23:44:09 +00:00
|
|
|
before_install:
|
2017-12-02 16:17:41 +00:00
|
|
|
- export PATH="$TRAVIS_BUILD_DIR/.build:$PATH"
|
|
|
|
- export PICO_TOOLS_DIR="$HOME/__picocms_tools"
|
|
|
|
- git clone --branch="$TOOLS_REPO_BRANCH" "https://github.com/$TOOLS_REPO_SLUG.git" "$PICO_TOOLS_DIR"
|
|
|
|
- . "$PICO_TOOLS_DIR/init/travis.sh.inc"
|
2017-06-13 23:44:09 +00:00
|
|
|
|
2015-11-25 19:39:49 +00:00
|
|
|
install:
|
2017-06-13 23:44:09 +00:00
|
|
|
- install.sh
|
2015-11-25 19:39:49 +00:00
|
|
|
|
|
|
|
before_script:
|
2017-06-13 23:44:09 +00:00
|
|
|
- export PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
|
2015-11-25 19:39:49 +00:00
|
|
|
|
2015-10-28 02:20:37 +00:00
|
|
|
script:
|
2015-11-29 20:55:55 +00:00
|
|
|
- phpcs --standard=.phpcs.xml "$TRAVIS_BUILD_DIR"
|