GitHub CI: Ensure that brew/apt-get is updated before installing #687
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The macOS 11 and 12 CIs were failing in the jobs for building the docs, because the
brew install
command formactex-nogui
was not finding the URL for the tarfile to download. This was probably because the formulae (package info) was outdated and needed to be updated. Since then, macOS 12 started working -- likely that GitHub had created a new image for that VM, which had a more recent list of brew packages.For Ubuntu, we run
apt-get update
before runningapt-get install
, to ensure that we have the latest info. This PR does the same forbrew
, plus adds one place that was missing forapt-get
(in the Toooba test, which has the install command in the yaml and not in a shell script that gets called).One thing to note is that, by updating the formulae, we may cause
brew
to install new dependencies (for the new package to be installed) if those have new versions. This is fine for macOS 12 and 13, for whichbrew
has pre-built binaries that are downloaded; but for macOS 11, whichbrew
no longer supports in that way, the packages must be built from source, which can take a long time. I've increased the timeout for macOS jobs by 60 minutes, to account for the increase in time.It could be worth investigating whether the source builds could be cached and reused (as long as the VM image identifier is still the same).