2017-04-18 69 views
0

我一直插科打諢與AppVeyor試着和我的GitHub的項目得到它的設置。我的AppVeyor版本可以位於here獲取AppVeyor允許失敗與Python

由於我使用Python,而且有這麼多版本,我希望能夠允許3.2,3.3和3.4失敗。我可以特拉維斯-CI做精,通過鍵入:

python: 
    - "2.7" 
    - "3.2" # End of life. 
    - "3.3" 
    - "3.4" 
    - "3.5" 
    - "3.6" 
    - "nightly" 

matrix: 
    allow_failures: 
    - python: "3.2" 
    - python: "3.3" 
    - python: "3.4" 
    - python: "nightly" 

在AppVeyor不過,我也做了以下內容:

environment: 
    matrix: 
     # 32-bit Python. 
    - PYTHON: "C:\\Python27" 
     PYTHON_VERSION: "2.7.x" 
     PYTHON_ARCH: "32" 
    - PYTHON: "C:\\Python32" 
     PYTHON_VERSION: "3.2.x" 
     PYTHON_ARCH: "32" 
    - PYTHON: "C:\\Python33" 
     PYTHON_VERSION: "3.3.x" 
     PYTHON_ARCH: "32" 
    - PYTHON: "C:\\Python34" 
     PYTHON_VERSION: "3.4.x" 
     PYTHON_ARCH: "32" 
    - PYTHON: "C:\\Python35" 
     PYTHON_VERISON: "3.5.x" 
     PYTHON_ARCH: "32" 
    - PYTHON: "C:\\Python36" 
     PYTHON_VERISON: "3.6.x" 
     PYTHON_ARCH: "32" 

     # 64-bit Python. 
    - PYTHON: "C:\\Python27-x64" 
     PYTHON_VERSION: "2.7.x" 
     PYTHON_ARCH: "64" 
    - PYTHON: "C:\\Python32-x64" 
     PYTHON_VERSION: "3.2.x" 
     PYTHON_ARCH: "64" 
    - PYTHON: "C:\\Python33-x64" 
     PYTHON_VERSION: "3.3.x" 
     PYTHON_ARCH: "64" 
    - PYTHON: "C:\\Python34-x64" 
     PYTHON_VERSION: "3.4.x" 
     PYTHON_ARCH: "64" 
    - PYTHON: "C:\\Python35-x64" 
     PYTHON_VERISON: "3.5.x" 
     PYTHON_ARCH: "64" 
    - PYTHON: "C:\\Python36-x64" 
     PYTHON_VERISON: "3.6.x" 
     PYTHON_ARCH: "64" 

matrix: 
    allow_failures: 
     - platform: x86 
      PYTHON: "C:\\Python32" 
      PYTHON_VERSION: "3.2.x" 
     - platform: x86 
      PYTHON: "C:\\Python33" 
      PYTHON_VERSION: "3.3.x" 
     - platform: x86 
      PYTHON: "C:\\Python34" 
      PYTHON_VERSION: "3.4.x" 
     - platform: x64 
      PYTHON: "C:\\Python32-x64" 
      PYTHON_VERSION: "3.2.x" 
     - platform: x64 
      PYTHON: "C:\\Python33-x64" 
      PYTHON_VERSION: "3.3.x" 
     - platform: x64 
      PYTHON: "C:\\Python34-x64" 
      PYTHON_VERSION: "3.4.x" 

你可以用我的最新構建見下文,它是仍然未能檢測到3.3 x64位的故障允許。

Image of AppVeyor failures.

現在,我擡頭一看如何正確格式化我的允許,失敗和找不到任何的Python。一但我沒有找到,當時掀起了GitHub的項目,在註釋中埋藏掉的,所以我只是假設按照這個格式:

#matrix: 
# allow_failures: 
# - platform: x86 
#  PYTHON: "C:\\Python27" 
#  PYTHON_VERSION: "2.7" 

所以我的問題是,我怎麼能得到AppVeyor讓我爲x86和x64位體系結構失敗某些Python版本?

回答

1

Allow failures某些特定矩陣配置並不意味着工作該配置將是永遠的綠色。這意味着即使這個工作失敗了也不會影響整個構建的狀態。

platform有意義大多爲Visual Studio解決方案/項目,你的情況是這樣的應該工作正常:

matrix: 
    allow_failures: 
     - PYTHON: "C:\\Python32" 
     PYTHON_VERSION: "3.2.x" 
     PYTHON_ARCH: "32" 
     - PYTHON: "C:\\Python33" 
     PYTHON_VERSION: "3.3.x" 
     PYTHON_ARCH: "32" 
     - PYTHON: "C:\\Python34" 
     PYTHON_VERSION: "3.4.x" 
     PYTHON_ARCH: "32" 
     - PYTHON: "C:\\Python32-x64" 
     PYTHON_VERSION: "3.2.x" 
     PYTHON_ARCH: "64" 
     - PYTHON: "C:\\Python33-x64" 
     PYTHON_VERSION: "3.3.x" 
     PYTHON_ARCH: "64" 
     - PYTHON: "C:\\Python34-x64" 
     PYTHON_VERSION: "3.4.x" 
     PYTHON_ARCH: "64" 
+0

YES!非常感謝! – finnrayment