-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
94 lines (86 loc) · 2.97 KB
/
Copy pathappveyor.yml
File metadata and controls
94 lines (86 loc) · 2.97 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
environment:
VisualStudioVersion: 8.0
global:
# This will be used as part of the zipfile name
# TODO change the project name
CRATE_NAME: geojson_d3
# TODO This is the Rust channel that build jobs will use by default but can be
# overridden on a case by case basis down below
RUST_VERSION: stable
# TODO feel free to delete targets/channels you don't need
matrix:
# Stable channel
- TARGET: i686-pc-windows-msvc
RUST_VERSION: stable
- TARGET: x86_64-pc-windows-msvc
RUST_VERSION: nightly
# Beta channel
- TARGET: i686-pc-windows-msvc
RUST_VERSION: beta
# - TARGET: x86_64-pc-windows-gnu
# RUST_VERSION: beta
# Nightly channel
- TARGET: i686-pc-windows-msvc
RUST_VERSION: nightly
# - TARGET: x86_64-pc-windows-gnu
# RUST_VERSION: nightly
# Install Rust and Cargo
install:
- 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'
} ElseIf ($Env:TARGET -eq 'i686-pc-windows-msvc') {
$Env:PATH += ';C:\msys64\mingw32\bin'
} ElseIf ($Env:TARGET -eq 'x86_64-pc-windows-msvc') {
$Env:PATH += ';C:\msys64\mingw64\bin'
}
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
- set PATH=%PATH%
- rustc -Vv
- cargo -V
# Equivalent to Travis' `script` phase
# TODO modify this phase as you see fit
test_script:
- if [%APPVEYOR_REPO_TAG%]==[false] (
cargo test
)
artifacts:
# Archive the generated packages in the ci.appveyor.com build report.
- path: staging
before_deploy:
# NEW Generate artifacts for release
- set RUSTFLAGS=-C target-feature=+crt-static
- cargo rustc --target %TARGET% --release
- ps: ci\before_deploy_windows.ps1
deploy:
appveyor_repo_tag: true
tag: $(APPVEYOR_REPO_TAG_NAME)
release: $(APPVEYOR_REPO_TAG_NAME)
description: 'Binaries'
provider: GitHub
auth_token:
secure: B3uQ42o3Wm7q1Be1chQUtvtYQB2bewY6csIVswJQT1WH5s+fP2iWsBIjiyAw2Qwi
artifact: /.*\.zip/
draft: false
prerelease: false
on:
appveyor_repo_tag: true
RUST_VERSION: nightly
cache:
- C:\Users\appveyor\.cargo\registry
- target
branches:
only:
- master
- /v\d\.\d\.\d/
# Building is done in the test phase, so we disable Appveyor's build phase.
build: false