diff --git a/README.md b/README.md index fe3c135..62bd39b 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,4 @@ phpenv local 5.6 composer install --prefer-source --no-interaction # Install Phalcon vendor/bin/install-phalcon.sh -``` -**Codeship Notes** -* Caching does not work with Codeship directories and therefore Phalcon can not be cached. Build time is approximately 1 min 30 sec +``` \ No newline at end of file diff --git a/bin/install-phalcon.sh b/bin/install-phalcon.sh index ffdca03..d4b023d 100755 --- a/bin/install-phalcon.sh +++ b/bin/install-phalcon.sh @@ -13,12 +13,18 @@ fi PHALCON_INSTALL_REF=${1:-master} PHALCON_DIR=${HOME}/cphalcon -PHALCON_CACHE_DIR=${HOME}/cphalcon/cache +PHALCON_CACHE_DIR=${PHALCON_DIR}/cache PHP_VER=$(phpenv version-name) PHP_ENV_DIR=$(dirname $(dirname $(which phpenv)))/versions/${PHP_VER} PHP_EXT_DIR=$(php-config --extension-dir) +# Codeship doesn't support specifying a directory +if [ "${CI_NAME}" == "codeship" ]; then + PHALCON_DIR=~/cache/cphalcon + PHALCON_CACHE_DIR=~${PHALCON_DIR}/cache +fi + # Prior to building, attempt to enable phalcon from a cached dependency # which may have been set via the CI environment YML declaration. This is # important as it helps improve performance for fast builds.