mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
cargo install no longer needs --force to upgrade to a newer version or if the desired version is already installed. This relies on a couple of extra files to cache, otherwise cargo doesn't recognise the cached cbindgen exe.
107 lines
4.2 KiB
YAML
107 lines
4.2 KiB
YAML
os: Visual Studio 2017
|
|
|
|
version: "{build}-{branch}"
|
|
|
|
configuration: RelWithDebInfo
|
|
|
|
platform:
|
|
- Win32
|
|
- x64
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
|
|
environment:
|
|
PATH: C:\Users\appveyor\.cargo\bin;$(APPVEYOR_BUILD_FOLDER)\Doxygen.1.8.14\tools;$(PATH)
|
|
github_auth_token:
|
|
secure: yDqT5l/e5MntbW99V6+MHlfFgNv+UIogFfeyUVqtFk5lFRB/dAraLLwKCLl6y+DH
|
|
bintray_auth_token:
|
|
secure: PgsEA6TjHVf718zMnK7J/fT1hUAVNKBeWhpYgYaeCyeZk37VT4Ics6j7+B7ElLEr
|
|
|
|
cache:
|
|
- C:\Users\appveyor\.cargo\bin\cbindgen.exe
|
|
- C:\Users\appveyor\.cargo\.crates.toml
|
|
- C:\Users\appveyor\.cargo\.crates2.json
|
|
|
|
install:
|
|
- curl -sSf -o rustup-init.exe https://win.rustup.rs/x86_64
|
|
- rustup-init.exe -y
|
|
- rustup target add i686-pc-windows-msvc
|
|
- cargo install cbindgen --version 0.13.2
|
|
- nuget install doxygen -Version 1.8.14
|
|
- py -3.7 -m pip install -r docs/requirements.txt
|
|
- ps: (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/Ortham/ci-scripts/2.1.3/delete_old_bintray_versions.py', "$env:APPVEYOR_BUILD_FOLDER\delete_old_bintray_versions.py")
|
|
- ps: if ($env:PLATFORM -eq "Win32") { $env:ADDRESS_MODEL = '32' } else { $env:ADDRESS_MODEL = '64' }
|
|
|
|
before_build:
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
- ps: mkdir build
|
|
- cd build
|
|
- ps: |
|
|
if ($env:PLATFORM -eq 'Win32') {
|
|
cmake .. -G "Visual Studio 15 2017" -DBOOST_ROOT="C:\Libraries\boost_1_67_0" -DBOOST_LIBRARYDIR="C:\Libraries\boost_1_67_0\lib32-msvc-14.1"
|
|
} else {
|
|
cmake .. -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT="C:\Libraries\boost_1_67_0" -DBOOST_LIBRARYDIR="C:\Libraries\boost_1_67_0\lib64-msvc-14.1"
|
|
}
|
|
|
|
build:
|
|
verbosity: minimal
|
|
project: '$(APPVEYOR_BUILD_FOLDER)\build\libloot.sln'
|
|
|
|
test_script:
|
|
- cd %APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%
|
|
# Some tests call Git, so set a user
|
|
- git config --global user.email "appveyor@ci"
|
|
- git config --global user.name "AppVeyor"
|
|
- libloot_internals_tests.exe --gtest_output=xml:libloot_internals_tests.xml
|
|
- libloot_tests.exe --gtest_output=xml:libloot_tests.xml
|
|
|
|
after_test:
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
- C:\Python37-x64\Scripts\sphinx-build -b html docs build\docs\html
|
|
- ps: $env:GIT_DESCRIBE = ((git describe --tags --long --always --abbrev=7) | Out-String) -replace "`n|`r", ""
|
|
- cd build
|
|
- cpack -C %CONFIGURATION%
|
|
|
|
artifacts:
|
|
- path: build\package\libloot-$(GIT_DESCRIBE)_$(APPVEYOR_REPO_BRANCH)-win$(ADDRESS_MODEL).7z
|
|
name: API
|
|
|
|
deploy:
|
|
- provider: BinTray
|
|
username: wrinklyninja
|
|
api_key:
|
|
secure: PgsEA6TjHVf718zMnK7J/fT1hUAVNKBeWhpYgYaeCyeZk37VT4Ics6j7+B7ElLEr
|
|
subject: loot
|
|
repo: snapshots
|
|
package: libloot
|
|
version: $(GIT_DESCRIBE)_$(APPVEYOR_REPO_BRANCH)
|
|
publish: true
|
|
artifact: API
|
|
|
|
- provider: GitHub
|
|
tag: $(APPVEYOR_REPO_TAG_NAME)
|
|
release: libloot v$(APPVEYOR_REPO_TAG_NAME)
|
|
description: |
|
|
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 archives.
|
|
|
|
## Change Logs
|
|
- [API](https://loot-api.readthedocs.io/en/$(APPVEYOR_REPO_TAG_NAME)/api/changelog.html)
|
|
- [Metadata Syntax](https://loot-api.readthedocs.io/en/$(APPVEYOR_REPO_TAG_NAME)/metadata/changelog.html)
|
|
|
|
*Note: The files below with `tar.xz` extensions contain Linux binaries. They won't work on Windows computers.*
|
|
auth_token:
|
|
secure: yDqT5l/e5MntbW99V6+MHlfFgNv+UIogFfeyUVqtFk5lFRB/dAraLLwKCLl6y+DH
|
|
artifact: API
|
|
draft: false
|
|
force_update: true
|
|
on:
|
|
appveyor_repo_tag: true
|
|
|
|
on_success:
|
|
- ps: py -3 "$env:APPVEYOR_BUILD_FOLDER\delete_old_bintray_versions.py" -g loot/libloot -b loot/snapshots/libloot -u wrinklyninja -k $env:bintray_auth_token -t $env:github_auth_token -n 30
|
|
|
|
on_finish:
|
|
- ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\libloot_internals_tests.xml")
|
|
- ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\libloot_tests.xml")
|