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

Build: Use Github Actions caching instead of SBT caching #431

Merged
merged 21 commits into from
Sep 25, 2022

Conversation

alexklibisz
Copy link
Owner

@alexklibisz alexklibisz commented Sep 25, 2022

Related Issue

Changes

Some more details on caching:

There was a subtle problem with SBT's caching: the succeeded_tests file used by the testQuick command stores the timestamp at which each test suite last succeeded. The next time you run testQuick, if the test suite has been recompiled after that stored timestamp, the test will run-again. I thought that using pullRemoteCache would mean that the tests are not recompiled. That turns out to not be exactly the case. The test is compiled extremely quickly (<= 1s for full compilation), but it's nevertheless re-compiled. That means it needs to be executed, despite having already passed according to the succeeded_tests file.

It turns out that caching each of the target directories solves this problem, and it's probably simpler overall, anyways. The target directory contains the old compilation state and the succeeded_tests file. So if a test suite hasn't changed, it genuinely just won't be recompiled, and so the test suite won't re-run.

The caching action is documented here: Caching dependencies to speedup workflows

Testing and Validation

  • Standard CI

@alexklibisz alexklibisz marked this pull request as ready for review September 25, 2022 23:21
@alexklibisz alexklibisz changed the title Build: Use Github Cache Action Build: Use Github Actions caching instead of SBT caching Sep 25, 2022
@alexklibisz alexklibisz merged commit b92b117 into master Sep 25, 2022
@alexklibisz alexklibisz deleted the 360-github-actions-caching branch September 25, 2022 23:22
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 this pull request may close these issues.

None yet

1 participant