Commit 196207e
committed
perf(release): cache ccache and disable LTO to speed up Nuitka builds
Nuitka --onefile compiles all Python to C on every run, which on cold CI
runners routinely takes 15+ minutes in the Scons stage. Two mitigations:
- Persist ~/.cache/ccache across workflow runs via actions/cache, keyed on
target + Python version + hash of pyproject.toml and build-binary.sh so
a Nuitka pin bump or flag change buckets into a fresh cache. ccache is
content-addressed, so changing Python source invalidates only the .o
files whose generated C actually changed. Windows is skipped because
MSVC does not integrate with ccache. macOS gains a brew install step.
- Pass --lto=no to Nuitka. LTO roughly doubles link time on gcc 11 and
the runtime win is not worth paying on every tag push.
Also drops the redundant --standalone flag (--onefile implies it) and
prints ccache stats after each build for visibility into hit rate.
Signed-off-by: Sodawyx <sodawyx@126.com>1 parent 66e2e62 commit 196207e
2 files changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
121 | 151 | | |
122 | 152 | | |
123 | 153 | | |
| |||
131 | 161 | | |
132 | 162 | | |
133 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
134 | 169 | | |
135 | 170 | | |
136 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
0 commit comments