language: rust
sudo: false
rust:
  - stable

env:
  global:
    - TRAVIS_TESTING=t
  matrix:
    - EMACS_VERSION=master

install:
  - curl -fSLO https://github.com/npostavs/emacs-travis/releases/download/bins/emacs-bin-${EMACS_VERSION}.tar.gz
  - tar -xaf emacs-bin-${EMACS_VERSION}.tar.gz -C /
  # Configure $PATH: Emacs installed to /tmp/emacs
  - export PATH=/tmp/emacs/bin:${PATH}
  - emacs --version
  # Install RLS
  - rustup update
  - rustup component add rls-preview rust-analysis rust-src
  # Install https://github.com/palantir/python-language-server
  - virtualenv .
  - . ./bin/activate
  - pip install 'python-language-server[all]==0.31.10'
  # Install eclipse.jdt.ls
  - curl -fSL http://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz -o eclipse.tar.gz
  - mkdir eclipse.jdt.ls
  - tar -C eclipse.jdt.ls -xzf eclipse.tar.gz
  - export CLASSPATH=$(pwd)/$(find eclipse.jdt.ls/ -regex eclipse.jdt.ls/plugins/org.eclipse.equinox.launcher_.*.jar):${CLASSPATH}

before_script:
  - make eglot.elc ERROR_ON_WARN=t

script:
  - make check

