Matrix build is a very powerful feature of Travis CI: it allows you to define a list of custom environments wherein your software will be built. For instead, I check rcites on 4 different environments (note that Travis offers 3 different Ubuntu version, several MacOSX images and that the support for Windows is in early stage).
A few days ago, the matrix build I used for another R 📦 failed with the following error (see https://travis-ci.com/mangal-wg/rmangal/jobs/211574578 for the log):
$ if [[ $TRAVIS_OS_NAME == "linux" ]]; then sudo apt-get --yes --force-yes update -qq; fi W: GPG error: https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B05F25D762E3157 W: The repository 'https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease' is not signed.
which was caused by the lines below I used in
Well, I could have traced back where the
apt-get-related issue stemmed from, but I decided otherwise: I reviewed
.travis.yml to properly use the matrix build. The [documentation about it is good] but, IMHO, it lacks a couple of examples. That said, such examples are actually available in the zillion of repositories that use Travis! Even even Travis developers refer to these examples! So, after I had a look at this
.travis.yml example, here is what I ended up doing: