Skip to content
Snippets Groups Projects
appveyor.yml 5.55 KiB
# Based on https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml
version: '{build}'

environment:
  global:
    # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
    # /E:ON and /V:ON options are not enabled in the batch script intepreter
    # See: http://stackoverflow.com/a/13751649/163740
    WITH_COMPILER: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_compiler.cmd"

  matrix:
    - PYTHON: "C:\\Python37-x64"
      PYTHON_ARCH: "64"
      MINICONDA: C:\Miniconda37-x64
      COMM_PY: "py37"

      
install:
- ps: | # set env vars for versioning
    $env:COMM_TAG = $(git describe --tags $(git rev-list --tags --max-count=1))
    $env:COMM_COUNT = $(git rev-list --count HEAD)
    $env:COMM_HASH = $env:APPVEYOR_REPO_COMMIT.Substring(0,8)
    
    if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
        $env:BUILD = "beempy-{0}-{1}-{2}_win64.zip" -f $env:COMM_TAG, $env:COMM_HASH, $env:COMM_PY
        $env:BUILD2 = "beempy-onefile-{0}-{1}-{2}_win64.zip" -f $env:COMM_TAG, $env:COMM_HASH, $env:COMM_PY
        $env:BUILD3 = "BeempySetup-{0}-{1}-{2}_win64.exe" -f $env:COMM_TAG, $env:COMM_HASH, $env:COMM_PY
        $env:AVVER = "{0}-{1}" -f $env:COMM_TAG.TrimStart("v"), $env:COMM_HASH
    }
    else {
        $env:BUILD = "beempy-{0}-{1}-{2}-{3}_win64.zip" -f $env:COMM_TAG, $env:COMM_COUNT, $env:COMM_HASH, $env:COMM_PY
        $env:BUILD2 = "beempy-onefile-{0}-{1}-{2}-{3}_win64.zip" -f $env:COMM_TAG, $env:COMM_COUNT, $env:COMM_HASH, $env:COMM_PY
        $env:BUILD3 = "BeempySetup-{0}-{1}-{2}-{3}_win64.exe" -f $env:COMM_TAG, $env:COMM_COUNT, $env:COMM_HASH, $env:COMM_PY
        $env:AVVER = "{0}-{1}" -f $env:COMM_TAG.TrimStart("v"), $env:COMM_COUNT
    }

- ps: | # used for experimental build warnings for pr builds
    $env:BRANCH = "{0}/{1}/#{2}" -f $env:APPVEYOR_REPO_NAME, `
      $env:APPVEYOR_REPO_BRANCH, $env:APPVEYOR_PULL_REQUEST_NUMBER
    $env:BRANCH = $env:BRANCH -replace "/#$"

#- set "PATH=%PYTHON%;%PYTHON%\\Scripts;%PYTHON%\\Tools\\Scripts;%PATH%"
- cmd: set "PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
#- set VCINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
- cmd: set CL=-FI"%VCINSTALLDIR%\INCLUDE\stdint.h"
- cmd: conda config --set always_yes yes --set changeps1 no
- cmd: conda config --add channels conda-forge
- cmd: conda config --add channels wheeler-microfluidics
- cmd: conda update -q conda
- cmd: conda info -a
- cmd: conda install --yes conda-build setuptools pip parameterized cryptography
- cmd: conda install --yes pycryptodomex ruamel.yaml pytest pytest-mock coverage mock appdirs pylibscrypt pywin32
- cmd: pip install scrypt -U
- cmd: conda install --yes ecdsa requests websocket-client pytz six Click prettytable pyinstaller click-shell diff-match-patch asn1crypto


build_script:
 # Build the compiled extension
- cmd: activate root
- cmd: python setup.py build
- cmd: python setup.py install --user

test_script:
# Run the project tests
- cmd: activate root
- cmd: py.test tests/beembase
- cmd: py.test tests/beemgraphene

after_test: