Python wheels we build in the CI, such as PyZMQ
or LIEF
, do not get cached, and are rebuilt every CI run. This wastes time/CPU (LIEF
can take some time to build). The versions of these packages rarely change, so we should be caching and reusing build output.
It looks like Cirrus even has a pip_cache
key, that we may be able to take advantage of.
Excerpt from the Darwin native job:
0./ci/test_run_all.sh
1Setting specific values in env
2Fallback to default values in env (if not yet set)
3Collecting zmq
4 Downloading https://files.pythonhosted.org/packages/6e/78/833b2808793c1619835edb1a4e17a023d5d625f4f97ff25ffff986d1f472/zmq-0.0.0.tar.gz
5Collecting lief
6 Downloading https://files.pythonhosted.org/packages/f4/db/29cf3cecc8b9997a16da6319f64039505861c9cf9ae2394bcb8c495ab3e0/lief-0.11.5.zip (15.7MB)
7Collecting pyzmq (from zmq)
8 Downloading https://files.pythonhosted.org/packages/99/3b/69360102db726741053d1446cbe9f7f06df7e2a6d5b805ee71841abf1cdc/pyzmq-22.1.0.tar.gz (1.2MB)
9 Installing build dependencies: started
10 Installing build dependencies: finished with status 'done'
11 Getting requirements to build wheel: started
12 Getting requirements to build wheel: finished with status 'done'
13 Installing backend dependencies: started
14 Installing backend dependencies: finished with status 'done'
15 Preparing wheel metadata: started
16 Preparing wheel metadata: finished with status 'done'
17Building wheels for collected packages: pyzmq
18 Building wheel for pyzmq (PEP 517): started
19 Building wheel for pyzmq (PEP 517): finished with status 'done'
20 Created wheel for pyzmq: filename=pyzmq-22.1.0-cp38-cp38-macosx_10_14_6_x86_64.whl size=740475 sha256=e3fe3beb65a388bafbc38cd273de33d6e340e3c9bb70edfc073eb3ebe9cd8de4
21 Stored in directory: /Users/admin/Library/Caches/pip/wheels/e5/09/86/54436a8590914d725cccf13bfebf6b0dacaa976d68d299c079
22Successfully built pyzmq
23Building wheels for collected packages: zmq, lief
24 Building wheel for zmq (setup.py): started
25 Building wheel for zmq (setup.py): finished with status 'done'
26 Created wheel for zmq: filename=zmq-0.0.0-cp38-none-any.whl size=1277 sha256=b7d464167b77efa4d800df1ddaa050dc005834f099428c28bba59bc7b30735f3
27 Stored in directory: /Users/admin/Library/Caches/pip/wheels/44/7a/7d/ac1d865766b06f9769ac1154bf31dbb5abb3b52ecfe278247a
28 Building wheel for lief (setup.py): started
29 Building wheel for lief (setup.py): still running...
30 Building wheel for lief (setup.py): still running...
31 Building wheel for lief (setup.py): still running...