Tweak timeout tests
[lsp-test.git] / .travis.yml
index 73de261bb86aa00e9fd950420e77a4dd0a87f33b..f26edb0e6c7e24605a0d183f5c3ac78d36777de0 100644 (file)
@@ -1,33 +1,49 @@
-language: javascript
+language: c
 
 sudo: false
 
-# Caching so the next build will be fast too.
+os:
+- windows
+- linux
+- osx
+
+dist: xenial
+
 cache:
   directories:
+    - .stack-work
     - $HOME/.stack
+    - $HOME/haskell-ide-engine/.stack-work
+    - C:/Users/travis/AppData/Local/Programs/stack
+    - C:/sr
+  timeout: 1000
 
 addons:
   apt:
     packages:
       - npm
+  homebrew:
+    packages:
+      - haskell-stack
+      - npm
 
 before_install:
-  # Download and unpack the stack executable
-  - mkdir -p ~/.local/bin
-  - export PATH=$HOME/.local/bin:$PATH
-  - travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
+  - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install haskell-stack nodejs; /C/ProgramData/chocolatey/bin/RefreshEnv.cmd; fi
+  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.linux.sh; fi
+  - mkdir -p haskell-ide-engine
+  - cd $HOME/haskell-ide-engine
+  - git init
+  - git remote add origin https://github.com/haskell/haskell-ide-engine.git
+  - git pull origin master
+  - git checkout 1a5640f4790bde364dcd0a61617c5ca5b85b145a
+  - git submodule init
+  - git submodule sync
+  - git submodule update --init
+  - stack --no-terminal --skip-ghc-check -j2 install --stack-yaml=stack-8.6.2.yaml
+  - stack exec hoogle generate --stack-yaml=stack-8.6.2.yaml
+  - cd $TRAVIS_BUILD_DIR
   - npm update
-
-install:
-  - git clone https://github.com/haskell/haskell-ide-engine.git --recursive
-  - cd haskell-ide-engine
-  - git checkout c4190b22afa307bf8761d14ec71e17db79d7f395
-  - git submodule update
-  - stack --no-terminal --skip-ghc-check install -j2
-  - stack exec hoogle generate
-  - cd ..
   - npm i -g javascript-typescript-langserver
 
 script:
-  - stack --no-terminal --skip-ghc-check test
+  - stack test