Pico/.travis.yml

53 lines
2 KiB
YAML

language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7
- hhvm
- nightly
matrix:
allow_failures:
- php: nightly
fast-finish: true
install:
- composer install
before_script:
- export PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
script:
- find . -not \( -path './vendor' -prune \) -type f -name '*.php' -print0 | xargs -0 -I file php -l file > /dev/null
after_success:
- |
[ "$TRAVIS_PHP_VERSION" != "5.3" ] && echo "Skipping phpDoc deployment because this is not on the required runtime" && exit
[[ ",$DEPLOY_PHPDOC_BRANCHES," != *,"$TRAVIS_BRANCH",* ]] && echo "Skipping phpDoc deployment because this branch is not permitted to deploy" && exit
[ "$TRAVIS_SECURE_ENV_VARS" != "true" ] && echo "Skipping phpDoc deployment because this is no environment with write access to the repository" && exit
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
./build/generate-phpdoc.sh "$TRAVIS_BUILD_DIR" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" "Pico 1.0 API Documentation ($TRAVIS_BRANCH)" || exit 1
./build/deploy-phpdoc.sh "$TRAVIS_REPO_SLUG" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" "$TRAVIS_BRANCH @ $TRAVIS_COMMIT" "phpDoc/$PHPDOC_ID" "gh-pages" || exit 1
before_deploy:
- |
[ "$DEPLOY_PHPDOC_TAGS" == "true" ] && (
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
./build/generate-phpdoc.sh "$TRAVIS_BUILD_DIR" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" "Pico 1.0 API Documentation ($TRAVIS_TAG)" || exit 1
./build/deploy-phpdoc.sh "$TRAVIS_REPO_SLUG" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" "$TRAVIS_TAG" "phpDoc/$PHPDOC_ID" "gh-pages" || exit 1
)
- composer install --no-dev --optimize-autoloader
- tar -czf "pico-release-$TRAVIS_TAG.tar.gz" README.md LICENSE CONTRIBUTING.md CHANGELOG.md composer.json composer.lock config content-sample lib plugins themes vendor .htaccess index.php
deploy:
provider: releases
api_key: ${GITHUB_OAUTH_TOKEN}
file: pico-release-$TRAVIS_TAG.tar.gz
skip_cleanup: true
on:
tags: true
php: 5.3
sudo: false