-
-
Notifications
You must be signed in to change notification settings - Fork 278
/
appveyor.yml
94 lines (83 loc) · 2.97 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
environment:
CARGO_HOME: "c:\\cargo"
RUSTUP_HOME: "c:\\rustup"
# Change this to the name of your binary
BINARY_NAME: "pyo3-pack.exe"
global:
RUST_BACKTRACE: full
PYO3_PACK_PASSWORD:
secure: 3xTkaAvLd84qjLwY/quMb0w1Kh5NRXQ0a/zHtjnH4WY=
matrix:
# Publishes to pypi
- TARGET: i686-pc-windows-msvc
CHANNEL: stable
- TARGET: x86_64-pc-windows-msvc
CHANNEL: stable
# Commented out to avoid duplicate uploads to pypi
#- TARGET: i686-pc-windows-gnu
# CHANNEL: stable
#- TARGET: x86_64-pc-windows-gnu
# CHANNEL: stable
# For the integration test
# Comment out because it is failing for not locally reproducable reasons (maybe LIB is set incorrectly)
#- TARGET: x86_64-pc-windows-msvc
# CHANNEL: nightly
matrix:
fast_finish: true
install:
- ps: |
# For the gnu target we need gcc, provided by mingw. mingw which is already preinstalled,
# but we need the right version (32-bit or 64-bit) to the PATH.
# See https://www.appveyor.com/docs/build-environment/#mingw-msys-cygwin
if ($env:target -like "*-gnu") {
if ($env:target -like "x86_64-*") { # x86_64-pc-windows-gnu
$env:path += ";C:\msys64\mingw64\bin"
} else { # i686-pc-windows-gnu
$env:path += ";C:\msys64\mingw32\bin"
}
gcc --version
}
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %CHANNEL%
- SET PATH=%PATH%;%CARGO_HOME%\bin
# We need python 3.x 64 bit as default in path for the develop test
- SET PATH=C:\Python36-x64\bin;%PATH%
- rustc -V
- cargo -V
test_script:
- cargo build
- ps: |
if ($env:channel -like "nightly") {
cargo test
}
before_deploy:
- cargo build --release --features password-storage
# Grab the binary and pack it into a zip archive
- cd target\release\
# You can add more file to the archive by adding them to this line
- 7z a ../../%APPVEYOR_PROJECT_SLUG%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip %BINARY_NAME%
- appveyor PushArtifact ../../%APPVEYOR_PROJECT_SLUG%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip
- cd ../..
# Publish pypi
- cargo run -- publish -b bin -u konstin
deploy:
# Add zipped binary to the github release
- artifact: /.*\.zip/
# - Create a `public_repo` GitHub token at https://github.com/settings/tokens/new
# - Encrypt it at https://ci.appveyor.com/tools/encrypt
# - Paste the output down here
auth_token:
secure: PQ91ezDbGmow+5tjZCAQ2/Y/2bHFffmQZoa5lr09JQIwARsAa2jHtucVn9826lWG
provider: GitHub
on:
# Deploy when a new tag is pushed and only on the stable channel
# Make sure you only release once per target
CHANNEL: stable
appveyor_repo_tag: true
branches:
only:
# Pushes to the master branch
- master
# Match release tags with a regex
- /^v\d+\.\d+\.\d+.*$/
build: off # Otherwise appveyor assumes we're building a .NET project