forked from snowballstem/snowball
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (83 loc) · 3.53 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
74
75
76
77
78
79
80
81
82
83
language: c
sudo: false
dist: trusty
matrix:
include:
- compiler: gcc
env: c_tests=y cc_append=' -std=c90'
- compiler: clang
env: c_tests=y cc_append=' -std=c90'
- env: JAVA=java JAVAC=javac
- env: GO=go GOROOT=$HOME/goroot PATH=$PATH:$GOROOT/bin
- language: node_js
node_js: "node"
env: CC=gcc NODE=node
- env: RUST=rust
- env: MCS=mcs
- env: FPC=fpc
# The pure Python versions run slowly so we need to thin the testdata
# for languages such as Arabic where there's a lot, or else the build
# hits the travis time limit. With pypy, it's enough faster than we
# can run the full tests.
- language: python
python: "3.7"
env: CC=gcc PYTHON=python THIN_FACTOR=10
dist: xenial
- language: python
python: "3.6"
env: CC=gcc PYTHON=python THIN_FACTOR=10
- language: python
python: "3.4"
env: CC=gcc PYTHON=python THIN_FACTOR=10
- language: python
python: "2.7"
env: CC=gcc PYTHON=python THIN_FACTOR=10
- language: python
python: "2.6"
env: CC=gcc PYTHON=python THIN_FACTOR=10
- language: python
python: "pypy"
env: CC=gcc PYTHON=python
- language: python
python: "pypy3.5"
env: CC=gcc PYTHON=python
before_install:
# Try to check out a branch of the same name from the snowball-data repo
# sibling of this snowball repo, so that PRs requiring changes to both can be
# CI tested easily.
#
# If that fails, just the standard snowball-data repo's default branch.
- GH_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
- GH_REPO_SLUG=${TRAVIS_PULL_REQUEST_SLUG:-$TRAVIS_REPO_SLUG}
- GH_REPO_URL=https://github.com/${GH_REPO_SLUG%%/*}/snowball-data.git
- echo "Trying branch $GH_BRANCH from $GH_REPO_URL"
- git clone --depth=1 -b "$GH_BRANCH" "$GH_REPO_URL" || git clone --depth=1 https://github.com/snowballstem/snowball-data.git
- test -z "$MCS" || sudo apt-get update -qq
- test -z "$MCS" || sudo apt-get install -qq mono-complete
# Install rust using rustup.rs
- test -z "$RUST" || curl https://sh.rustup.rs -sSf -o rustup.sh
- test -z "$RUST" || chmod ugo+x rustup.sh
- test -z "$RUST" || ./rustup.sh -y
- test -z "$RUST" || source "$HOME/.cargo/env"
- test -z "$RUST" || rm rustup.sh
# install go into $HOME/goroot
- test -z "$GO" || curl -sLO https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz
- test -z "$GO" || tar -C $HOME -xzf go1.8.1.linux-amd64.tar.gz
- test -z "$GO" || rm go1.8.1.linux-amd64.tar.gz
- test -z "$GO" || mv $HOME/go $HOME/goroot
# now create gopath that points to this repo
- test -z "$GO" || mkdir -p $HOME/gopath/src/github.com/
- test -z "$GO" || ln -s $HOME/build/snowballstem $HOME/gopath/src/github.com/snowballstem
- test -z "$FPC" || sudo apt-get update -qq
- test -z "$FPC" || sudo apt-get install -qq fpc
script:
- make CC="$CC$cc_append"
- test -z "$c_tests" || make check CC="$CC$cc_append" STEMMING_DATA=snowball-data
- test -z "$PYTHON" || make check_python python="$PYTHON" STEMMING_DATA=snowball-data
- test -z "$JAVA" -o -z "$JAVAC" || make check_java STEMMING_DATA=snowball-data
- test -z "$MCS" || make check_csharp MCS="$MCS" STEMMING_DATA=snowball-data
- test -z "$NODE" || make check_js STEMMING_DATA=snowball-data
- test -z "$RUST" || make check_rust STEMMING_DATA=snowball-data
- test -z "$RUST" || make check_rust cargoflags=--release STEMMING_DATA=snowball-data
- test -z "$GO" || make check_go STEMMING_DATA=snowball-data
- test -z "$FPC" || make check_pascal STEMMING_DATA=snowball-data