From da63c0ffdc42d25bbd7221761d3571150c7e7016 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Mon, 20 May 2019 21:54:55 +0300 Subject: [PATCH] travis: enable windows build and ditch appveyor Fixes #2176 Signed-off-by: Ruslan Kuprieiev --- .appveyor.yml | 91 ------------------------------------- .travis.yml | 10 ++++ README.rst | 4 -- scripts/build_windows.cmd | 0 scripts/ci/before_deploy.sh | 6 ++- 5 files changed, 15 insertions(+), 96 deletions(-) delete mode 100644 .appveyor.yml mode change 100644 => 100755 scripts/build_windows.cmd diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 1a704faac..000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,91 +0,0 @@ -cache: - - C:\ProgramData\chocolatey\bin -> appveyor.yml - - C:\ProgramData\chocolatey\lib -> appveyor.yml - -platform: x86 - -environment: - aws_access_key_id: - secure: veTfhOrd4wUpG7NlRsvS3tufuaFfST8i7SZa2HVH6Vc= - aws_secret_access_key: - secure: nCQcN/Mzce0erwcNOU3yAuWgF6ZuTvPBEqTF3XFp1poGcDbSIg+s67eVxsxWCXQj - GCP_CREDS: - secure: 96fJ3r2i2GohbXHwnSs5N4EplQ7q8YmLpPWM0AC+f4s= - CODECOV_TOKEN: - secure: XN4jRtmGE5Bqg8pPZkwNs7kn3UEI73Rkldqc0MGsQISZBm5TNJZOPofDMc1QnUsf - AZURE_STORAGE_CONTAINER_NAME: appveyor-tests - AZURE_STORAGE_CONNECTION_STRING: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1; - OSS_ENDPOINT: localhost:50004 - OSS_ACCESS_KEY_ID: AccessKeyID - OSS_ACCESS_KEY_SECRET: AccessKeySecret - - matrix: - - - PYTHON: "C:\\Python27" - PYTHON_VERSION: "2.7.x" - PYTHON_ARCH: "32" - RUBY: C:\Ruby25\bin - - - PYTHON: "C:\\Python37" - PYTHON_VERSION: "3.7.x" - PYTHON_ARCH: "32" - RUBY: C:\Ruby25\bin - -install: - - cinst awscli - - cinst wget - - cinst gcloudsdk - - cinst gsutil - - cinst openssl.light --version 1.1.1 - - refreshenv - - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%RUBY%;%PATH%" - - git clone -q https://github.com/iterative/oss-emulator.git - - gem install thor builder - - ps: cd oss-emulator - - ps: $OSSProcess = Start-Process -FilePath ruby -ArgumentList "bin\emulator -r store -p 50004" -PassThru -NoNewWindow - - ps: cd .. - # NOTE: azurite 3 on py3 suffers from bug [1], so we are using an older - # tried-and-true version instead. - # - # [1] https://github.com/Azure/Azurite/issues/215 - - npm install -g azurite@2.7.0 - - ps: $AzuriteProcess = Start-Process azurite-blob -PassThru - - python -m pip install -U pip setuptools wheel - - pip install .[all,tests] - - where dvc - - dvc --version - -build: false - -before_test: - - pip uninstall -y awscli # Using awscli from chocolatey - - aws configure set aws_access_key_id "%aws_access_key_id%" - - aws configure set aws_secret_access_key "%aws_secret_access_key%" - - aws configure set region us-east-2 - - openssl enc -d -aes-256-cbc -md md5 -k "%GCP_CREDS%" -in scripts\ci\gcp-creds.json.enc -out scripts\ci\gcp-creds.json & exit 0 - -test_script: - - python -mtests - -after_test: - - if "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" pip install codecov - - if "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" codecov - - if "%APPVEYOR_REPO_TAG%"=="true" python -m dvc pull - - if "%APPVEYOR_REPO_TAG%"=="true" .\scripts\build_windows.cmd - -on_finish: - - ps: Stop-Process $AzuriteProcess - - ps: Stop-Process $OSSProcess - -artifacts: - - path: dvc*.exe - name: DVC Installer - -deploy: - provider: GitHub - auth_token: - secure: 25c1pNoXWbtTwUkKLcThwcl2A2xG8oXHsPuD73HVbQ7SRy9X6HzkCc2sXzhpfRtF - on: - APPVEYOR_REPO_TAG: true - PYTHON_VERSION: "3.7.x" - PYTHON_ARCH: "32" diff --git a/.travis.yml b/.travis.yml index 9a11871fe..fef9a3d7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,16 @@ env: # version, that causes fpm to crash. matrix: include: + - name: "Python 2.7 on Windows" + os: windows # Windows 10.0.17134 N/A Build 17134 + language: shell # 'language: python' is an error on Travis CI Windows + before_install: choco install python2 + env: PATH=/c/Python27:/c/Python27/Scripts:$PATH + - name: "Python 3.7 on Windows" + os: windows # Windows 10.0.17134 N/A Build 17134 + language: shell # 'language: python' is an error on Travis CI Windows + before_install: choco install python + env: PATH=/c/Python37:/c/Python37/Scripts:$PATH - name: "2.7" env: - PYTHON_VER=2.7.13 diff --git a/README.rst b/README.rst index e93869c9f..28094ea14 100644 --- a/README.rst +++ b/README.rst @@ -13,10 +13,6 @@ :target: https://travis-ci.com/iterative/dvc :alt: Travis -.. image:: https://ci.appveyor.com/api/projects/status/github/iterative/dvc?branch=master&svg=true - :target: https://ci.appveyor.com/project/iterative/dvc/branch/master - :alt: Windows Build - .. image:: https://codeclimate.com/github/iterative/dvc/badges/gpa.svg :target: https://codeclimate.com/github/iterative/dvc :alt: Code Climate diff --git a/scripts/build_windows.cmd b/scripts/build_windows.cmd old mode 100644 new mode 100755 diff --git a/scripts/ci/before_deploy.sh b/scripts/ci/before_deploy.sh index 64487d179..f314b05d2 100644 --- a/scripts/ci/before_deploy.sh +++ b/scripts/ci/before_deploy.sh @@ -32,4 +32,8 @@ if [[ "$TRAVIS_OS_NAME" == "osx" && "$TRAVIS_OSX_IMAGE" != "xcode7.3" ]]; then exit 0 fi -./scripts/build_posix.sh +if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then + ./scripts/build_windows.cmd +else + ./scripts/build_posix.sh +fi