diff --git a/.appveyor.yml b/.appveyor.yml index afee760..ba543f6 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,17 +2,31 @@ environment: matrix: - PYTHON: "C:\\Python27-x64" TARGET: x86_64-pc-windows-msvc + TAG_SCENARIO: true - PYTHON: "C:\\Python36-x64" TARGET: x86_64-pc-windows-msvc + TAG_SCENARIO: false + - PYTHON: "C:\\Python36-x64" + TARGET: x86_64-pc-windows-msvc + TAG_SCENARIO: true - PYTHON: "C:\\Python37-x64" TARGET: x86_64-pc-windows-msvc + TAG_SCENARIO: true + - PYTHON: "C:\\Python27" + TARGET: i686-pc-windows-msvc + TAG_SCENARIO: true + - PYTHON: "C:\\Python36" + TARGET: i686-pc-windows-msvc + TAG_SCENARIO: true + - PYTHON: "C:\\Python37" + TARGET: i686-pc-windows-msvc + TAG_SCENARIO: true branches: only: - master install: - - if NOT "%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH:~0,8%" == "release/" if NOT "%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH:~0,5%" == "main/" appveyor exit - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - rustup-init.exe -y --default-host %TARGET% - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin @@ -25,36 +39,46 @@ install: build: false test_script: - - cargo build --verbose - - cargo test --all --verbose - - cd python - - "%PYTHON%\\python.exe -m pip install -e . --verbose --install-option=\"--verbose\"" - - "%PYTHON%\\python.exe -m unittest discover" + - IF NOT "%APPVEYOR_REPO_TAG%" == "true" cargo build --verbose + - IF NOT "%APPVEYOR_REPO_TAG%" == "true" cargo test --all --verbose + - IF NOT "%APPVEYOR_REPO_TAG%" == "true" cd python + - IF NOT "%APPVEYOR_REPO_TAG%" == "true" %PYTHON%\\python.exe -m pip install -e . --verbose --install-option="--verbose" + - IF NOT "%APPVEYOR_REPO_TAG%" == "true" %PYTHON%\\python.exe -m unittest discover + - IF NOT "%APPVEYOR_REPO_TAG%" == "true" cd .. after_test: + - IF NOT "%APPVEYOR_REPO_TAG%" == "true" appveyor exit - ECHO "BUILDING WHEELS..." + - cd python - "%PYTHON%\\python.exe setup.py bdist_wheel" + - cd .. artifacts: - path: python\dist\* name: pypiartifacts -cache: -- target -- python\ffi\target -- C:\Users\appveyor\.cargo\registry +deploy: + tag: $(APPVEYOR_REPO_TAG_NAME) + provider: GitHub + auth_token: + secure: Q6QElmu6htnldLRgDcG2J/BkmG3lFMKeqnYsb/o1bCHphWeDk6vJT+e5FRM4wB4d + artifact: pypiartifacts + on: + APPVEYOR_REPO_TAG: true for: - - branches: + # non-tagged scenario + matrix: only: - - master - - environment: - matrix: - - PYTHON: "C:\\Python27" - TARGET: i686-pc-windows-msvc - - PYTHON: "C:\\Python36" - TARGET: i686-pc-windows-msvc - - PYTHON: "C:\\Python37" - TARGET: i686-pc-windows-msvc + - TAG_SCENARIO: false + + skip_tags: true + +- + # tagged scenario + matrix: + only: + - TAG_SCENARIO: true + + skip_non_tags: true