platformio / platformio-docs

PlatformIO Documentation
https://docs.platformio.org
Apache License 2.0
240 stars 326 forks source link

ci: use cache in github actions #164

Closed thijstriemstra closed 3 years ago

ivankravets commented 3 years ago

Caching is the optional feature. So, could we allow people to personally decide to use it or not?

thijstriemstra commented 3 years ago

Caching is a best practice and we can help the Python Software Foundation's bandwidth usage by suggesting this in the docs. Same goes for platformio resources. Not caching is a big waste of resources and money. I'll leave it up to you to decide.

ivankravets commented 3 years ago

Good, let's discuss the PR.

${{ hashFiles('**/lockfiles') }}

Is it valid for PlatformIO? What does mean lockfiles?

  • name: Install dependencies run: | python -m pip install --upgrade pip pip install platformio

Could we replace this part with?

    - name: Install PlatformIO Core
      run: |
        pip install -U platformio

Please re-test if it works.

Thanks!

thijstriemstra commented 3 years ago

Is it valid for PlatformIO? What does mean lockfiles?

Afaik they are files placed by github actions to mark a directory as cached"

Could we replace this part with?

I would definitely try to upgrade pip everytime and suggest:

- name: Install PlatformIO Core
      run: |
        python -m pip install --upgrade pip
        pip install -U platformio

I'll update the PR.

ivankravets commented 3 years ago

Thanks!