# Run multiple stages on multiple os

**URL:** <https://travis-ci.community/t/run-multiple-stages-on-multiple-os/2676>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** stages, bug\
**Created:** [March 16, 2019, 10:58pm UTC](https://travis-ci.community/t/run-multiple-stages-on-multiple-os/2676 "2019-03-16T22:58:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HaaLeo](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/haaleo/32/1380_2.png) [@HaaLeo](https://travis-ci.community/u/HaaLeo)\
**Post date:** [March 16, 2019, 10:58pm UTC](https://travis-ci.community/t/run-multiple-stages-on-multiple-os/2676/1 "2019-03-16T22:58:49Z")

</div>

I have set up a pipeline that contains the stages _build_ _test_ and optional _deploy_  
Now I would like to run the _build_ and _test_ stages in parallell on linux, osx and windows. However when I add

```auto
os:
  - osx
  - windwos
  - linux

```

to my `.travis.yml` I only get the _test_ stage to run in parallel for each os. Can anybody help me to also get the _build_ stage run on all os? [Link to the build](https://travis-ci.org/HaaLeo/vscode-timing/builds/507321403)

My used `.travis.yml`:

> ****
>
> ```
> 
> language: node_js
> sudo: false
> env:
> 
> CODE_TESTS_PATH=$TRAVIS_BUILD_DIR/out/test CODE_TESTS_WORKSPACE=$TRAVIS_BUILD_DIR/src/test/testfiles
> 
> stages:
> 
> build
> test
> name: deploy
> if: tag =~ /^v\d+.\d+.\d+$/ AND repo = HaaLeo/vscode-timing
> 
> node_js:
> 
> “node”
> 
> before_install:
> 
> if [$TRAVIS_OS_NAME == “linux”]; then
> export CXX=“g+±4.9” CC=“gcc-4.9” DISPLAY=:99.0;
> sh -e /etc/init.d/xvfb start;
> sleep 3;
> fi
> 
> install:
> 
> npm install
> npm run vscode:prepublish
> 
> os:
> 
> linux
> osx
> 
> jobs:
> include:
> - stage: build
> script:
> - npm run compile
> - npm run tslint
> - stage: test
> script:
> - npm run test
> - stage: deploy
> before_deploy:
> - vsce publish -p {VSC_PUBLISH_TOKEN}
> - vsce package
> - export RELEASE_PKG_FILE=(ls *.vsix)
> script: skip
> deploy:
> provider: releases
> file_glob: true
> file: "{RELEASE_PKG_FILE}"
> api_key: {Travis_CD}
> skip_cleanup: true
> on:
> tags: true
> after_success:
> 
> bash <(curl -s https://codecov.io/bash)
> 
> ```

Thanks in advance

---

<div class="post-metadata">

**Author:** ![dongwangdw](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dongwangdw/32/2279_2.png) [@dongwangdw](https://travis-ci.community/u/dongwangdw)\
**Post date:** [July 4, 2019, 3:24am UTC](https://travis-ci.community/t/run-multiple-stages-on-multiple-os/2676/2 "2019-07-04T03:24:55Z")

</div>

you need matrix expansion. Please refer to the doc.
