image: gcc

before_script:
 - apt-get update
 - apt-get install -y --no-install-recommends cmake libssl-dev libvulkan-dev xorg-dev doxygen graphviz

build:
  stage: build
  script:
    - mkdir build # compile
    - cd build
    - cmake ..
    - make -j2 univerxel univerxel-client univerxel-server docs
    - mkdir -p ../out/full ../out/client ../out/server/content # package artifacts
    - cp -r univerxel content ../out/full
    - cp -r univerxel-client content ../out/client
    - rm ../out/client/content/cert.pem ../out/client/content/key.pem ../out/client/content/zstd.dict
    - cp univerxel-server ../out/server
    - cp content/cert.pem content/key.pem content/zstd.dict ../out/server/content
  artifacts:
    paths:
      - out/full
      - out/client
      - out/server
      - build/docs
    expire_in: 1 week
  # cache:
  #   paths:
  #     - "*.o"
