---
include:
  - project: shore/ci-templates
    file: templates/pre-commit.yml

stages:
  - test
  - build

build:
  stage: build
  image: buildpack-deps:bullseye
  before_script:
    - apt-get update
    - >-
      apt-get install -y
      bash-completion
      cmake
      golang
      go-md2man
      meson
      podman
      shellcheck
      systemd
    - git clone https://github.com/containers/toolbox.git
    - cd toolbox
  script:
    - meson -Dprofile_dir=/etc/profile.d builddir
    - ninja -C builddir
  artifacts:
    paths:
      - toolbox/builddir/src/toolbox
      - toolbox/builddir/doc/
      - toolbox/builddir/meson-logs/
      - toolbox/builddir/.ninja_log
