2018-12-12 19:33:21 +00:00
os : Visual Studio 2017
2016-08-13 14:30:29 +01:00
version : "{build}-{branch}"
2018-05-02 11:38:25 +01:00
configuration : RelWithDebInfo
2016-08-13 14:30:29 +01:00
2018-12-13 08:08:58 +00:00
platform :
- Win32
- x64
2016-12-15 20:44:55 +00:00
environment :
bintray_auth_token :
2018-08-12 21:47:02 +01:00
secure : PgsEA6TjHVf718zMnK7J/fT1hUAVNKBeWhpYgYaeCyeZk37VT4Ics6j7+B7ElLEr
github_auth_token :
secure : yDqT5l/e5MntbW99V6+MHlfFgNv+UIogFfeyUVqtFk5lFRB/dAraLLwKCLl6y+DH
2016-12-15 20:44:55 +00:00
2018-12-13 08:12:04 +00:00
matrix :
- PYTHON_VERSION : 2.7
- PYTHON_VERSION : 3.7
2016-12-15 20:44:55 +00:00
install :
2018-11-07 16:58:07 +00:00
- ps : (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/Ortham/ci-scripts/2.0.0/delete_old_bintray_versions.py', "$env:APPVEYOR_BUILD_FOLDER\delete_old_bintray_versions.py")
2016-12-15 20:44:55 +00:00
2016-08-13 14:30:29 +01:00
before_build :
2018-12-13 08:12:04 +00:00
- ps : $env:PYTHON_DIRECTORY_VERSION=$env:PYTHON_VERSION.Replace(".", "")
2016-08-13 14:30:29 +01:00
- cd %APPVEYOR_BUILD_FOLDER%
- ps : mkdir build
- cd build
2018-12-13 08:08:58 +00:00
- ps : |
if ($env:PLATFORM -eq 'Win32') {
2018-12-13 08:12:04 +00:00
cmake .. -G "Visual Studio 15 2017" -DPYTHON_EXECUTABLE="C:\Python${env:PYTHON_DIRECTORY_VERSION}\python.exe"
2018-12-13 08:08:58 +00:00
} else {
2018-12-13 08:12:04 +00:00
cmake .. -G "Visual Studio 15 2017 Win64" -DPYTHON_EXECUTABLE="C:\Python${env:PYTHON_DIRECTORY_VERSION}-x64\python.exe"
2018-12-13 08:08:58 +00:00
}
2016-08-13 14:30:29 +01:00
build :
verbosity : minimal
project : 'c:\projects\loot-api-python\build\loot_api_python.sln'
test_script :
2018-05-02 11:38:25 +01:00
- cd %APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%
2018-12-13 08:08:58 +00:00
- ps : $env:ARCHITECTURE=$env:PLATFORM.Substring($env:PLATFORM.Length - 2)
2018-12-13 08:12:04 +00:00
- py -%PYTHON_VERSION%-%ARCHITECTURE% -m unittest test
2016-08-13 14:30:29 +01:00
after_test :
2016-09-18 17:30:22 +01:00
- cd %APPVEYOR_BUILD_FOLDER%\build
2018-05-02 11:38:25 +01:00
- cpack -C %CONFIGURATION%
2016-08-13 14:30:29 +01:00
# AppVeyor checks out a specific commit, but that means the archive script
# can't tell which branch it's on, so rename the 7z archives.
- ps : $env:GIT_DESCRIBE = ((git describe --tags --long --always) | Out-String) -replace "`n|`r", ""
artifacts :
2018-12-13 08:12:04 +00:00
- path : build\package\loot_api_python-$(GIT_DESCRIBE)_$(APPVEYOR_REPO_BRANCH)-python$(PYTHON_VERSION)-win$(ARCHITECTURE).7z
2016-08-13 14:30:29 +01:00
name : loot_api_python
deploy :
- provider : BinTray
username : wrinklyninja
api_key :
2018-08-12 21:47:02 +01:00
secure : PgsEA6TjHVf718zMnK7J/fT1hUAVNKBeWhpYgYaeCyeZk37VT4Ics6j7+B7ElLEr
2018-08-06 21:07:20 +01:00
subject : loot
repo : snapshots
2016-08-13 14:30:29 +01:00
package : loot-api-python
version : $(GIT_DESCRIBE)_$(APPVEYOR_REPO_BRANCH)
publish : true
artifact : loot_api_python
2016-12-15 20:44:55 +00:00
2016-12-15 20:45:38 +00:00
- provider : GitHub
tag : $(APPVEYOR_REPO_TAG_NAME)
release : LOOT API Python Module v$(APPVEYOR_REPO_TAG_NAME)
description : |
2018-12-12 19:33:21 +00:00
Requires Windows 7 or later and the [MSVC 2017 x86 redistributable](https://download.visualstudio.microsoft.com/download/pr/749aa419-f9e4-4578-a417-a43786af205e/d59197078cc425377be301faba7dd87a/vc_redist.x86.exe), and [7-Zip](http://www.7-zip.org/) to extract the archive.
2016-12-15 20:45:38 +00:00
auth_token :
2018-08-12 21:47:02 +01:00
secure : yDqT5l/e5MntbW99V6+MHlfFgNv+UIogFfeyUVqtFk5lFRB/dAraLLwKCLl6y+DH
2016-12-15 20:45:38 +00:00
artifact : loot_api_python
draft : false
on :
appveyor_repo_tag : true
2016-12-15 20:44:55 +00:00
on_success :
2018-08-12 22:26:55 +01:00
- ps : python "$env:APPVEYOR_BUILD_FOLDER\delete_old_bintray_versions.py" -g loot/loot-api-python -b loot/snapshots/loot-api-python -u wrinklyninja -k $env:bintray_auth_token -t $env:github_auth_token -n 30