windows - 如何让AppVeyor使用不同版本的Emacs?

标签 windows powershell emacs appveyor

我想使用不同版本的 Emacs。我想我必须使用构建矩阵功能来做到这一点。我四处搜索,找不到它是如何完成的。

我将使用 Choco 来安装我的包。默认版本是 Emacs24。但 Emacs25 可通过非官方软件包获得。

我想安装同一软件的不同版本并同时运行构建。

这是对它的外观的一厢情愿的尝试(顺便说一下,这不起作用):

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

提前致谢。

最佳答案

emacs环境 变量(不是本地 变量)。此外,YAML 语法需要在 matrix 之前使用 environment 标签。如果不确定,您始终可以在 UI 中创建配置并按 Export YAML 按钮。最后 ps: 之间没有空格。除了那个配置是​​好的。这是固定的:

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

旁注:我会推荐 throw "Emacs install fail" 而不是 echo

关于windows - 如何让AppVeyor使用不同版本的Emacs?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45807886/

相关文章:

c++ - 播放波形文件立即结束(C++,Windows)

c++ - 如何使用 Code::Blocks 或 MinGW 在 Windows 上构建 CPP-NETLIB 库

java 路径未指向 Windows 中的 sdk 路径

c++ - HPET 的频率 vs CPU 频率用于测量时间

Powershell Web 访问导致 404

emacs - Emacs Lisp 的自然顺序排序

powershell - Powershell Out-File在文件顶部添加换行符-Out-File与Set-Content

python - 在 Jupyter Notebook 中执行 Windows PowerShell 命令

Emacs 中的 Python 类型提示

emacs - Emacs组织模式导出减价