How to use different build matrix on different branches?
Now I'm using a typical node.js build matrix with 3 different node versions. Since the builds are slow (frankly much slower than Travis CI, I want to build for only 1 node version except for the master branch (which continues to build for all 3 versions). How should I do this? (Note: The build config is copied below. Except for node versions, all build configs should be shared among all configurations.)
# Test against the latest version of this Node.js version
environment:
matrix:
- nodejs_version: "5"
- nodejs_version: "6"
- nodejs_version: "8"
# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install modules
- yarn install
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- yarn --version
# run tests
- yarn test
# Don't actually build.
build: off
# Cache
cache:
- "%LOCALAPPDATA%\\Yarn"
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ilya Finkelshte... on 31 Jul, 2017 10:36 PM
You can use conditional build configuration and have matrix only for
master
.For right now it will add some duplication to your YAML files, but after this issue closed (will be soon), you will be able to make your YAML compact again.
P.S. Regarding performance, we run Windows builds, so node.js engine is different. We will soon provide Linux builds, and after that speed comparison will be valid.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:18 AM.