如何在 AppVeyor/Travis CI 构建期间确定配置?

How to determine the configuration during a AppVeyor/Travis CI build?

如何在 AppVeyor/Travis CI 构建期间确定配置?

我为发布和调试构建我的项目,在每个构建中我想 运行 我的 test.exe 它将在发布构建的 Release 文件夹和调试构建的 Debug 文件夹中

这两种尝试都不起作用。

如果能够引用构建产品放置的位置就好了。

AppVeyor.yml

test_script:
  - cd Build
  - cd $env:CONFIGURATION
  - UtilsTests.exe

Travis.yml

matrix:
  include:
    - os: osx
      osx_image: xcode8.3
      compiler: clang
      script: 
        - brew update          
        - cmake . -G Xcode
        - xcodebuild
        - ./UtilsTests

正确的cd命令应该是:

- cd %CONFIGURATION%