I want to use different versions of Emacs. I think I have to do this with the build matrix feature. I have searched around and cannot find how it is done.
I am going to use Choco to install my packages. The default version is Emacs24. But Emacs25 is available via an unofficial package.
I want to install different versions of the same software and run simultaneous builds.
Here is a wishful attempt of what it would look like (this doesn't work by the way):
matrix:
- emacs: "24"
- emacs: "25"
install:
- ps : switch($emacs){ "24" {choco install emacs} "25" {choco install emacs64} default {echo "Emacs install fail"}}
- refreshenv
build_script:
- some script
Thanks in advance.
emacs
is environment variable (not local one). Also YAML syntax require environment
tag before matrix
. You can always create configuration in UI and press Export YAML
button if you are not sure. And finally not space between ps
and :
. Other than that config is good. Here is fixed one:
environment:
matrix:
- emacs: 24
- emacs: 25
install:
- ps: switch($env:emacs){ 24 {choco install emacs} 25 {choco install emacs64} default {echo "Emacs install fail"}}
- refreshenv
Side note: I would recommend throw "Emacs install fail"
instead of echo
.