I'm setting up a .travis.yml
where I need to
- Build on two platforms
- Deploy after all the builds completed
I started by creating a matrix
for building
language: cpp
matrix:
include:
- os: osx
osx_image: xcode10.1
script:
- "./Travis/build-osx.sh"
- os: linux
dist: trusty
script:
- "./Travis/build-linux.sh"
This runs correctly the two builds in parallel. The question is how can I add a stage
that will run once the two builds completed.
This jobs documentation uses stages but it does not seem to work when I use a matrix
So I managed to do this by having three stages, two having the same name. The stages with the same name run in parallel
language: cpp
notifications:
email: false
jobs:
include:
- stage: build
os: osx
osx_image: xcode10.1
script:
- "./Travis/build-osx.sh"
- stage: build
os: linux
dist: trusty
script:
- ./Travis/build-linux.sh
- stage: Deploy
- ./Travis/binaries-upload.sh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With