forked from tree-sitter/tree-sitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (60 loc) · 1.57 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
language: rust
rust:
- stable
env:
CFLAGS="-Wall -Wextra -Werror -Wstrict-prototypes"
matrix:
include:
- os: osx
env: USE_EMSCRIPTEN=1
- os: linux
services: docker
before_install:
# Install node
- nvm install 10
- nvm use 10
# 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
script:
# Build the WASM binding
- (eval "$WASM_ENV" && script/build-wasm)
# build the shared/static libraries
- make
# Build the CLI
- cargo build --release
# Fetch and regenerate the fixture parsers
- script/fetch-fixtures
- script/generate-fixtures
- (eval "$WASM_ENV" && script/generate-fixtures-wasm)
# Run the tests
- export TREE_SITTER_STATIC_ANALYSIS=1
- script/test
- script/test-wasm
- script/benchmark
branches:
only:
- master
- /\d+\.\d+\.\d+/
before_deploy:
- cp target/release/tree-sitter .
- gzip --suffix "-${TRAVIS_OS_NAME}-x64.gz" tree-sitter
deploy:
provider: releases
api_key:
secure: "cAd2mQP+Q55v3zedo5ZyOVc3hq3XKMW93lp5LuXV6CYKYbIhkyfym4qfs+C9GJQiIP27cnePYM7B3+OMIFwSPIgXHWWSsuloMtDgYSc/PAwb2dZnJqAyog3BohW/QiGTSnvbVlxPF6P9RMQU6+JP0HJzEJy6QBTa4Und/j0jm24="
file_glob: true
file:
- "tree-sitter-*.gz"
- "target/release/tree-sitter.js"
- "target/release/tree-sitter.wasm"
draft: true
overwrite: true
skip_cleanup: true
on:
tags: true
cache:
cargo: true
directories:
- target/emsdk