birb icon indicating copy to clipboard operation
birb copied to clipboard

Cache `flutter` directory on CI

Open abraham opened this issue 7 years ago • 1 comments

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

abraham avatar Dec 03 '18 16:12 abraham

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?

mannprerak2 avatar Oct 01 '19 15:10 mannprerak2