# reference: https://www.appveyor.com/docs/appveyor-yml/ version: 0.3.{build} # build all branches by default image: Visual Studio 2017 platform: x64 configuration: Debug clone_folder: c:\projects\onnx clone_depth: 2 # pick as per https://www.appveyor.com/docs/build-environment/#python environment: global: ONNX_NAMESPACE: ONNX_NAMESPACE_FOO_BAR_FOR_CI matrix: - CONDA_PREFIX: C:\Miniconda35-x64 ONNX_VERIFY_PROTO3: 1 - CONDA_PREFIX: C:\Miniconda36-x64 ONNX_VERIFY_PROTO3: 1 - CONDA_PREFIX: C:\Miniconda36 - CONDA_PREFIX: C:\Miniconda35 - CONDA_PREFIX: C:\Miniconda37-x64 - CONDA_PREFIX: C:\Miniconda37 install: - cmd: git submodule update --init --recursive before_build: - cmd: SET PATH=%CONDA_PREFIX%;%CONDA_PREFIX%\Scripts;%PATH% - cmd: SET _prefix=%CONDA_PREFIX:~0,14% - > IF "%_prefix%"=="C:\Miniconda37" ( conda install -y -c conda-forge libprotobuf=3.5.2 numpy && set "PATH=%PATH%;%CONDA_PREFIX%\Library\bin" ) ELSE ( IF "%CONDA_PREFIX%"=="C:\Miniconda36-x64" ( conda install -y -c conda-forge libprotobuf=3.5.2 numpy=1.17.0 ) ELSE ( conda install -y -c conda-forge libprotobuf=3.5.2 numpy ) ) - cmd: pip install --quiet pytest nbval numpy build_script: # Build and test onnx. - cmd: cd c:\projects\onnx - cmd: set ONNX_BUILD_TESTS=1 - cmd: python setup.py --quiet bdist_wheel --universal --dist-dir . - cmd: dir /s /b /a-d "onnx_gtests.exe" >UT.txt & set /p _UT= < UT.txt & %_UT% - cmd: dir /b /a-d "*.whl" >WheelFile.txt & set /p _wheel= < WheelFile.txt - cmd: pip install %_wheel% - cmd: pytest - cmd: python onnx/defs/gen_doc.py - cmd: python onnx/gen_proto.py # Run type checks - cmd: pip uninstall -y %_wheel% - cmd: rm -rf .setuptools-cmake-build - cmd: pip install --quiet -e .[mypy] - cmd: python setup.py typecheck # TODO: protobuf files generated by generate-data below show format diffs right now. # Will figure out and fix it in separate PR. #- cmd: C:\Miniconda36\Scripts\backend-test-tools generate-data - cmd: git diff --exit-code # add after_test commands to collect logs and such # add artifacts: -path to collect build artifacts # commented out to avoid comments on threads # notifications: # - provider: GitHubPullRequest # on_build_success: true # on_build_failure: true # on_build_status_changed: true