【问题标题】:Appveyor skip the "install" statementAppveyor 跳过“安装”语句
【发布时间】:2020-10-10 20:52:05
【问题描述】:

我正在尝试将我的项目绑定到 AppVeyor。出于我的目的,我需要一些开源库。我已经通过git submodule 包含了这些内容。

整个文件看起来像:

version: 1.0.{build}

branches:
    only:
    - master

clone_folder: c:\projects\emscripten-opengl

install:
    - cd %APPVEYOR_BUILD_FOLDER%
    - git submodule update --init --recursive

image:
- Visual Studio 2019
- Visual Studio 2017

configuration:
- Debug
- Release

platform:
- x64

environment:
    matrix:
    - arch: Win64

init:
- set arch=
- if "%arch%"=="Win64" ( set arch= Win64)
- echo %arch%
- echo %APPVEYOR_BUILD_WORKER_IMAGE%
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( set generator="Visual Studio 15 2017%arch%" )
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" ( set generator="Visual Studio 14 2015%arch%" )
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" ( set generator="Visual Studio 12 2013%arch%" )
- echo %generator%

before_build:
- cmd: |-
    mkdir build
    cd build
    cmake --version
    cmake -DENABLE_TESTS=ON .. -G %generator%

build:
    project: c:\projects\emscripten-opengl\build\Emscripten_Graphics.sln
    verbosity: minimal
    parallel: true

但是,根据日志,缺少安装规则,例如:

Build started
set arch=
if "%arch%"=="Win64" ( set arch= Win64)
echo %arch%
 Win64
echo %APPVEYOR_BUILD_WORKER_IMAGE%
Visual Studio 2017
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( set generator="Visual Studio 15 2017%arch%" )
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" ( set generator="Visual Studio 14 2015%arch%" )
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" ( set generator="Visual Studio 12 2013%arch%" )
echo %generator%
"Visual Studio 15 2017 Win64" 
git clone -q --branch=master https://github.com/JuiceFV/Emscripten_OpenGL.git c:\projects\emscripten-opengl
git checkout -qf 2b05c66d4fe51784238cef4016823482970e4345
mkdir build
cd build
cmake --version
cmake version 3.16.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
cmake -DENABLE_TESTS=ON .. -G %generator%
-- The C compiler identification is MSVC 19.16.27035.0
-- The CXX compiler identification is MSVC 19.16.27035.0
...

我已经尝试了 herehere 的所有方法,但没有任何效果。我在哪里认错了?

【问题讨论】:

  • 可以是install部分中项目的缩进(4个空格)吗?
  • 不,我尝试了两个选项(带和不带缩进)。

标签: continuous-integration yaml appveyor


【解决方案1】:

YAML 对制表符和空格很敏感,请尝试格式化 install 部分,例如 init

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-25
    • 2011-02-22
    相关资源
    最近更新 更多