Closed neuromancer closed 2 years ago
I'm wondering though how this will work with the fact that we cache the full submodule which is often the reason for the update? Would the checkout part of the action require to be rewritten to perform a pull if the folder is cached?
Good point. I'm not sure how this interacts with the submodule. I guess we should try it and see if it works..
I approved your run, so I assume you can test this by adding commits to the PR?
Exactly. I'm finishing my day here, if you feel you want to take care of this sooner than later (perhaps because you saw a better way to do it), feel free to close the PR and open a new one. Otherwise, I will experiment with this tomorrow.
As expected, it failed in the deployment since it should only work for your own user. I temporary disabled the deployment so we can test the caching, but this needs manual approvals at each run from your side.
Wouldn't you be able to test this on https://github.com/neuromancer/scummvm-demo ? (you can activate github pages + actions on your own repo as well)
I just enabled it, let's see what happens.
The execution generated a 3GB cache. Let's see if this is faster than re-download and recompile everything..
Good news: this is working fine in my repository. It takes around 15 minutes instead of more than one hour. To really test this PR, I recommend to add more commits from scummvm master
into the Emscripten PR to make sure the new changes are actually updated.
I'll merge this as it looks good. If something breaks we can always fix it later.
FYI: This didn't work. None of the changes done in the scummvm repo are updated/pulled in.
Uhm according to the CI tests, compilation is taking around 17minutes, which is very fast to recompile everything, however, it could be interfering with the git modules as you said. In my branch, I tried to use ccache, but emscripten requires a special fork of it, so finally I implemented a specific cache manually, take a look to this:
https://github.com/neuromancer/scummvm-demo/blob/main/.github/workflows/main.yml#L48-L65
I'm also rebasing automatically with scummvm master, but that's another topic of discussion.
I just noticed that my changes to the branch werent deployed, I assume thats because the cache skips the checkout (and neither performs a pull). I'll reopen https://github.com/chkuendig/scummvm-demo/issues/8.
I think this is generally a great idea. Since I activated all engines a full build takes more then an hour.
I'm wondering though how this will work with the fact that we cache the full submodule which is often the reason for the update? Would the checkout part of the action require to be rewritten to perform a pull if the folder is cached?
Alternatively we might want to redirect the object files into a separate folder (with
OBJDIR
or-o
, see https://stackoverflow.com/questions/5178125/how-to-place-object-files-in-separate-subdirectory) which is cachedFor emsdk and the game/demo files this could be done manually as part of the build. (but that's only a few minutes of the build)