Commit bbd98c5
committed
perf: enable go caching and install task from prebuilt binary
Every job that uses this action paid several minutes of avoidable setup.
actions/setup-go was invoked with `cache: false`, so each job re-downloaded
the whole module graph and recompiled every dependency from scratch. On
mcvs-scanner this accounted for roughly 190-300s per job before the first
test line was even printed.
The version guard around the Task install had also been silently broken
since Task 3.44: it matched `Task version: v<x>`, but Task now reports a
bare `<x>`. The guard therefore never matched and every job unconditionally
recompiled Task from source, costing ~90s each. The guard now matches the
bare version, which covers both the old and new output formats, and the
prebuilt binary is installed instead of compiling from source, mirroring how
golangci-lint is already installed in build/task.yml.
Coverage results are unaffected: the coverage task already passes -count=1
(#344), so a warm build cache cannot cause cached test results to be
reported as coverage.1 parent 293da57 commit bbd98c5
1 file changed
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
126 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
127 | 141 | | |
128 | 142 | | |
129 | 143 | | |
| |||
0 commit comments