Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Adding build scripts
  • Loading branch information
cryptiklemur committed Feb 1, 2016
commit 1752c7a55b9c53e1e04513656fde31f3c8b1d002
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/vendor/
composer.lock

11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ cache:
- "$HOME/.composer/cache"

before_install:
- if [[ $TRAVIS_PHP_VERSION != hhvm && SEND_COVERAGE != true ]]; then phpenv config-rm xdebug.ini; fi
- ./build/all.sh
- if [[ $TRAVIS_PHP_VERSION == '5.5' ]]; ./build/5.5.sh; fi
- if [[ $TRAVIS_PHP_VERSION == '5.6' ]]; ./build/5.6.sh; fi
- if [[ $TRAVIS_PHP_VERSION == '7.0' ]]; ./build/7.0.sh; fi
- if [[ $TRAVIS_PHP_VERSION == 'hhvm' ]]; ./build/hhvm.sh; fi
- composer self-update

install:
Expand All @@ -27,9 +31,8 @@ script:
- vendor/bin/phpunit -c phpunit.xml.dist

after_success:
- codecov # If coverage
- if [ "$TRAVIS_BRANCH" = "master" && "$SUBSPLIT" = true ]; then ''; fi
- if [[ "$TRAVIS_BRANCH" = "master" && "$SUBSPLIT" = true ]]; then ''; fi;
- if [[ "$SEND_COVERAGE" = true ]]; codecov; fi
- if [[ "$TRAVIS_BRANCH" = "master" && "$SUBSPLIT" = true ]]; then ''; fi # Send subtree update
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line could be removed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll just be re-added when you get the heroku thing added

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we use a webhook instead


sudo: true

Expand Down
7 changes: 7 additions & 0 deletions build/5.5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# Install APC Adapter & APCu Adapter dependencies
yes '' | pecl install apcu-4.0.8

# Install MongoDB Adapter dependencies
./installMongo.sh
7 changes: 7 additions & 0 deletions build/5.6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# Install APC Adapter & APCu Adapter dependencies
yes '' | pecl install apcu-4.0.8

# Install MongoDB Adapter dependencies
./installMongo.sh
4 changes: 4 additions & 0 deletions build/7.0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# Install APC Adapter & APCu Adapter dependencies
yes '' | pecl install apcu-5.1.0
1 change: 0 additions & 1 deletion build/Readme.md

This file was deleted.

17 changes: 17 additions & 0 deletions build/all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# Disable xdebug when hhvm or when SEND_COVERAGE is false
if [[ $TRAVIS_PHP_VERSION != hhvm && $SEND_COVERAGE != true ]]; then phpenv config-rm xdebug.ini; fi

# Doing something with phpenv
if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then phpenv config-add ./tests/travis/php.ini; fi

# Install codecov
pip install --user codecov

# Install Mongo
./installMongo.sh

# Install Redis extension
mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d
echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
3 changes: 3 additions & 0 deletions build/hhvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

# Don't need anything yet
19 changes: 19 additions & 0 deletions build/installMongo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

export KEY_SERVER="hkp://keyserver.ubuntu.com:80"
export MONGO_REPO_URI="http://repo.mongodb.com/apt/ubuntu"
export MONGO_REPO_TYPE="precise/mongodb-enterprise/"

sudo apt-key adv --keyserver ${KEY_SERVER} --recv 7F0CEB10
sudo apt-key adv --keyserver ${KEY_SERVER} --recv EA312927
echo "deb ${MONGO_REPO_URI} ${MONGO_REPO_TYPE}${SERVER_VERSION} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update -qq
sudo apt-get install mongodb-enterprise
sudo apt-get -y install gdb


if ! nc -z localhost 27017; then sudo service mongod start; fi
mongod --version
if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then pecl install -f mongodb-1.1.2; fi;
mongo --eval 'tojson(db.runCommand({buildInfo:1}))'
if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then php --ri mongodb; fi;
80 changes: 41 additions & 39 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "cache/cache",
"type": "library",
"description": "",
"keywords": ["cache", "psr6"],
"description": "Library of all the php-cache adapters",
"keywords": [
"cache",
"psr6"
],
"homepage": "http://www.php-cache.com",
"license": "MIT",
"authors": [
Expand All @@ -17,55 +20,54 @@
"homepage": "https://github.com/nyholm"
}
],
"require":
{
"php": "^5.5|^7.0",
"require": {
"php": "^5.5|^7.0",
"psr/cache": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0|^5.1"
},
"autoload": {
"psr-4": {
"Cache\\Adapter\\Apc\\": "src/Adapter/Apc/src/",
"Cache\\Adapter\\Apcu\\": "src/Adapter/Apcu/src/",
"Cache\\Adapter\\Chain\\": "src/Adapter/Chain/src/",
"Cache\\Adapter\\Common\\": "src/Adapter/Common/src/",
"Cache\\Adapter\\Doctrine\\": "src/Adapter/Doctrine/src/",
"Cache\\Adapter\\Apc\\": "src/Adapter/Apc/src/",
"Cache\\Adapter\\Apcu\\": "src/Adapter/Apcu/src/",
"Cache\\Adapter\\Chain\\": "src/Adapter/Chain/src/",
"Cache\\Adapter\\Common\\": "src/Adapter/Common/src/",
"Cache\\Adapter\\Doctrine\\": "src/Adapter/Doctrine/src/",
"Cache\\Adapter\\Filesystem\\": "src/Adapter/Filesystem/src/",
"Cache\\Adapter\\Memcache\\": "src/Adapter/Memcache/src/",
"Cache\\Adapter\\Memcached\\": "src/Adapter/Memcached/src/",
"Cache\\Adapter\\MongoDB\\": "src/Adapter/MongoDB/src/",
"Cache\\Adapter\\PHPArray\\": "src/Adapter/PHPArray/src/",
"Cache\\Adapter\\Predis\\": "src/Adapter/Predis/src/",
"Cache\\Adapter\\Redis\\": "src/Adapter/Redis/src/",
"Cache\\Adapter\\Void\\": "src/Adapter/Void/src/",
"Cache\\Bridge\\": "src/Bridge/src/",
"Cache\\Hierarchy\\": "src/Hierarchy/src/",
"Cache\\IntegrationTests\\": "src/IntegrationTests/src/",
"Cache\\SessionHandler\\": "src/SessionHandler/src/",
"Cache\\Taggable\\": "src/Taggable/src/"
"Cache\\Adapter\\Memcache\\": "src/Adapter/Memcache/src/",
"Cache\\Adapter\\Memcached\\": "src/Adapter/Memcached/src/",
"Cache\\Adapter\\MongoDB\\": "src/Adapter/MongoDB/src/",
"Cache\\Adapter\\PHPArray\\": "src/Adapter/PHPArray/src/",
"Cache\\Adapter\\Predis\\": "src/Adapter/Predis/src/",
"Cache\\Adapter\\Redis\\": "src/Adapter/Redis/src/",
"Cache\\Adapter\\Void\\": "src/Adapter/Void/src/",
"Cache\\Bridge\\": "src/Bridge/src/",
"Cache\\Hierarchy\\": "src/Hierarchy/src/",
"Cache\\IntegrationTests\\": "src/IntegrationTests/src/",
"Cache\\SessionHandler\\": "src/SessionHandler/src/",
"Cache\\Taggable\\": "src/Taggable/src/"
}
},
"autoload-dev": {
"autoload-dev": {
"psr-4": {
"Cache\\Adapter\\Apc\\Tests\\": "src/Adapter/Apc/tests/",
"Cache\\Adapter\\Apcu\\Tests\\": "src/Adapter/Apcu/tests/",
"Cache\\Adapter\\Chain\\Tests\\": "src/Adapter/Chain/tests/",
"Cache\\Adapter\\Common\\Tests\\": "src/Adapter/Common/tests/",
"Cache\\Adapter\\Doctrine\\Tests\\": "src/Adapter/Doctrine/tests/",
"Cache\\Adapter\\Apc\\Tests\\": "src/Adapter/Apc/tests/",
"Cache\\Adapter\\Apcu\\Tests\\": "src/Adapter/Apcu/tests/",
"Cache\\Adapter\\Chain\\Tests\\": "src/Adapter/Chain/tests/",
"Cache\\Adapter\\Common\\Tests\\": "src/Adapter/Common/tests/",
"Cache\\Adapter\\Doctrine\\Tests\\": "src/Adapter/Doctrine/tests/",
"Cache\\Adapter\\Filesystem\\Tests\\": "src/Adapter/Filesystem/tests/",
"Cache\\Adapter\\Memcache\\Tests\\": "src/Adapter/Memcache/tests/",
"Cache\\Adapter\\Memcached\\Tests\\": "src/Adapter/Memcached/tests/",
"Cache\\Adapter\\MongoDB\\Tests\\": "src/Adapter/MongoDB/tests/",
"Cache\\Adapter\\PHPArray\\Tests\\": "src/Adapter/PHPArray/tests/",
"Cache\\Adapter\\Predis\\Tests\\": "src/Adapter/Predis/tests/",
"Cache\\Adapter\\Redis\\Tests\\": "src/Adapter/Redis/tests/",
"Cache\\Adapter\\Void\\Tests\\": "src/Adapter/Void/tests/",
"Cache\\Bridge\\Tests\\": "src/Bridge/tests/",
"Cache\\Hierarchy\\Tests\\": "src/Hierarchy/tests/",
"Cache\\SessionHandler\\Tests\\": "src/SessionHandler/tests/",
"Cache\\Taggable\\Tests\\": "src/Taggable/tests/"
"Cache\\Adapter\\Memcache\\Tests\\": "src/Adapter/Memcache/tests/",
"Cache\\Adapter\\Memcached\\Tests\\": "src/Adapter/Memcached/tests/",
"Cache\\Adapter\\MongoDB\\Tests\\": "src/Adapter/MongoDB/tests/",
"Cache\\Adapter\\PHPArray\\Tests\\": "src/Adapter/PHPArray/tests/",
"Cache\\Adapter\\Predis\\Tests\\": "src/Adapter/Predis/tests/",
"Cache\\Adapter\\Redis\\Tests\\": "src/Adapter/Redis/tests/",
"Cache\\Adapter\\Void\\Tests\\": "src/Adapter/Void/tests/",
"Cache\\Bridge\\Tests\\": "src/Bridge/tests/",
"Cache\\Hierarchy\\Tests\\": "src/Hierarchy/tests/",
"Cache\\SessionHandler\\Tests\\": "src/SessionHandler/tests/",
"Cache\\Taggable\\Tests\\": "src/Taggable/tests/"
}
}
}