# SPDX-FileCopyrightText: 2021 Siemens AG
#
# SPDX-License-Identifier: MIT

.build:
  stage: build
  before_script: &build_setup
    - ./ci/setup.sh
  script:
    - ./ci/test-configs.sh

ubuntu-jammy:
  extends: .build
  image: ubuntu:jammy

ubuntu-noble:
  extends: .build
  image: ubuntu:noble

coverity:
  extends: .build
  image: ubuntu:noble
  script:
    - ci/coverity.sh
  rules:
    - if: $CI_COMMIT_BRANCH == "coverity_scan"

clang:
  extends: .build
  image: ubuntu:noble
  variables:
    CC: clang
  before_script:
    - apt-get update -q
    - apt-get install -y clang
    - *build_setup

reuse:
  needs: []
  stage: test
  image:
    name: fsfe/reuse:latest
    entrypoint: [""]
  script:
    - reuse lint
