Skip to content

Commit

Permalink
Merge pull request #1132 from wick-ed/travis-build
Browse files Browse the repository at this point in the history
Travis build
  • Loading branch information
wick-ed committed Aug 27, 2019
2 parents b2b9921 + 64d4ccf commit 4a00969
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 86 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@
.README.md.html
.ROADMAP.md.html
.CHANGELOG.md.html
node_modules
yarn.lock
58 changes: 43 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,56 @@
language: php

php:
- 7.0
- 5.6
- 5.5

matrix:
allow_failures:
- php: 7.0
cache:
directories:
- $HOME/.composer/cache/files

before_install:
- if [[ "$TRAVIS_PHP_VERSION" < "7.0" ]]; then pecl install pthreads-2.0.10; fi
- if [[ "$TRAVIS_PHP_VERSION" = "7.0" ]] || [[ "$TRAVIS_PHP_VERSION" > "7.0" ]]; then pecl install pthreads-3.1.6; fi
- phpenv rehash
- wget https://scrutinizer-ci.com/ocular.phar
- wget https://getcomposer.org/composer.phar

script:
- php -d memory_limit=-1 composer.phar update
- vendor/bin/robo build
- php ocular.phar code-coverage:upload --format=php-clover $TRAVIS_BUILD_DIR/target/reports/unit/clover.xml
env:
global:
- BUILD_NUMBER=${TRAVIS_BUILD_NUMBER}

matrix:
include:
- os: linux
dist: xenial
php: 5.6
env:
- OS_FAMILY = linux
- OS_DISTRO = debian
services:
- docker
script:
- mkdir -p build
- composer install
- vendor/bin/robo build
- if [[ "$TRAVIS_TAG" ]]; then docker run --rm -v `pwd`:/build -w /build debian:9 bash -c "apt-get update && apt-get install -y ant git php && ant dependencies-init -f vendor/appserver-io-dist/debian/build.xml && ant local-build -Dbuild.number=$BUILD_NUMBER -Dtarget-os.major.version=9 -Dtarget-os.minor.version=9 -f vendor/appserver-io-dist/debian/build.xml && chmod -R 777 vendor/appserver-io-dist/debian/build"; fi
- if [[ "$TRAVIS_TAG" ]]; then mv vendor/appserver-io-dist/debian/build/* build/; fi
- if [[ "$TRAVIS_TAG" ]]; then echo "Prepared the following artefacts:"; ls -lh build/; fi
- os: linux
dist: xenial
language: php
php: 7.0
allow_failures:
- php: 7.0
- os: osx

deploy:
provider: releases
api_key:
secure: "T/+tptqFVgBCPgVPQqEL7ciWg5N4hp4bWdq9jG7AIB3K1inu1LL4HzggOfyeSktUOW63SZdEoWqrXaYk0d4+4f811Dzign3Eqi/m/yw2Opwh0jbpOTvaQBZfN8/xBAB9/TfsPyFWq4buF8fI5Njew7wbxs/n1c701L2zFtzmxEM="
file_glob: true
file: "build/*"
skip_cleanup: true
on:
tags: true
branch: '1.1'
repo: appserver-io/appserver

notifications:
email: info@appserver.io
hipchat: 95d47a72c5372d4a0fef20048c3200@Appserver
webhooks: https://app.fossa.io/hooks/travisci

2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@
</exec>
</target>

</project>
</project>
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"appserver-io/routlt-project": "1.2.*"
},
"require-dev": {
"appserver-io/build": "~1.0"
"appserver-io/build": "~1.0",
"appserver-io-dist/debian": "dev-master"
},
"autoload": {
"psr-0": {
Expand Down Expand Up @@ -95,4 +96,4 @@
"AppserverIo\\Appserver\\Meta\\Composer\\Script\\Setup::postUpdate"
]
}
}
}

0 comments on commit 4a00969

Please sign in to comment.