forked from rust-lang/rustup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
94 lines (82 loc) · 3.04 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:
matrix:
- TARGET: i686-pc-windows-msvc
BUILD_MSI: 1
- TARGET: i686-pc-windows-gnu
MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z/download
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
MINGW_DIR: mingw32
- TARGET: x86_64-pc-windows-gnu
MSYS_BITS: 64
- TARGET: i686-pc-windows-msvc
- TARGET: x86_64-pc-windows-msvc
access_token:
secure: q8Wqx0brgfpOYFQqWauvucE2h0o1WYb41a3gKaCKV9QiE4eTz6qLNlqyC3mdsp4Q
branches:
only:
- master
- stable
- auto
install:
# Install rust, x86_64-pc-windows-msvc host
# FIXME: switch back to win.rustup.rs
- curl -sSf -o rustup-init.exe https://dev-static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe
- rustup-init.exe -y --default-toolchain=nightly-2016-11-06-x86_64-pc-windows-msvc
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
# Install the target we're compiling for
- if NOT "%TARGET%" == "x86_64-pc-windows-msvc" rustup target add %TARGET%
# Use the system msys if we can
- if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
# download a custom compiler otherwise
- if defined MINGW_ARCHIVE curl -L --retry 4 "%MINGW_URL%" -o "%MINGW_ARCHIVE%"
- if defined MINGW_ARCHIVE 7z x -y "%MINGW_ARCHIVE%" > nul
- if defined MINGW_ARCHIVE set PATH=%CD%\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%
# set cargo features for MSI if requested (otherwise empty string)
- set FEATURES=
- if defined BUILD_MSI set FEATURES=--features msi-installed
# let's see what we got
- where gcc rustc cargo
- rustc -vV
- cargo -vV
- set CARGO_TARGET_DIR=%CD%\target
build: false
test_script:
- cargo build --release --target %TARGET% %FEATURES%
- cargo test --release -p rustup-dist --target %TARGET%
- cargo test --release --target %TARGET% %FEATURES%
- ps: |
if($env:BUILD_MSI) {
cd src\rustup-win-installer
cargo build --release --target $env:TARGET
cd msi
.\build.ps1 -Target $env:TARGET
cd ..\..\..
if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
notifications:
- provider: Webhook
url: https://webhooks.gitter.im/e/9907ad94eb7a5ff291c3
after_test:
- powershell -File ci/prepare-deploy-appveyor.ps1
artifacts:
- path: dist\$(TARGET)\rustup-init.exe
name: rustup-init
- path: dist\$(TARGET)\rustup-init.exe.sha256
name: rustup-init-sha
- path: dist\$(TARGET)\rustup-setup.exe
name: rustup-setup
- path: dist\$(TARGET)\rustup-setup.exe.sha256
name: rustup-setup-sha
deploy:
- provider: S3
skip_cleanup: true
access_key_id: AKIAIZT5ZFS5N2VNRGPA
secret_access_key:
secure: viw7GCfVF0QlY0fghoxO3Lux/Wo4u6PxxgUwEq5cs4w69tlv9KzIIw74Nc7KJdgt
bucket: dev-static-rust-lang-org
set_public: true
region: us-west-1
artifact: rustup-init,rustup-init-sha,rustup-setup,rustup-setup-sha
folder: rustup
on:
branch: stable