image: ubuntu:21.10

variables:
  DEBIAN_FRONTEND: noninteractive

before_script:
  - apt-get --quiet update --yes >/dev/null
  - apt-get --quiet install --yes clang-13 clang-tidy-13 clang-format-13 git libdrm-dev blueprint-tools libgtest-dev make >/dev/null

stages:
  - build
  - style

build:
  stage: build
  script:
    - make -f .ci/Makefile
  artifacts:
    when: on_failure
    untracked: true

checkstyle:
  stage: style
  script: "./.ci/.gitlab-ci-checkcommit.sh"
  artifacts:
    when: on_failure
    untracked: true