abraham / birb

WIP: Instagram for birds built in Flutter
https://bendyworks.com/blog/a-month-of-flutter
MIT License
95 stars 19 forks source link

Cache `flutter` directory on CI #6

Open abraham opened 5 years ago

abraham commented 5 years ago

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
mannprerak2 commented 5 years ago

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?