aboutsummaryrefslogtreecommitdiff
path: root/ci/install.sh
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-06-09 13:26:48 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-09-28 14:55:43 +0200
commit4ea5e63aa8c866b4fcc9d10f1a26078d2517f96a (patch)
tree057fc3138c63438b1e945ef8257cfe179803d958 /ci/install.sh
parentafba23099fccc929fd0319a9a965a7b727407c7a (diff)
downloadrneovim-4ea5e63aa8c866b4fcc9d10f1a26078d2517f96a.tar.gz
rneovim-4ea5e63aa8c866b4fcc9d10f1a26078d2517f96a.tar.bz2
rneovim-4ea5e63aa8c866b4fcc9d10f1a26078d2517f96a.zip
tree-sitter: add basic testing on ci
build tree-sitter c parser on ci for testing purposes
Diffstat (limited to 'ci/install.sh')
-rwxr-xr-xci/install.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/ci/install.sh b/ci/install.sh
index cda9a11f08..b96cf3c073 100755
--- a/ci/install.sh
+++ b/ci/install.sh
@@ -24,3 +24,23 @@ gem install --no-document --version ">= 0.8.0" neovim
echo "Install neovim npm package"
npm install -g neovim
npm link neovim
+
+echo "Install tree-sitter npm package"
+npm install -g tree-sitter-cli
+npm link tree-sitter-cli
+
+echo "Install tree-sitter c parser"
+curl "https://codeload.github.com/tree-sitter/tree-sitter-c/tar.gz/v0.15.2" -o tree_sitter_c.tar.gz
+tar xf tree_sitter_c.tar.gz
+cd tree-sitter-c-0.15.2
+export TREE_SITTER_DIR=$HOME/tree-sitter-build/
+mkdir -p $TREE_SITTER_DIR/bin
+
+if [[ "$BUILD_32BIT" != "ON" ]]; then
+ # builds c parser in $HOME/tree-sitter-build/bin/c.(so|dylib)
+ tree-sitter test
+else
+ # no tree-sitter binary for 32bit linux, so fake it (no tree-sitter unit tests)
+ cd src/
+ gcc -m32 -o $TREE_SITTER_DIR/bin/c.so -shared parser.c -I.
+fi