machine:
  environment:
    PATH: "$HOME/cmake-3.1.3-Linux-x86_64/bin:$PATH"

dependencies:
  cache_directories:
    - ~/cmake-3.1.3-Linux-x86_64
  override:
    - >
      if [ ! -d ~/cmake-3.1.3-Linux-x86_64 ]; then
        echo "No cache - building CMake"
        cd ~ && wget --quiet https://cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.tar.gz && tar -xvf cmake-3.1.3-Linux-x86_64.tar.gz
      else
        echo "Cached CMake found"
      fi

test:
  override:
    - make

machine:
  environment:
    PATH: "$HOME/cmake-3.1.3-Linux-x86_64/bin:$PATH"

dependencies:
  cache_directories:
    - ~/cmake-3.1.3-Linux-x86_64
  override:
    - sudo apt-get install lua5.1 lua5.1-dev
    - >
      if [ ! -d ~/cmake-3.1.3-Linux-x86_64 ]; then
        echo "No cache - building CMake"
        cd ~ && wget --quiet https://cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.tar.gz && tar -xvf cmake-3.1.3-Linux-x86_64.tar.gz
      else
        echo "Cached CMake found"
      fi

test:
  override:
    - make

Install Lua 5.1 and headers
ci: Install Lua 5.1 and headers

Signed-off-by: Petr Štetiar <f0d4d86d9c7002e67e6ae7bb5596bc0afa7b4c3a@true.cz>
