Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions: mismatch with work/ dir causes V8 to never be cached #109

Closed
hishamhm opened this issue Jul 14, 2022 · 1 comment · Fixed by #111
Closed

Github Actions: mismatch with work/ dir causes V8 to never be cached #109

hishamhm opened this issue Jul 14, 2022 · 1 comment · Fixed by #111

Comments

@hishamhm
Copy link
Collaborator

util/runtimes/v8.sh manages the caching of its assets, aiming to take advantage of the "Setup cache - work/ dir" step performed by the Github Actions ci.yml workflow.

However, there seems to be a confusion regarding the work directory: there are currently two work/ directories: one at the root of the runner's $HOME directory, and another one inside the repo checkout used by the runner.

v8.sh was being launched with the former by the wasm-runtime action and using the latter for caching via DIR_DOWNLOAD, resulting in a situation like this:

caching built assets in /home/runner/work/ngx_wasm_module/ngx_wasm_module/work/downloads/v8-10.5.18...
'/home/runner/work/v8-10.5.18/include/wasm.h' -> '/home/runner/work/ngx_wasm_module/ngx_wasm_module/work/downloads/v8-10.5.18/wasm.h'
'/home/runner/work/v8-10.5.18/lib/libwee8.a' -> '/home/runner/work/ngx_wasm_module/ngx_wasm_module/work/downloads/v8-10.5.18/libwee8.a'
'/home/runner/work/v8-10.5.18/include/cwabt.h' -> '/home/runner/work/ngx_wasm_module/ngx_wasm_module/work/downloads/v8-10.5.18/cwabt.h'
'/home/runner/work/v8-10.5.18/lib/libcwabt.a' -> '/home/runner/work/ngx_wasm_module/ngx_wasm_module/work/downloads/v8-10.5.18/libcwabt.a'

However, these don't seem to be found in subsequent runs, so the "Setup cache" CI step, which uses plain work/downloads, is presumably only caching the top-level one?...

I can do some simple tweaks to move the cached V8 assets around, but I thought I'd write down this summary of the situation first in case there's something wrong going on with the caching of work/ in general that might need to be fixed instead.

hishamhm added a commit that referenced this issue Jul 14, 2022
This reconciles the cache directory used by the "Setup cache" step
in the ci.yml workflow with the one used by the `v8.sh` script.

See #109.
@thibaultcha
Copy link
Member

I too had noticed the V8 caching wasn't working (the CI times of course), glad you got it!

thibaultcha pushed a commit that referenced this issue Jul 14, 2022
This reconciles the cache directory used by the "Setup cache" step
in the ci.yml workflow with the one used by the `v8.sh` script.

See #109.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants