2018-05-17 14:35:31 -07:00
|
|
|
language: rust
|
|
|
|
|
rust:
|
2019-03-21 11:26:13 -07:00
|
|
|
- stable
|
2018-05-17 14:35:31 -07:00
|
|
|
|
2020-06-03 21:19:57 +02:00
|
|
|
env:
|
|
|
|
|
CFLAGS="-Wall -Wextra -Werror -Wstrict-prototypes"
|
|
|
|
|
|
2019-04-25 17:27:24 -07:00
|
|
|
matrix:
|
|
|
|
|
include:
|
|
|
|
|
- os: osx
|
2019-05-14 15:13:56 -07:00
|
|
|
env: USE_EMSCRIPTEN=1
|
2019-04-25 17:27:24 -07:00
|
|
|
- os: linux
|
|
|
|
|
services: docker
|
|
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
|
# Install node
|
2019-05-14 11:12:56 -07:00
|
|
|
- nvm install 10
|
|
|
|
|
- nvm use 10
|
|
|
|
|
|
2019-05-14 15:13:56 -07:00
|
|
|
# Download emscripten and create a shorthand for adding it to the PATH.
|
|
|
|
|
# Don't add it to the path globally because it overrides the default
|
|
|
|
|
# clang and node.
|
|
|
|
|
- if [ -n "$USE_EMSCRIPTEN" ]; then export WASM_ENV="$(script/fetch-emscripten)"; fi
|
2019-01-15 19:18:33 -08:00
|
|
|
|
2019-01-14 14:39:01 -08:00
|
|
|
script:
|
2019-05-14 11:12:56 -07:00
|
|
|
# Build the WASM binding
|
2019-05-14 15:13:56 -07:00
|
|
|
- (eval "$WASM_ENV" && script/build-wasm)
|
2019-05-14 11:12:56 -07:00
|
|
|
|
2020-04-21 22:28:26 -04:00
|
|
|
# build the shared/static libraries
|
|
|
|
|
- make
|
|
|
|
|
|
2019-05-14 11:12:56 -07:00
|
|
|
# Build the CLI
|
|
|
|
|
- cargo build --release
|
|
|
|
|
|
2019-01-14 14:39:01 -08:00
|
|
|
# Fetch and regenerate the fixture parsers
|
|
|
|
|
- script/fetch-fixtures
|
2019-04-25 17:27:24 -07:00
|
|
|
- script/generate-fixtures
|
2019-05-14 15:13:56 -07:00
|
|
|
- (eval "$WASM_ENV" && script/generate-fixtures-wasm)
|
2018-05-17 17:16:35 -07:00
|
|
|
|
2019-04-25 17:27:24 -07:00
|
|
|
# Run the tests
|
2019-01-14 14:39:01 -08:00
|
|
|
- export TREE_SITTER_STATIC_ANALYSIS=1
|
2019-01-14 17:19:46 -08:00
|
|
|
- script/test
|
2019-05-14 11:12:56 -07:00
|
|
|
- script/test-wasm
|
2019-02-01 14:39:37 -08:00
|
|
|
- script/benchmark
|
2018-05-17 17:16:35 -07:00
|
|
|
|
2018-05-17 14:35:31 -07:00
|
|
|
branches:
|
|
|
|
|
only:
|
|
|
|
|
- master
|
2019-01-15 19:18:33 -08:00
|
|
|
- /\d+\.\d+\.\d+/
|
|
|
|
|
|
|
|
|
|
before_deploy:
|
2019-02-25 13:41:57 -08:00
|
|
|
- cp target/release/tree-sitter .
|
2019-01-15 19:18:33 -08:00
|
|
|
- gzip --suffix "-${TRAVIS_OS_NAME}-x64.gz" tree-sitter
|
2019-01-15 19:18:33 -08:00
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
|
provider: releases
|
|
|
|
|
api_key:
|
|
|
|
|
secure: "cAd2mQP+Q55v3zedo5ZyOVc3hq3XKMW93lp5LuXV6CYKYbIhkyfym4qfs+C9GJQiIP27cnePYM7B3+OMIFwSPIgXHWWSsuloMtDgYSc/PAwb2dZnJqAyog3BohW/QiGTSnvbVlxPF6P9RMQU6+JP0HJzEJy6QBTa4Und/j0jm24="
|
|
|
|
|
file_glob: true
|
2019-04-25 17:27:24 -07:00
|
|
|
file:
|
|
|
|
|
- "tree-sitter-*.gz"
|
|
|
|
|
- "target/release/tree-sitter.js"
|
|
|
|
|
- "target/release/tree-sitter.wasm"
|
2019-01-15 19:18:33 -08:00
|
|
|
draft: true
|
|
|
|
|
overwrite: true
|
|
|
|
|
skip_cleanup: true
|
|
|
|
|
on:
|
|
|
|
|
tags: true
|
2019-01-10 15:50:34 -08:00
|
|
|
|
|
|
|
|
cache:
|
|
|
|
|
cargo: true
|
|
|
|
|
directories:
|
2019-05-14 11:12:56 -07:00
|
|
|
- target/emsdk
|