Not to clean up between jobs
I have a job in YAML script that consists of compiling, testing and uploading the results. Part of this job which is the testing takes a long time. I tried to separate that task into three sub tasks for compiling, running the tests and uploading results.
In such setup I could separate tests into 3 parallel parts and run the whole build faster.
However I recognised that both the build directory and the gradle cache directory are cleaned up between jobs. It basically means I have to recompile on each job. The overhead of recompiling each time is so high that the overall run time will only increase.
Is it possible to disable this behaviour? like dedicating a directory to each commit and share it between jobs?