我一直在搞乱AppVeyor尝试使用我的GitHub项目进行设置。我的AppVeyor版本可以位于here。
由于我使用的是Python,并且版本太多,我希望能够允许3.2,3.3和3.4失败。通过键入:
,我可以使用Travis-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位的故障容差。
现在我已经查找了如何正确格式化允许失败并且无法找到Python的任何内容。然而,我发现的那个是一个GitHub项目,被遗忘在评论中,所以我只是假设遵循这种格式:
#matrix:
# allow_failures:
# - platform: x86
# PYTHON: "C:\\Python27"
# PYTHON_VERSION: "2.7"
所以我的问题是,如何才能让AppVeyor让x86和x64位体系结构的某些Python构建失败?
答案 0 :(得分: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"