We have an Azure Build Pipeline that is building our product. We recently migrated to a custom Agent Pool, so we now have control over the VMs in the pool. I recently added a code signing step. This step is signing all of the binaries, and is resulting in a doubling of the build time. Up until now, I have not thought about caching as our full build runs were only about 20 min. Now we are 45 or longer.
I am trying to think through how to cache, but if I cache the signed binaries, I don't have a hash yet or anything I can compare to the newly built unsigned files. I could cache the unsigned binaries and the signed binaries, then after building compare the unsigned binaries with what was just built. For matches, I could grab the signed version from the cache, and for the others go forward with signing.
This seems overly complex. Any other options?