Node.js versions should be preloaded
Currently testing on Node.js versions different than the default
one (now 0.10.28) is far from ideal; it requires slow
uninstallation and installation of the separate Node version like
in:
https://github.com/gruntjs/grunt/blob/b56d14cf82f191ba37cae4b433406...
which is extremely slow. AppVeyor should have Node versions
preloaded and available without manual installation, like Travis
does.
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
Support Staff 1 Posted by Feodor Fitsner on 24 Jun, 2014 03:37 AM
How many releases would we need - the latest 0.8.x, 0.10.x and 0.11.x - three in total? Or more?
2 Posted by m.goleb on 25 Jun, 2014 09:06 PM
Travis preloads a lot of Node versions and that would be nice but I'd be happy even if just latest patch versions of each Node release were available here; so yes, three in total (and four once 0.12 is released)
Travis uses nvm for that: https://github.com/creationix/nvm. Perhaps you could use https://github.com/hakobera/nvmw which is its adaptation to Windows? (I haven't tested that, though).
Support Staff 3 Posted by Feodor Fitsner on 25 Jun, 2014 09:22 PM
I see. Looking at nvmw code - it downloads node.exe, npm.zip then unpacks it. Well, I think we could have a faster approach - I'll let you know when it's ready for testing.
- Feodor
4 Posted by m.goleb on 25 Jun, 2014 09:27 PM
Travis uses nvm in a way that they do a lot of:
nvm install 0.10.26
nvm install 0.10.27
etc. before freezing the VM. Then on the actual run they read the node_js field and do:
nvm use THAT_FIELD
so the actual switching is blazing fast and all VMs can still be the same.
Obviously, you can preload Node versions however you want, I just linked to a prepared approach.
Support Staff 5 Posted by Feodor Fitsner on 25 Jun, 2014 09:30 PM
Yeah, you're right. Thanks!
- Feodor
6 Posted by m.goleb on 26 Jun, 2014 08:09 AM
Hm, actually, Travis does load only latest patch versions of Node.js (not sure if always or if they keep the previous one as well etc.); see:
http://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Pr...
I don't even think we need 0.6.
7 Posted by m.goleb on 26 Jun, 2014 08:11 AM
See e.g. this run:
https://travis-ci.org/mishoo/UglifyJS2/jobs/23880455
A month ago they had:
- 0.6.21 - 0.8.23, 0.8.25, 0.8.26 - 0.10.18 0.10.25 - 0.11.11
Support Staff 8 Posted by Feodor Fitsner on 26 Jun, 2014 02:34 PM
Yeah, I see.
- Feodor
9 Posted by m.goleb on 29 Dec, 2014 02:20 PM
Hi,
did you manage to make any progress on the issue? With recent Travis speed ups (http://docs.travis-ci.com/user/workers/container-based-infrastructure/) the slowness of AppVeyor runs when the needed Node versions is different than the preloaded one is really jarring; it often doubles the test time, sometimes even triples.
Support Staff 10 Posted by Feodor Fitsner on 29 Dec, 2014 06:27 PM
There is a faster way to switch node.js:
Install-Product node [x86|x64]
However, the latest available node.js version on build workers is 0.10.32. We are going to add recent ones in the coming week.
Regarding containers - when it comes to Windows we'll be supporting that for sure. Though I believe our Hyper-V based environment has comparable performance. It's just open-source that currently runs on Azure, but this might change in the future.
11 Posted by m.goleb on 29 Dec, 2014 06:34 PM
Most projects will need to test on at least two different Node.js minor versions. The patch level itself is not *that* important (obviously within reason, it's good to have a recent patch) but many people need at least 0.8, 0.10 and 0.11. Once 0.12 comes out, it can replace 0.11 pre-release versions.
I test most of my Node modules on 0.10 and 0.11 so I feel the slowness in the 0.11 case; see e.g.: https://ci.appveyor.com/project/mzgol/check-dependencies/build/89
Support Staff 12 Posted by Feodor Fitsner on 29 Dec, 2014 07:03 PM
Cool, then replace
Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
withInstall-Product node $env:nodejs_version
to speedup 0.11 job. Look at the example: https://github.com/gruntjs/grunt/blob/master/appveyor.yml#L2213 Posted by m.goleb on 01 Jan, 2015 06:33 PM
Thanks a lot, that speeds up the build a lot!
One question - are all these commands as well as Node versions available via this command documented anywhere? I couldn't find it.
Support Staff 14 Posted by Feodor Fitsner on 02 Jan, 2015 12:03 AM
There is a note here: http://www.appveyor.com/docs/installed-software
Maybe not the best place and it deserves a separate article.
15 Posted by m.goleb on 02 Jan, 2015 01:35 PM
Thanks! The thread can be closed now. :)
m.goleb closed this discussion on 02 Jan, 2015 01:35 PM.