Skip to content

Commit

Permalink
Create appveyor.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutH committed Jan 30, 2019
1 parent 9487ca2 commit 9d15782
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
image: Visual Studio 2017

environment:
host: x86_64-pc-windows-msvc # Triple of host platform
matrix:
- platform: x86_64 # Name (is not used other than naming things)
target: x86_64-pc-windows-msvc # Triple of target platform
channel: stable # Rust release channel (stable/beta/nightly/nightly-2018-12-01)
- platform: arm64
target: aarch64-pc-windows-msvc
channel: stable
matrix:
allow_failures: # Allows jobs with these variables to fail
- platform: arm64

install:
- git submodule update --init
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe # Downloads Rustup-init
- rustup-init -yv --default-toolchain %channel% --default-host %host% # Installs Rust
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin;%APPVEYOR_BUILD_FOLDER% # Adds Rust tools (Cargo, Rustup, etc.) to path
- rustc -vV # Prints Rust version
- cargo -vV # Prints Cargo version
- rustup target add %target% # Adds target platform to Rust

build_script:
- cargo build --release --target=%target% # Builds file defined in Cargo.toml (default main.rs)

test_script:
- cargo test --target=%target% --verbose # Runs tests in "src" and "tests" folders
# - cargo bench --target=%target% --verbose # Runs benchmarks in "src/lib.rs"

artifacts:
- path: target\$(target)\release\*$(APPVEYOR_PROJECT_NAME)*.* # Publishes all files from `cargo build/test/bench --release`
name: $(APPVEYOR_PROJECT_NAME)-$(platform) # Gives it a fancy name

deploy:
- provider: GitHub
artifact: $(APPVEYOR_PROJECT_NAME)-$(platform)
auth_token:
secure: 'hY5Mk6KOwgQ97TzEBsM7Woqr1ZIm5QTvHg8EvxMV1x8j3wk/3mNBMqWFFbEIBK0i'
prerelease: true
on:
appveyor_repo_tag: true

0 comments on commit 9d15782

Please sign in to comment.