robotpy / mostrobotpy

Official Repository of python implementation of WPILib components
https://robotpy.github.io
Other
11 stars 14 forks source link

ci: Use sccache native GitHub Actions support #27

Closed auscompgeek closed 1 year ago

auscompgeek commented 1 year ago

We're seeing 100% cache misses with the local disk cache. Let's see if letting sccache hit the Actions cache improves cache hits.

Ref: https://github.com/robotpy/build-actions/issues/15

auscompgeek commented 1 year ago

Well, that looks a lot better now :smile:

Before
C:\Users\runneradmin\.cargo\bin\sccache.exe -s
  Compile requests                    550
  Compile requests executed           550
  Cache hits                            0
  Cache misses                        550
  Cache misses (C/C++)                550
  Cache timeouts                        0
  Cache read errors                     0
  Forced recaches                       0
  Cache write errors                    0
  Compilation failures                  0
  Cache errors                          0
  Non-cacheable compilations            0
  Non-cacheable calls                   0
  Non-compilation calls                 0
  Unsupported compiler calls            0
  Average cache write               0.002 s
  Average compiler                  8.310 s
  Average cache read hit            0.000 s
  Failed distributed compilations       0
  Cache location                  Local disk: "D:\\a\\mostrobotpy\\mostrobotpy/.sccache"
  Version (client)                0.5.3
  Cache size                          499 MiB
  Max cache size                      500 MiB
After (initial build)
C:\hostedtoolcache\windows\sccache\0.7.0\x64\sccache.exe --show-stats
Compile requests                    550
Compile requests executed           550
Cache hits                            3
Cache hits (C/C++)                    3
Cache misses                        547
Cache misses (C/C++)                547
Cache timeouts                        0
Cache read errors                     0
Forced recaches                       0
Cache write errors                    0
Compilation failures                  0
Cache errors                          0
Non-cacheable compilations            0
Non-cacheable calls                   0
Non-compilation calls                 0
Unsupported compiler calls            0
Average cache write               0.394 s
Average compiler                  5.591 s
Average cache read hit            0.417 s
Failed distributed compilations       0
Cache location                  ghac, name: sccache-v0.7.0, prefix: /sccache/
Version (client)                0.7.0
After (cached)
C:\hostedtoolcache\windows\sccache\0.7.0\x64\sccache.exe --show-stats
Compile requests                    550
Compile requests executed           550
Cache hits                          550
Cache hits (C/C++)                  550
Cache misses                          0
Cache timeouts                        0
Cache read errors                     0
Forced recaches                       0
Cache write errors                    0
Compilation failures                  0
Cache errors                          0
Non-cacheable compilations            0
Non-cacheable calls                   0
Non-compilation calls                 0
Unsupported compiler calls            0
Average cache write               0.000 s
Average compiler                  0.000 s
Average cache read hit            0.248 s
Failed distributed compilations       0
Cache location                  ghac, name: sccache-v0.7.0, prefix: /sccache/
Version (client)                0.7.0