Background
I work on an open-source Github Electron app for transcribing video. I want my app to be multiplatform, so I use open-source travis-ci.org to build it for both MacOS and Linux (Ubuntu), then publish the binaries to Github releases.
What I'd like to have happen
Travis builds for OSX and Linux concurrently.
What actually happens
With my current YAML configuration, Travis tests and builds serially: it makes the linux version first, then the mac version only after the Linux build finishes. (I believe it builds in that order because it's the order in which I've specified OSes in my YAML). Here's an example of that serial build behavior
Below is my .travis.yml, excluding my Github access token:
language: node_js
node_js:
- '8'
matrix:
include:
- os: linux
dist: xenial
sudo: required
- os: osx
cache:
yarn: true
notifications:
email: false
script:
- yarn dist
deploy:
provider: releases
api_key: $ENCRYPTED_GITHUB_TOKEN
skip_cleanup: true
on:
tags: true
How I've tried to solve this on my own
I've read and re-read Travis-CI's documentation on build matrices and build matrix expansion. I've also read documentation on Travis's beta build stages feature. But, I don't think I fully understand how to define a build matrix, then have all the expanded configurations go through a stage. In this case, define two OSes, but only have to write one stage with the same command: yarn dist to make the distributable. (By default, that command will build a binary for the host OS.)
My hunch about how to answer my question
My guesses are that one (or more) of these are true:
- What I want isn't possible
- What I want is possible; I just have to make a minor tweak.
- What I want is possible, but my attempt to do it is largely wrong and/or misunderstands the relationship between matrices, jobs, and stages.
- I'm encountering something Electron-specific (although the build for Linux seems to go fine)
My apologies
I wish I understood Travis better, and I thank you for your patience and your help.