Add a build for windows using appveyor (#37)
This commit is contained in:
parent
b0a095e292
commit
55e860e8d4
3 changed files with 103 additions and 6 deletions
14
.travis.yml
14
.travis.yml
|
|
@ -1,5 +1,13 @@
|
||||||
sudo: false
|
sudo: false
|
||||||
language: rust
|
language: rust
|
||||||
|
cache: cargo
|
||||||
|
# necessary for `travis-cargo coveralls --no-sudo`
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libcurl4-openssl-dev
|
||||||
|
- libelf-dev
|
||||||
|
- libdw-dev
|
||||||
rust:
|
rust:
|
||||||
- stable
|
- stable
|
||||||
- beta
|
- beta
|
||||||
|
|
@ -13,12 +21,6 @@ script:
|
||||||
travis-cargo test &&
|
travis-cargo test &&
|
||||||
travis-cargo bench &&
|
travis-cargo bench &&
|
||||||
travis-cargo --only stable doc
|
travis-cargo --only stable doc
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- libcurl4-openssl-dev
|
|
||||||
- libelf-dev
|
|
||||||
- libdw-dev
|
|
||||||
after_success:
|
after_success:
|
||||||
- travis-cargo --only stable doc-upload
|
- travis-cargo --only stable doc-upload
|
||||||
- travis-cargo coveralls --exclude-pattern=/target --no-sudo
|
- travis-cargo coveralls --exclude-pattern=/target --no-sudo
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ rust-imap
|
||||||
IMAP Client for Rust
|
IMAP Client for Rust
|
||||||
|
|
||||||
[](https://travis-ci.org/mattnenterprise/rust-imap)
|
[](https://travis-ci.org/mattnenterprise/rust-imap)
|
||||||
|
[](https://ci.appveyor.com/api/projects/status/github/mattnenterprise/rust-imap)
|
||||||
[](https://crates.io/crates/imap)
|
[](https://crates.io/crates/imap)
|
||||||
[](https://coveralls.io/github/mattnenterprise/rust-imap?branch=master)
|
[](https://coveralls.io/github/mattnenterprise/rust-imap?branch=master)
|
||||||
|
|
||||||
|
|
|
||||||
94
appveyor.yml
Normal file
94
appveyor.yml
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
environment:
|
||||||
|
|
||||||
|
global:
|
||||||
|
RUST_VERSION: stable
|
||||||
|
CRATE_NAME: imap
|
||||||
|
SSL_CERT_FILE: "C:\\OpenSSL\\cacert.pem"
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
|
||||||
|
# MinGW
|
||||||
|
- TARGET: i686-pc-windows-gnu
|
||||||
|
BITS: 32
|
||||||
|
MSYS2: 1
|
||||||
|
OPENSSL_VERSION: 1_1_0f
|
||||||
|
- TARGET: x86_64-pc-windows-gnu
|
||||||
|
BITS: 64
|
||||||
|
MSYS2: 1
|
||||||
|
OPENSSL_VERSION: 1_0_2L
|
||||||
|
|
||||||
|
# MSVC
|
||||||
|
- TARGET: i686-pc-windows-msvc
|
||||||
|
BITS: 32
|
||||||
|
OPENSSL_VERSION: 1_0_2L
|
||||||
|
OPENSSL_DIR: C:\OpenSSL
|
||||||
|
- TARGET: x86_64-pc-windows-msvc
|
||||||
|
BITS: 64
|
||||||
|
OPENSSL_VERSION: 1_1_0f
|
||||||
|
OPENSSL_DIR: C:\OpenSSL
|
||||||
|
|
||||||
|
# MinGW beta
|
||||||
|
- TARGET: i686-pc-windows-gnu
|
||||||
|
BITS: 32
|
||||||
|
MSYS2: 1
|
||||||
|
OPENSSL_VERSION: 1_1_0f
|
||||||
|
RUST_VERSION: beta
|
||||||
|
- TARGET: x86_64-pc-windows-gnu
|
||||||
|
BITS: 64
|
||||||
|
MSYS2: 1
|
||||||
|
OPENSSL_VERSION: 1_0_2L
|
||||||
|
RUST_VERSION: beta
|
||||||
|
|
||||||
|
# MSVC beta
|
||||||
|
- TARGET: i686-pc-windows-msvc
|
||||||
|
BITS: 32
|
||||||
|
MSYS2: 1
|
||||||
|
OPENSSL_VERSION: 1_0_2L
|
||||||
|
OPENSSL_DIR: C:\OpenSSL
|
||||||
|
RUST_VERSION: beta
|
||||||
|
- TARGET: x86_64-pc-windows-msvc
|
||||||
|
BITS: 64
|
||||||
|
OPENSSL_VERSION: 1_1_0f
|
||||||
|
OPENSSL_DIR: C:\OpenSSL
|
||||||
|
RUST_VERSION: beta
|
||||||
|
|
||||||
|
install:
|
||||||
|
# install OpenSSL
|
||||||
|
- ps: Start-FileDownload "http://slproweb.com/download/Win${env:BITS}OpenSSL-${env:OPENSSL_VERSION}.exe"
|
||||||
|
- Win%BITS%OpenSSL-%OPENSSL_VERSION%.exe /SILENT /VERYSILENT /SP- /DIR="C:\OpenSSL"
|
||||||
|
- appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem -FileName C:\OpenSSL\cacert.pem
|
||||||
|
|
||||||
|
# install Rust
|
||||||
|
- 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
|
||||||
|
- if defined MSYS2 set PATH=C:\msys64\mingw%BITS%\bin;%PATH%
|
||||||
|
- rustc -Vv
|
||||||
|
- cargo -V
|
||||||
|
|
||||||
|
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
|
||||||
|
- rustup-init.exe -y --default-host %TARGET%
|
||||||
|
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
||||||
|
- if defined MSYS2 set PATH=C:\msys64\mingw%BITS%\bin;%PATH%
|
||||||
|
- rustc -V
|
||||||
|
- cargo -V
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
# we don't run the "test phase" when doing deploys
|
||||||
|
- if [%APPVEYOR_REPO_TAG%]==[false] (
|
||||||
|
cargo build --target %TARGET% &&
|
||||||
|
cargo build --target %TARGET% --release &&
|
||||||
|
cargo test --target %TARGET% &&
|
||||||
|
cargo test --target %TARGET% --release
|
||||||
|
)
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- C:\Users\appveyor\.cargo\registry
|
||||||
|
- target
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
- provider: Email
|
||||||
|
on_build_success: false
|
||||||
|
|
||||||
|
# Building is done in the test phase, so we disable Appveyor's build phase.
|
||||||
|
build: false
|
||||||
Loading…
Add table
Reference in a new issue