ci: macos: use cached macports install
authorAndres Freund <andres@anarazel.de>
Sat, 19 Aug 2023 19:40:45 +0000 (12:40 -0700)
committerAndres Freund <andres@anarazel.de>
Sat, 19 Aug 2023 21:39:14 +0000 (14:39 -0700)
commit62017cb51ff9f1ff6aa94bdf26d9cc290d4ffe48
tree8bc68bb7be0eae658ef94710302deab8cf304af8
parentd23e60e6673ab946b769d727c62fc65e146f17f3
ci: macos: use cached macports install

A significant chunk of the time on the macos CI task is spent installing
packages using homebrew. The downloads of the packages are cached, but the
installation needs to happen every time. We can't cache the whole homebrew
installation, because it is too large due to pre-installed packages.

Speed this up by installing packages using macports and caching the
installation as .dmg. That's a lot faster than unpacking a tarball.

In addition, don't install llvm - it wasn't enabled when building, so it's
just a waste of time/space.

This substantially speeds up the mac CI time, both in the cold cache and in
the warm cache case (the latter from ~1m20s to ~5s).

It doesn't seem great to have diverging sources of packages for CI between
branches, so backpatch to 15 (where CI was added).

Discussion: https://postgr.es/m/20230805202539.r3umyamsnctysdc7@awork3.anarazel.de
Backpatch: 15-, where CI was added
.cirrus.yml
src/tools/ci/ci_macports_packages.sh [new file with mode: 0755]