birb
birb copied to clipboard
Cache `flutter` directory on CI
Caching the flutter directory CI took test run time from 2:30 to 1:10 but the [ ! -d flutter ] (if not directory) test isn't working as expected. Figure out why and finish implementation.
install:
- |
if [ ! -d flutter ] ; then
git clone https://github.com/flutter/flutter.git -b beta
fi
- ./flutter/bin/flutter doctor
cache:
directories:
- flutter
- $HOME/.pub-cache
I tried this on another repo and it worked (reduced build times by 150 seconds)
- if [ ! -f $HOME/flutter/bin/flutter ] ; then git clone https://github.com/flutter/flutter.git -b beta ; fi
- $HOME/flutter/bin/flutter doctor
Checking directory returns true but we need to ensure the flutter command is available (couldn't find the real reason why it didn't work before)
Should I add a PR?