I have a program which needs to be built for multiple platforms. Right now I'm doing something like:
matrix:
include:
env: PLATFORM=foo
env: PLATFORM=bar
env: PLATFORM=baz
before_install:
- install foo toolchain
- install bar toolchain
- install baz toolchain
script:
- make PLATFORM=$PLATFORM
I'd rather not install all three toolchains given that I'm only going to be using one; it's wasteful of resources and also breaks all the builds when upstream's terrible toolchain distribution site goes down.
However, I can't figure out a way to get a before_install in the build matrix --- the documentation is desperately unclear as to the precise syntax. Is this possible, and if so, how?