让 AppVeyor 允许 Python 失败
Getting AppVeyor to allow failures with Python
我一直在摆弄 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 构建?
Allow failures 对于某些特定的矩阵配置并不意味着此配置的作业将始终为绿色。这意味着即使此作业失败,也不会影响整个构建的状态。
platform
主要对 Visual Studio solutions/projects 有意义,对于你的情况,这样的事情应该可行:
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"
我一直在摆弄 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 构建?
Allow failures 对于某些特定的矩阵配置并不意味着此配置的作业将始终为绿色。这意味着即使此作业失败,也不会影响整个构建的状态。
platform
主要对 Visual Studio solutions/projects 有意义,对于你的情况,这样的事情应该可行:
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"