-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
135 lines (118 loc) · 3.84 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# rustup requires this 2015 or newer
image: Visual Studio 2015
environment:
global:
# 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
TWINE_USERNAME: mckaymatt
TWINE_PASSWORD:
secure: 4EVS6uB7j1M9/KmSzc8g/DGha3tRVlC0YuL5ugK16uE=
matrix:
# MinGW
# - TARGET: i686-pc-windows-gnu
# - TARGET: x86_64-pc-windows-gnu
# MSVC
# 2.7
- TARGET: i686-pc-windows-msvc
PYTHON_DIR: "C:\\Python27"
WHEELPLATFORM: win32
- TARGET: x86_64-pc-windows-msvc
PYTHON_DIR: "C:\\Python27-x64"
WHEELPLATFORM: win_amd64
# 3.6
- TARGET: i686-pc-windows-msvc
PYTHON_DIR: "C:\\Python36"
WHEELPLATFORM: win32
- TARGET: x86_64-pc-windows-msvc
PYTHON_DIR: "C:\\Python36-x64"
WHEELPLATFORM: win_amd64
# 3.5
- TARGET: i686-pc-windows-msvc
PYTHON_DIR: "C:\\Python35"
WHEELPLATFORM: win32
- TARGET: x86_64-pc-windows-msvc
PYTHON_DIR: "C:\\Python35-x64"
WHEELPLATFORM: win_amd64
# 3.4
- TARGET: i686-pc-windows-msvc
PYTHON_DIR: "C:\\Python34"
WHEELPLATFORM: win32
- TARGET: x86_64-pc-windows-msvc
PYTHON_DIR: "C:\\Python34-x64"
WHEELPLATFORM: win_amd64
# 3.3
- TARGET: i686-pc-windows-msvc
PYTHON_DIR: "C:\\Python33"
WHEELPLATFORM: win32
- TARGET: x86_64-pc-windows-msvc
PYTHON_DIR: "C:\\Python33-x64"
WHEELPLATFORM: win_amd64
# Testing other channels
# - TARGET: x86_64-pc-windows-gnu
# RUST_VERSION: nightly
# - TARGET: x86_64-pc-windows-msvc
# RUST_VERSION: nightly
matrix:
fast_finish: true
# init:
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'
}
- 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
- rustc -Vv
- cargo -V
- "%PYTHON_DIR%\\python.exe -m pip install -U pip>=9.0.1"
# without updating wheel and setuptools, ruamel.yaml will fail on python 3.4
- "%PYTHON_DIR%\\python.exe -m pip install -U wheel setuptools"
- "%PYTHON_DIR%\\python.exe -m pip install -U urllib3[secure] scikit-ci==0.14.0"
- "%PYTHON_DIR%\\python.exe -m ci install"
build_script:
- "%PYTHON_DIR%\\python.exe -m ci build"
test_script:
- "%PYTHON_DIR%\\python.exe -m ci test"
- ps: >-
Get-ChildItem .\dist\
artifacts:
- path: '**\*.whl'
type: File
name: rust_pypi_example
before_deploy:
# appveyor deploy is flaky for wheels
# upload to pypi with twine when there is a new tag
- cmd: if %APPVEYOR_REPO_TAG% equ true (%PYTHON_DIR%\\python -m ci after_test)
deploy:
- provider: GitHub
# TODO update `auth_token.secure`
# - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new
# - Encrypt it. Go to https://ci.appveyor.com/tools/encrypt
# - Paste the output down here
auth_token:
secure: Z4WsdThBV6yomQH4V2M/T5/q1khChRPklJ+xDILxO34QGwcbqH2H0wlWvX+B+B89
description: "rust_pypi_example"
on:
# TODO Here you can pick which targets will generate binary releases
# In this example, there are some targets that are tested using the stable
# and nightly channels. This condition makes sure there is only one release
# for such targets and that's generated using the stable channel
appveyor_repo_tag: true
cache:
- C:\Users\appveyor\.rustup
branches:
only:
# Release tags
- /^v\d+\.\d+\.\d+.*$/
- master
notifications:
- provider: Email
to:
- mckaymatt@gmail.com
on_build_success: false
on_build_failure: false
on_build_status_changed: false