.gitlab-ci.yml 2.29 KB
Newer Older
1
variables:
2 3 4 5 6 7 8 9 10
  DEPS: build-essential git libwlroots-examples wget gnome-session gdb weston
  WANT_BUILD_DEPS: "true"

# For the smoke tests we also want debug packages, wlroots/rootston,
# weston-info, gdb, valgrind, ...
.smoketest_vars:
  variables: &smoketest_vars
    DEPS: libwlroots-examples wget gnome-session gdb weston valgrind
          libhandy-0.0-0-dbgsym libgtk-3-0-dbgsym libglib2.0-0-dbgsym
11
          xvfb imagemagick
12
    WANT_BUILD_DEPS: "false"
13

14
before_script:
15 16
  - export DEBIAN_FRONTEND=noninteractive
  - apt-get -y update
17
  - apt-get -y install wget ca-certificates gnupg eatmydata
18 19
  - echo "deb http://ci.puri.sm/ scratch librem5" > /etc/apt/sources.list.d/ci.list
  - wget -O- https://ci.puri.sm/ci-repo.key | apt-key add -
20
  - echo "deb http://debug.mirrors.debian.org/debian-debug/ buster-debug main" > /etc/apt/sources.list.d/debug.list
21
  - eatmydata apt-get -y update
22
  - '[ "$WANT_BUILD_DEPS" != "true" ] || eatmydata apt-get -y build-dep .'
23
  - eatmydata apt-get -y install $DEPS
24
  - ulimit -c unlimited
25

26
.tags: &tags
27 28
  tags:
    - librem5
29 30 31 32 33 34 35

build:native:
  <<: *tags
  stage: build
  artifacts:
    paths:
      - _build
36
  script:
37
    - meson --werror . _build
38
    - ninja -C _build
39 40 41 42 43 44 45 46

test:native:
  <<: *tags
  stage: test
  dependencies:
    - build:native
  script:
    - export LC_ALL=C.UTF-8
47 48
    - xvfb-run ninja -C _build test

49 50 51
test:smoke:one-output:
  <<: *tags
  stage: test
52
  variables: *smoketest_vars
53 54 55
  dependencies:
    - build:native
  script:
56
    - export OUTDIR=output
57 58 59
    - export G_DEBUG=fatal-criticals
    - export WLR_X11_OUTPUTS=1
    - tests/smoke
60 61 62
  artifacts:
    paths:
      - output/*.log
63
      - output/*.png
64
    when: always
65 66 67 68

test:smoke:two-outputs:
  <<: *tags
  stage: test
69
  variables: *smoketest_vars
70 71 72
  dependencies:
    - build:native
  script:
73
    - export OUTDIR=output
74 75 76
    - export G_DEBUG=fatal-criticals
    - export WLR_X11_OUTPUTS=2
    - tests/smoke
77 78 79
  artifacts:
    paths:
      - output/*.log
80
      - output/*.png
81
    when: always
82 83 84 85

test:smoke:valgrind:
  <<: *tags
  stage: test
86
  variables: *smoketest_vars
87 88 89 90 91 92 93 94 95 96 97
  dependencies:
    - build:native
  script:
    - export OUTDIR=output
    - export G_DEBUG=fatal-criticals
    - export WLR_X11_OUTPUTS=1
    - tests/smoke -V -T 30
  artifacts:
    paths:
      - vgdump
      - output/*.log
98
      - output/*.png
99
    when: always
100