carpentries / styles

Styles for The Carpentries lessons. No README to avoid merge conflicts with lessons. Demo 👇
https://carpentries.github.io/lesson-example
Other
84 stars 96 forks source link

Template workflow: Install R packages after restoring cache #589

Closed maxim-belkin closed 3 years ago

maxim-belkin commented 3 years ago

To have an effect, the caching step has to preceed the installation step. Here, I move the step that installs some R packages to after the caching step. I used this as an example.

zkamvar commented 3 years ago

There are three steps installing packages:

"Install needed R packages": our tools "Query dependencies": individual lesson tools "Install stringi from source": avoiding Ubuntu 18.04/20.04 screwups

They should be in that order and the restoring of cache should come before that.

maxim-belkin commented 3 years ago

Ah, ok. I was looking at Linux build logs and 'stringi' is always built from source, so I thought the order is messed up. I wonder if we can cache this step somehow -- the logs say

installing via 'install.libs.R' to /home/runner/work/_temp/Library/00LOCK-stringi/00new/stringi

maybe we could cache that path? ... anyways, closing the PR.

zkamvar commented 3 years ago

You are correct that the cache step needs to come BEFORE all of the installation. The reason this PR is failing is because it came in the middle of the installation (I think).

In any case, the authors of the workflow acknowledged that they made a mistake when they initially named it "Cache R packages" instead of "Restore R package cache"