-
Notifications
You must be signed in to change notification settings - Fork 8
/
appveyor.yml
108 lines (98 loc) · 3.82 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
environment:
VisualStudioVersion: 8.0
global:
# This will be used as part of the zipfile name
# TODO change the project name
CRATE_NAME: polylabel-rs
# 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
- cargo rustc --target %TARGET% --release -- -C target-feature=+crt-static
# Cython build expects name.lib, not name.dll.lib
- cp target\%TARGET%\release\deps\polylabel.dll.lib target\%TARGET%\release\deps\polylabel.lib
# OLD build artifacts for generating a .def, needed by the MinGW Python build
# - cargo rustc --target %TARGET% --release -- -C target-cpu=native -C link-args=-Wl,--out-implib,polylabel.a
# - dlltool -z target\%TARGET%\release\polylabel.def --export-all-symbols target\%TARGET%\release\polylabel.dll
# - dir target\%TARGET%\release
# - appveyor PushArtifact target\%TARGET%\release\polylabel.def
- dir target\%TARGET%\release
- dir target\%TARGET%\release\deps
- dumpbin /exports target\%TARGET%\release\polylabel.dll > dumpbin_exports.txt
- dumpbin /dependents target\%TARGET%\release\polylabel.dll > dumpbin_dependents.txt
- appveyor PushArtifact dumpbin_exports.txt
- appveyor PushArtifact dumpbin_dependents.txt
- 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: mJlu7lwGqi3BVMm8IyWdRrzhmHqTSCMz0LacJUovMrq6MdHrAiHqkts3fS1EuoD0
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