diff --git a/README.md b/README.md index 08df0e4e..40f5624f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Rust Tree-sitter =========================== [![Build Status](https://travis-ci.org/tree-sitter/rust-tree-sitter.svg)](https://travis-ci.org/tree-sitter/rust-tree-sitter) +[![Build status](https://ci.appveyor.com/api/projects/status/d0f6vqq3rflxx3y6/branch/master?svg=true)](https://ci.appveyor.com/project/maxbrunsfeld/rust-tree-sitter/branch/master) Rust bindings to the [Tree-sitter][] parsing library. diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..23fe3d97 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,24 @@ +environment: + RUST_TREE_SITTER_TEST: true + +build: false + +install: + - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe + - rustup-init -yv --default-toolchain stable + - set PATH=%PATH%;%USERPROFILE%\.cargo\bin + - rustc -vV + - cargo -vV + - script\fetch-test-fixtures.cmd + +test_script: + - cargo build + - cargo test + +branches: + only: + - master + +cache: + - fixtures + - C:\Users\appveyor\.cargo diff --git a/script/fetch-test-fixtures.cmd b/script/fetch-test-fixtures.cmd new file mode 100755 index 00000000..33543961 --- /dev/null +++ b/script/fetch-test-fixtures.cmd @@ -0,0 +1,16 @@ +@Echo off +SETLOCAL + +Set grammar_dir=fixtures\tree-sitter-rust +Set grammar_url=https://github.com/tree-sitter/tree-sitter-rust + +@IF NOT EXIST %grammar_dir% ( + git clone %grammar_url% %grammar_dir% --depth=1 +) + +pushd %grammar_dir% +git fetch origin master --depth=1 +git reset --hard origin/master +popd + +ENDLOCAL