-
Notifications
You must be signed in to change notification settings - Fork 23
/
appveyor.yml
63 lines (50 loc) · 1.89 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Based on https://github.com/starkat99/appveyor-rust
# Rust needs at least Visual Studio 2013 Appveyor OS for MSVC targets.
os: Visual Studio 2015
branches:
only:
# Enable building pull requests.
#- master
# This is where pull requests from "bors r+" are built.
- staging
# This is where pull requests from "bors try" are built.
- trying
environment:
matrix:
# Stable 64-bit MSVC
- target: x86_64-pc-windows-msvc
# Stable 32-bit MSVC
# - target: i686-pc-windows-msvc
# Install Script
install:
# Install Node.js
- ps: Install-Product node ''
# Install rustup
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- "for /f %%i in (rust-toolchain) do set channel=%%i"
- rustup-init -yv --default-toolchain %channel% --default-host %target%
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin
- rustc -vV
- cargo -vV
# Install cache-s3
- ps: |
$env:CACHE_S3_VERSION="v0.1.5"
$env:OS_NAME="windows"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest https://github.com/fpco/cache-s3/releases/download/$env:CACHE_S3_VERSION/cache-s3-$env:CACHE_S3_VERSION-windows-x86_64.zip -OutFile cache-s3.zip
Expand-Archive cache-s3.zip -Destination .
# Test Script
# 'cargo test' takes care of building for us, so disable Appveyor's build stage.
# This prevents the "directory does not contain a project or solution file" error.
build: false
before_test:
- ps: .\cache-s3 --prefix=edit-text_win32_$(cat rust-toolchain) restore --max-size 3GiB
test_script:
- .\tools ci
after_test:
- ps: Remove-Item -Recurse -Force $ENV:UserProfile\.cargo\registry
- ps: |
.\tools book-only-is-modified
if ($LastExitCode -ne 0) {
.\cache-s3 --prefix=edit-text_win32_$(cat rust-toolchain) save -p edit-frontend\node_modules -p $ENV:UserProfile\.cargo -p target --max-size 3GiB
}