Commit ed12950
perf: cache BoringSSL builds across Python versions on Linux
Optimize Linux wheel builds to reduce time from ~40 minutes to ~10 minutes
by reusing BoringSSL builds across Python versions.
Changes:
1. Modified scripts/linux/setup_vendors.sh to check for existing built
libraries BEFORE removing the directory, allowing cibuildwheel to
reuse builds across Python versions
2. The script now:
- Checks if boringssl/build contains valid libssl.a and libcrypto.a
- Only removes and rebuilds if libraries are missing or invalid
- Skips expensive 5-10 minute BoringSSL build for Python versions 2-7
3. Updated cache key to v11 to ensure clean state with new logic
How it works:
- First Python version (cp38) builds BoringSSL (~5-10 min)
- Subsequent Python versions (cp39-cp314) reuse the build (~10 sec each)
- Total build time: ~10-15 min instead of ~40 min
The vendor directory is mounted into each cibuildwheel manylinux container,
so builds persist across Python versions within the same CI run.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 76a8c16 commit ed12950
File tree
2 files changed
+19
-25
lines changed- .github/workflows
- scripts/linux
2 files changed
+19
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
| 35 | + | |
37 | 36 | | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | | - | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 57 | | |
64 | 58 | | |
65 | 59 | | |
| |||
78 | 72 | | |
79 | 73 | | |
80 | 74 | | |
| 75 | + | |
81 | 76 | | |
82 | 77 | | |
83 | 78 | | |
| |||
95 | 90 | | |
96 | 91 | | |
97 | 92 | | |
98 | | - | |
99 | | - | |
100 | 93 | | |
101 | 94 | | |
102 | 95 | | |
| |||
0 commit comments