forked from steffengy/schannel-rs
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
appveyor.yml
42 lines (42 loc) · 1.76 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
environment:
matrix:
- TARGET: x86_64-pc-windows-msvc
VERSION: nightly
- TARGET: i686-pc-windows-msvc
VERSION: nightly
- TARGET: x86_64-pc-windows-gnu
VERSION: nightly
- TARGET: i686-pc-windows-gnu
VERSION: 1.10.0
access_token:
secure: ZxcrtxQXwszRYNN6c1ZIagczEqzmQQZeYHY58izcmF0jdq/cptxJvFUoVxDmnoqj
install:
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:VERSION}-${env:TARGET}.exe" -FileName "rust-nightly.exe"
- ps: .\rust-nightly.exe /VERYSILENT /NORESTART /DIR="C:\rust" | Out-Null
- ps: $env:PATH="$env:PATH;C:\rust\bin"
- rustc -vV
- cargo -vV
- echo install
build_script:
- if "%TARGET%" == "x86_64-pc-windows-msvc" ( cargo doc --no-deps )
- echo build
test_script:
# TODO remove this loop when server 2016 lands on appveyor; related to https://github.com/steffengy/schannel-rs/issues/8
- ps: for($i=1; $i -le 3; $i++) { cmd /c "cargo test 2>&1"; if ($?) { break } }
deploy_script:
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):[email protected]`n"
- set deploy=1
- if not "%APPVEYOR_REPO_NAME%" == "steffengy/schannel-rs" ( set deploy=0 )
- if not "%APPVEYOR_REPO_BRANCH%" == "master" ( set deploy=0 )
- if defined APPVEYOR_PULL_REQUEST_NUMBER ( set deploy=0 )
- if not exist "target\doc" ( set deploy=0 )
- git config --global credential.helper store
- git config --global user.name "Appveyor Worker"
- git config --global user.email "<>"
- if "%deploy%"=="1" ( move target\doc ..\doc )
- git checkout gh-pages
- rd /s /q doc
- if "%deploy%"=="1" ( move ..\doc doc )
- git add -A doc
- 'git commit -am "Appveyor: Autoupdate documentation for %APPVEYOR_REPO_COMMIT%" & ver > nul'
- 'if "%deploy%"=="1" ( git push origin gh-pages & ver > nul )'