2016-03-08 06:14:05 +08:00
|
|
|
environment:
|
|
|
|
global:
|
|
|
|
PROJECT_NAME: mdBook
|
2017-06-20 16:09:20 +08:00
|
|
|
nodejs_version: "6"
|
2016-03-08 06:14:05 +08:00
|
|
|
matrix:
|
|
|
|
# Stable channel
|
|
|
|
- TARGET: i686-pc-windows-msvc
|
|
|
|
RUST_CHANNEL: stable
|
|
|
|
- TARGET: x86_64-pc-windows-msvc
|
|
|
|
RUST_CHANNEL: stable
|
|
|
|
# Beta channel
|
|
|
|
- TARGET: i686-pc-windows-msvc
|
|
|
|
RUST_CHANNEL: beta
|
|
|
|
- TARGET: x86_64-pc-windows-msvc
|
|
|
|
RUST_CHANNEL: beta
|
|
|
|
# Nightly channel
|
|
|
|
- TARGET: i686-pc-windows-msvc
|
|
|
|
RUST_CHANNEL: nightly
|
|
|
|
- TARGET: x86_64-pc-windows-msvc
|
|
|
|
RUST_CHANNEL: nightly
|
|
|
|
|
|
|
|
# Install Rust and Cargo
|
|
|
|
install:
|
2017-07-07 23:00:39 +08:00
|
|
|
- ps: >-
|
|
|
|
If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') {
|
|
|
|
$Env:PATH += ';C:\msys64\mingw64\bin'
|
|
|
|
} ElseIf ($Env:TARGET -eq 'i686-pc-windows-gnu') {
|
|
|
|
$Env:PATH += ';C:\msys64\mingw32\bin'
|
|
|
|
}
|
|
|
|
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
|
|
|
|
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_CHANNEL%
|
|
|
|
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
|
|
|
- rustc -Vv
|
2016-03-08 06:14:05 +08:00
|
|
|
- cargo -V
|
2017-06-20 16:09:20 +08:00
|
|
|
- ps: Install-Product node $env:nodejs_version
|
|
|
|
- node --version
|
|
|
|
- npm --version
|
|
|
|
- npm install -g stylus nib
|
2016-03-08 06:14:05 +08:00
|
|
|
|
|
|
|
build: false
|
|
|
|
|
|
|
|
# Equivalent to Travis' `script` phase
|
|
|
|
test_script:
|
|
|
|
- cargo build --verbose
|
2017-06-20 16:09:20 +08:00
|
|
|
- cargo build --verbose --features=regenerate-css
|
2018-04-23 02:36:02 +08:00
|
|
|
- cargo test --verbose --features=win-bash-tests
|
2016-03-08 06:14:05 +08:00
|
|
|
|
|
|
|
before_deploy:
|
|
|
|
# Generate artifacts for release
|
|
|
|
- cargo build --release
|
|
|
|
- mkdir staging
|
|
|
|
- copy target\release\mdbook.exe staging
|
|
|
|
- cd staging
|
|
|
|
- 7z a ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip *
|
2016-03-08 07:01:05 +08:00
|
|
|
- appveyor PushArtifact ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip
|
2016-03-08 06:14:05 +08:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
description: 'Windows release'
|
|
|
|
artifact: /.*\.zip/
|
|
|
|
auth_token:
|
|
|
|
secure: QQhjKVyz7mpjlyGhlXytbFQQfKFQWTahHkD+B0NzIUoEVqO7ZLWjnoWasvLqW4nE
|
|
|
|
provider: GitHub
|
|
|
|
on:
|
|
|
|
RUST_CHANNEL: stable
|
|
|
|
appveyor_repo_tag: true
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|