From 66d495a95570769fcdd8d65b0e634aaa6a77131b Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Thu, 13 Jun 2019 09:32:00 +0100 Subject: [PATCH] Squashed commit of the following: commit c42b0636ef8d2c3ebd44e15ba2c933dc08e397d3 Author: Luke Lau Date: Mon Jun 10 13:51:36 2019 +0100 Add npm folder to path, use stages for deploy commit 4eb9facea670edaf5c35aca45b434cde086abfb0 Author: Luke Lau Date: Mon Jun 10 11:40:30 2019 +0100 Update .travis.yml commit 98e56e42106597f5bdc84369bbcc73bf2ac74910 Author: Luke Lau Date: Mon Jun 10 11:23:52 2019 +0100 Only deploy on linux commit ead63f3029ae0550da8e7cd937a621b853042ff2 Author: Luke Lau Date: Mon Jun 10 11:17:57 2019 +0100 Update .travis.yml commit 154b27b2b5497c41d8e3004e1960102bc3d6b79d Author: Luke Lau Date: Mon Jun 10 10:55:05 2019 +0100 Update .travis.yml commit 07fddfb038d4d8c9385f6f350cbfc8f530926c73 Author: Luke Lau Date: Mon Jun 10 07:44:26 2019 +0100 Update .travis.yml commit 2a2a23bcf8fff91d275518bcee99dc8d6e8f41d1 Author: Luke Lau Date: Mon Jun 10 02:16:23 2019 +0100 Update .travis.yml commit 300a6c32acb0e4c6c075b0281b967bb57a291379 Author: Luke Lau Date: Sun Jun 9 13:26:26 2019 +0100 Explicitly specify copy on windows commit e673e7a122aae9995a94764d41e46d23e1191b2b Author: Luke Lau Date: Sun Jun 9 01:16:58 2019 +0100 Don't install cabal with ghc on choco commit 62984542160f77c5f82e74b57099bbb0a53cc3b4 Author: Luke Lau Date: Sun Jun 9 00:50:23 2019 +0100 Use copying on windows commit 49cf0e92944f3e3d043420056cfcf2101ebabbc2 Author: Luke Lau Date: Sat Jun 8 22:49:43 2019 +0100 Add cabal-head source commit ed60b9859b80372ecc6280d24f9e4e3f0408c192 Author: Luke Lau Date: Sat Jun 8 22:31:52 2019 +0100 Use cabal-head commit 12410701a2516fa6f72634810eab7cb2f64868ae Author: Luke Lau Date: Sat Jun 8 22:18:04 2019 +0100 Use cabal nightly on windows commit d6b41645f54661b5b317ab36641c4243ecee3334 Author: Luke Lau Date: Sat Jun 8 20:26:26 2019 +0100 Try manually adding ghc to path on windows commit 9530a8d8b10247e881b8d514a305f2f8c0ebcda0 Author: Luke Lau Date: Sat Jun 8 20:13:04 2019 +0100 Revert back to just osx and linux builds commit 27b8dd29b4330f76f6d03c570b973acd601e8e08 Author: Luke Lau Date: Sat Jun 8 19:50:18 2019 +0100 Whittle down the install steps commit 3efde86ce929fa43348929f41127b4a47633872a Author: Luke Lau Date: Sat Jun 8 19:28:45 2019 +0100 Move ghc version commit 4caf116cc37287e9a13032b913e626f8a21d70f8 Author: Luke Lau Date: Sat Jun 8 18:56:32 2019 +0100 Debug why windows isn't working commit 62b3ab2ef05a86c02cef7a80ce18ba7ce63486dc Author: Luke Lau Date: Sat Jun 8 18:41:39 2019 +0100 Add ghc/cabal to path on linux commit 67a10d32f425d6bc4d37aa3046f051a4b7e66e26 Author: Luke Lau Date: Sat Jun 8 18:34:08 2019 +0100 Update cabal commit 0390ef572976516a3360dbe2b3ad8375260e580a Author: Luke Lau Date: Sat Jun 8 18:13:11 2019 +0100 Update homebrew commit 79db6a5b2825f47f386098ce696003553204a856 Author: Luke Lau Date: Sat Jun 8 18:10:49 2019 +0100 Install packages on all OSs commit 49c803688253352a92d0d1bce2685bef38c43196 Author: Luke Lau Date: Sat Jun 8 18:01:48 2019 +0100 Try out other operating systems commit 7ca8d96479f8ee8711e774b9a74ab5f27e150d1f Author: Luke Lau Date: Sat Jun 8 17:17:53 2019 +0100 Try to fix further timeout messages commit ea0b53220519e178ca27e23c2a3be47fcf819afa Author: Luke Lau Date: Sat Jun 8 17:01:39 2019 +0100 Figure out whats going on with failing test commit a986ed6b44d62079476dadb07388b43847c5d724 Author: Luke Lau Date: Sat Jun 8 12:49:24 2019 +0100 Try fixing tests and debug commit 4d68c322be54d7016d19d1bfd714eb272864a21f Author: Luke Lau Date: Thu Jun 6 22:22:52 2019 +0100 Overwrite commit 8749cec613c3d3e7f3c3b305d07dd295ba59958d Author: Luke Lau Date: Thu Jun 6 21:36:49 2019 +0100 Use old install for Cabal library commit 749953cb3ab08f2278e6badda8b1bd3550f06da6 Author: Luke Lau Date: Thu Jun 6 07:50:28 2019 +0100 Update .travis.yml commit cdf9bb2af734ed3473c4ad7cc1e5825a812791c0 Author: Luke Lau Date: Wed Jun 5 10:59:47 2019 +0100 Update .travis.yml commit fa801802a9f0c5c034b6a55de9c5d65016a795d0 Author: Luke Lau Date: Wed Jun 5 10:28:11 2019 +0100 Install cabal library globally commit 1941f747e139f0b904fb065216e194fdf240c2a4 Author: Luke Lau Date: Wed Jun 5 07:51:39 2019 +0100 Debug tests commit 5468fbe3b35330fa3a2dc5bec82e45ae2644abf2 Author: Luke Lau Date: Wed Jun 5 01:08:56 2019 +0100 Add cabal bin directory to path commit 04d18137900c9c3eb5e2837cbe59ae6fedbdc584 Author: Luke Lau Date: Wed Jun 5 01:03:19 2019 +0100 Bump number of jobs to two commit b906d381f30e1a6e79d051cfdee2751f2ab39cb0 Author: Luke Lau Date: Wed Jun 5 01:01:04 2019 +0100 Add deployment to Hackage and GitHub commit 88d77c7483e0497cf249db0e65e583ebe21dfbe2 Author: Luke Lau Date: Tue Jun 4 23:00:41 2019 +0100 Try out v2 builds again --- .travis.yml | 110 ++++++++++++++++++++++++++++++++++++++++++--------- stack.yaml | 2 +- test/Test.hs | 6 ++- 3 files changed, 97 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index c1cf11b..2666b25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,37 +1,109 @@ language: c - sudo: false +os: +- linux +- osx +- windows + +dist: xenial + +ghc: +- 8.6.5 +cabal: '2.4' + cache: directories: - - .stack-work - - $HOME/.stack - - $HOME/haskell-ide-engine/.stack-work - timeout: 1000 + - "$HOME/.cabal" + - "$HOME/.ghc" + - "$HOME/haskell-ide-engine/dist-newstyle" + - "dist-newstyle" addons: apt: + sources: + - sourceline: ppa:hvr/ghc + packages: + - npm + - ghc-8.6.5 + - cabal-install-2.4 + homebrew: packages: + - ghc + - cabal-install - npm + update: true before_install: - - 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' - - mkdir -p haskell-ide-engine - - cd $HOME/haskell-ide-engine +- | + if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then + choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2 + choco install cabal-head -pre + choco install ghc --ignore-dependencies + choco install nodejs.install + /C/ProgramData/chocolatey/bin/RefreshEnv.cmd + + # ghc/cabal paths + export PATH=/C/ProgramData/chocolatey/lib/ghc/tools/ghc-8.6.5/bin:${PATH} + export PATH=${APPDATA}/cabal/bin:${PATH} + # nodejs paths + export PATH=/C/Program\ Files/nodejs:${PATH} + export PATH=${APPDATA}/npm:${PATH} + fi +# these are taken from the haskell language setup +- export PATH=/opt/ghc/8.6.5/bin:${PATH} +- export PATH=/opt/cabal/2.4/bin:${PATH} +- export PATH=$HOME/.cabal/bin:${PATH} +- npm update +- npm i -g javascript-typescript-langserver +- mkdir -p $HOME/haskell-ide-engine +- pushd $HOME/haskell-ide-engine - git init - git remote add origin https://github.com/haskell/haskell-ide-engine.git - git pull origin master - - git checkout 47b5281d9d8ffe7348f7f7fcb3ce36b4eabd4f06 - - git submodule init - - git submodule sync +- git checkout abdb097f39e135deaf321a604c95f16cbda32678 - git submodule update --init - - stack --no-terminal --skip-ghc-check -j2 install - - stack exec hoogle generate - - cd $TRAVIS_BUILD_DIR - - npm update - - npm i -g javascript-typescript-langserver +- cabal v2-update +- | + if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then + cabal v2-install hie -j2 --overwrite-policy=always --install-method=copy + else + cabal v2-install hie -j2 --overwrite-policy=always + fi +- | + if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then + cabal v2-install hoogle -j2 --overwrite-policy=always --install-method=copy + else + cabal v2-install hoogle -j2 --overwrite-policy=always + fi +- hoogle generate +- popd +# needs to be old-install for cabal-helper to find it +- cabal v1-install Cabal --constraint "Cabal == 2.4.1.0" +install: +- cabal v2-build script: - - stack test +# until cabal v2-test supports streaming results +- cabal v2-run lsp-test:test:tests + +jobs: + include: + - stage: deploy + deploy: + - provider: hackage + username: bubba + password: + secure: M95r2TETDB9ndhqV0xCA9XSRw9k3tBj1xgTTAvB9b/aK3198XekZTak24a+etDNeq8cUke8wmWbN7UfBBlXiDmYYK+DfUFj5ilrkNRO+cAHQzx6TQ+yGr4GhTGhu76zA0g9PZLwMoaZdUELdOkNtRDh0EjC/PVMIp84ZKn2hBLJrptkeBbI5XDArd9I6gvu9mEuPjQ595GdHkKQdQJNEDyr1BQ9BwqUxCHj3HbUjkkfpdgujxE93wzj82/HMzGncYxeH5m5YWvK3ayX22cY3ZXK3D6jgZFB/wdp3uGwoUl1HGaVjAl6XbyV0ALMQkGTWOPrfI3HWqOtOcs349poMckDFseG1LmTXtWa3cG+8bcdzZtCbbo4pLu57e6DULivmvOw64R/tPPUx/evBRhstYVevYLrN0hJLwP3jWYl4BheHSCoDsv8cTFPaNYI/f0LgHF2NaUNBK89pOiR8kmue7oGoCUF/gBRKgqswG0xEji0YvkSIfPV/7qmfL2uoLFCZ/YpMQ8F80KjxsaA5qA3ktt0fVj14QNtsHl4+Qkwj5dtalre2zw5eHyZTe8svlD9Fp4pBaHMuazLDDyv/Aor4JYfInlfIR6oTtn6ty09eX0KjA2OhFi4hE4/jClt6ASDm3Dfv7bnFJJEBQLxfwFcQCFmAsI0EyUrAFmLON07hsm4= + on: + tags: true + branch: master + repo: bubba/lsp-test + - provider: github + api_key: + secure: JKjHWJ/ikW15Y/ZfnlREUeTj2Nw+QHzuc7yC3Bw+AOYQo8gKLCpZiN2iqPaw9xJifGoadutLaKKl2SSup7sZ8CGNW5brttqtGEgxJZci+rjR/b/5RHlyOM10RUg4rwKE0oRo8qXpbRuw6x8cWsREjworMBewZCyF6ToUuTzzMaHqvE/mxwIxoW3b30Xt+TytD6rRlbk/MNiRSZpJeA1TyNiPmpGTqSBc8LBhh8H3IOaZDL3bxlENTEuTJFW67vCQSsoH4/9JKeJ/M3WiwBVza4CTTMfQAxijYOqVGqYcoFtqMXDv4q+IhnBVSYpVo24Ii7zS2I4uQsWDNf5mdtUmfF5MJh9kKRnlp8464VWcLeRWJNsJMz09+rFiUQnl8ovPiu6bwv6GCwsBLzrYdrMx4w/F8FMuB05DsORPWqAcGjSw94seIJcTRTEZg8MbFswNSNptMIf0/PPYDAzoxpAmmS8kigJBL0ymw/QrPgyVKz1hiN2u/OOxmkjM0mrSB2fUGKghyHg0MGIIS8bx6H/pFuX7/WmuQHcUbk5Z6S64YXrb2Vqb3l6Ua0Tz7uwRWrWI8YyTb7KMyhAeYChK5zEWlMBIAv7T602qFJWerU+Eor4lLJmd7CunUah3voPJ4JL8LhhOcVlrWpke+1S+JB6LPOTjQZTjxN3qeR9uGMdl/Zk= + draft: true + on: + tags: true + branch: master + repo: bubba/lsp-test diff --git a/stack.yaml b/stack.yaml index 26a1ba2..9790aba 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-13.21 +resolver: lts-13.24 packages: - . diff --git a/test/Test.hs b/test/Test.hs index 380c98b..cdcdf5d 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -62,8 +62,12 @@ main = hspec $ do it "further timeout messages are ignored" $ runSession "hie" fullCaps "test/data/renamePass" $ do doc <- openDoc "Desktop/simple.hs" "haskell" + -- warm up the cache + getDocumentSymbols doc + -- shouldn't timeout withTimeout 3 $ getDocumentSymbols doc - liftIO $ threadDelay 5000000 + -- longer than the original timeout + liftIO $ threadDelay (5 * 10^6) -- shouldn't throw an exception getDocumentSymbols doc return () -- 2.30.2