image: nvidia/opengl:devel

stages:
  - build

cache:
  key: apt-cache
  paths:
    - apt-cache/

before_script:
  - export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
  - apt-get update -yq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y build-essential cmake

build:
  stage: build
  script:
    - gcc --version
    - mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -j
