summaryrefslogtreecommitdiffstats
path: root/.gitlab/ci/debian.yml
blob: 6a17533f2524ace103862a77f2968f0c812a14e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.debian-prep:
  extends:
    - .dump_kernel_log
  before_script:
    - sudo apt-get -y update
    - >
      [ -z "$RUN_SYSTEMD_PLUGIN_TEST" ] ||
      sudo apt-get -y install -y -qq swtpm meson ninja-build python3-jinja2
      gperf libcap-dev libtss2-dev libmount-dev swtpm-tools
    - >
      sudo apt-get -y install -y -qq git gcc make autoconf automake autopoint
      pkgconf libtool libtool-bin gettext libssl-dev libdevmapper-dev
      libpopt-dev uuid-dev libsepol-dev libjson-c-dev libssh-dev libblkid-dev
      tar libargon2-0-dev libpwquality-dev sharutils dmsetup jq xxd expect
      keyutils netcat-openbsd passwd openssh-client sshpass asciidoctor
    - sudo apt-get -y build-dep cryptsetup
    - sudo -E git clean -xdf
    - ./autogen.sh
    - ./configure --enable-libargon2 --enable-asciidoc

test-mergerq-job-debian:
  extends:
    - .debian-prep
  tags:
    - libvirt
    - debian12
  stage: test
  interruptible: true
  variables:
    RUN_SSH_PLUGIN_TEST: "1"
  rules:
    - if: $CI_PROJECT_PATH != "cryptsetup/cryptsetup"
      when: never
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  script:
    - make -j
    - make -j -C tests check-programs
    - sudo -E make check

test-main-commit-job-debian:
  extends:
    - .debian-prep
  tags:
    - libvirt
    - debian12
  stage: test
  interruptible: true
  variables:
    RUN_SSH_PLUGIN_TEST: "1"
  rules:
    - if: $CI_PROJECT_PATH != "cryptsetup/cryptsetup"
      when: never
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /v2\..\.x$/
  script:
    - make -j
    - make -j -C tests check-programs
    - sudo -E make check

# meson tests
test-mergerq-job-debian-meson:
  extends:
    - .debian-prep
  tags:
    - libvirt
    - debian12
  stage: test
  interruptible: true
  variables:
    RUN_SSH_PLUGIN_TEST: "1"
  rules:
    - if: $CI_PROJECT_PATH != "cryptsetup/cryptsetup"
      when: never
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  script:
    - sudo apt-get -y install -y -qq meson ninja-build
    - meson setup build
    - ninja -C build
    - cd build && sudo -E meson test --verbose --print-errorlogs

test-main-commit-job-debian-meson:
  extends:
    - .debian-prep
  tags:
    - libvirt
    - debian12
  stage: test
  interruptible: true
  variables:
    RUN_SSH_PLUGIN_TEST: "1"
  rules:
    - if: $CI_PROJECT_PATH != "cryptsetup/cryptsetup"
      when: never
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /v2\..\.x$/
  script:
    - sudo apt-get -y install -y -qq meson ninja-build
    - meson setup build
    - ninja -C build
    - cd build && sudo -E meson test --verbose --print-errorlogs