为什么allow_failures在此版本中不起作用?

时间:2019-10-21 11:22:42

标签: travis-ci

https://travis-ci.org/poma/ton/builds/600655302

allow_failures列表中列出了失败的2个作业,但是整个构建仍被标记为失败。为什么?

Travis配置:

if: tag IS blank
language: cpp
compiler: clang

matrix:
  include:
    - os: linux
      dist: bionic
      addons:
        apt:
          packages:
            - ninja-build
            - pkg-config
            - libssl-dev
            - zlib1g-dev
            - libreadline-dev
            - libmicrohttpd-dev
            - gperf
    - os: linux
      dist: xenial
      compiler: gcc
      addons:
        apt:
          packages:
            - ninja-build
            - pkg-config
            - libssl-dev
            - zlib1g-dev
            - libreadline-dev
            - libmicrohttpd-dev
            - gperf
    - os: osx
      osx_image: xcode11.2
      addons:
        homebrew:
          packages:
            - ninja
            - cmake
            - openssl
    - os: osx
      osx_image: xcode10.2
      addons:
        homebrew:
          packages:
            - ninja
            - cmake
            - openssl
    - os: osx
      osx_image: xcode9.4
      addons:
        homebrew:
          packages:
            - ninja
            - cmake
            - openssl

    - os: windows

allow_failures:
  - os: linux
    dist: xenial
  - os: windows

install:
  - env
  - ${CC} --version
  - ${CC} -v
  - ${CXX} --version
  - ${CXX} -v
  - git clone --recursive https://github.com/ton-blockchain/ton
  - cd ton
  - export COMMIT=`git rev-parse HEAD`
  - export COMMIT_SHORT=`git rev-parse --short HEAD`
  - export COMMIT_MESSAGE=`git log -1 --pretty=%B`
  - echo "Using git commit $COMMIT"
  - | 
    if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
      export RELEASE_FILE=ton_linux_${TRAVIS_DIST}_${TRAVIS_ARCH}_${TRAVIS_COMPILER}_${COMMIT_SHORT}.tar.gz
      wget https://test.ton.org/ton-lite-client-test1.config.json
      wget https://test.ton.org/ton-global.config.json
    elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
      export RELEASE_FILE=ton_osx_$(sw_vers -productVersion)_${TRAVIS_OSX_IMAGE}_${TRAVIS_ARCH}_${TRAVIS_COMPILER}_${COMMIT_SHORT}.tar.gz
      export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
      wget https://test.ton.org/ton-lite-client-test1.config.json
      wget https://test.ton.org/ton-global.config.json
    elif [[ "${TRAVIS_OS_NAME}" == "windows" ]]; then
      export RELEASE_FILE=ton_windows_${TRAVIS_ARCH}_${TRAVIS_COMPILER}_${COMMIT_SHORT}.tar.gz
    fi
  - |
    if [[ "${TRAVIS_OS_NAME}" == "windows" ]]; then
      choco install ninja gperf openssl getopt # zlib libmicrohttpd
      # git clone https://github.com/Microsoft/vcpkg.git
      # cd vcpkg
      # export VCPKG_DEFAULT_TRIPLET=x86-windows
      # ./bootstrap-vcpkg.bat
      # ./vcpkg integrate install
      # ./vcpkg install zlib # libmicrohttpd
      # cd ..
    fi

script:
  - mkdir build
  - cd build
  - cmake -G "Ninja" ..
  - ninja
# Also compatible with regular CMake build (slower)
#  - cmake -DCMAKE_TOOLCHAIN_FILE="../vcpkg/scripts/buildsystems/vcpkg.cmake" ..
#  - cmake .. 
#  - cmake --build .
#  - test?
  - mkdir -p release/lib
# todo: exe file names
  - |
    mv lite-client/lite-client \
       crypto/fift \
       crypto/tlbc \
       crypto/create-state \
       crypto/dump-block \
       crypto/func \
       validator-engine/validator-engine \
       validator-engine-console/validator-engine-console \
       tonlib/tonlib-cli \
       utils/generate-random-id \
       adnl/adnl-proxy \
       adnl/adnl-pong \
       tdnet/tcp_ping_pong \
       tdnet/udp_ping_pong \
       dht-server/dht-server \
       ../ton-lite-client-test1.config.json \
       ../ton-global.config.json \
       release/
  - |
    mv ../crypto/fift/lib/* \
       ../crypto/smartcont/stdlib.fc \
       release/lib/
  - tar -czvf $RELEASE_FILE release
# Skipped files:
# ./tl/generate/generate_common
# ./tl/generate/tonlib_generate_java_api
# ../tl/generate/scheme
# ./utils/json2tlo

before_deploy:
  - git config --local user.name "poma"
  - git config --local user.email "semenov.roman@mail.ru"
  - export TRAVIS_TAG=${TRAVIS_TAG:-build-$TRAVIS_BUILD_NUMBER}
  - git tag -f $TRAVIS_TAG

deploy:
  provider: releases
  name: TON binaries for commit $COMMIT_SHORT
#  body: "Last commit: $COMMIT_MESSAGE" # causes error in travis
  api_key:
    secure: FHXDvia6qgFleDoTVBoOgKYZKHN8GG5A98E9z/mO+5EZ4GNssa7kUZylXkNnDq1GFSiBI8GojME2MnryqPKPX7+eAdRW+BfxdjNoY2mkqKFV2pTSBfC5M6W/qvgYE7w8U+8vVKexPWl6AnX4ex5xwWE0Eu7LgI0eNCOOagypieO0E7VzB8Au8s4KQ+00VYt/U6i0hVvyHkQOksk7cpWXLZr3qkspBOlgBS2erOAKtw3uVdXSMa4XKVvHBTV+OmlDrTvPK66eGtopAGbS8MRtfJP4H5FULyD+uHCeyYj5eE1mEmUsOjMOrv7Q69rVYj9gAFbmFfAFv4uL+6mZSQwKw+sm6VmqUxxbii0pD7TXaUK0BBiVgKDSkV8v1qYJKCWkynjdznX4yzSsm7jh8AjnL9GCa7vGjngTniBZiVaTCr3NriEVpQ8/cWsqv3fWnvdjNg6gNysWg8mHQhclabNUhOoDVYJEuoyifxVqIWP0SEBuaZl/i/YA00EyIwsgTughbrjdX/odLCRKvfHtTRLwIjKAgpsVJ8UMYaCa7trfa8+NmIpDsGIpzq9CyxOaUBry0QQOO9IPVm/TfPpCqMTIpOmHqY22Re7fkwmIqfJxTXiLjVOH9d+oHj1+kUBw+HIP+lXv/3jd8HaI8fhxlyhFbeijLBrp5WY4oBSs2mx97tA=
  file: $RELEASE_FILE
  skip_cleanup: true

1 个答案:

答案 0 :(得分:0)

allow_failures应该在matrix以下,但必须是顶级