We are using CircleCI as build server for php symfony application and we require the mongodb library with composer, which is dependent on the mongodb extension, that we install with pecl. So we have the following steps in our build:
- run: sudo pecl install mongodb
- run: echo -e "extension=mongodb.so" | sudo tee /usr/local/etc/php/php.ini > /dev/null
- run: cd app && composer install --no-interaction
This works fine, but the PECL mongo db extension takes half of our build time.
Is there a way to store the installed PECL extensions into the CircleCI cache?
I have tried the following:
- save_cache:
key: pecl-v1-{{ checksum "scripts/pecl-extensions.sh" }}
paths:
- /usr/local/20160303/mongodb.so
But this doesn't work - mongodb is downloaded again by PECL. What are the directories that I should try to cache in this case?