ci_template.yml 42 KB
Newer Older
1
2
3
include:
  - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/7ea696055e322cc7aa4bcbe5422b56a198c4bdff/templates/ci-fairy.yml"

4
stages:
5
  - 'build docker'
6
  - 'preparation'
Matthew Waters's avatar
Matthew Waters committed
7
  - 'pre-build'
8
9
  - 'build'
  - 'test'
Matthew Waters's avatar
Matthew Waters committed
10
11
  # Use the resulting binaries
  - 'integrate'
12
13

variables:
14
15
16
  # Branch to track for modules that have no ref specified in the manifest
  GST_UPSTREAM_BRANCH: 'master'
  ORC_UPSTREAM_BRANCH: 'master'
17
18
19
20
21
22
23

  ###
  # IMPORTANT
  # These are the version tags for the docker images the CI runs against.
  # If you are hacking on them or need a them to rebuild, its enough
  # to change any part of the string of the image you want.
  ###
24
25
26
27
28
29
  FEDORA_TAG:  '2020-10-22.0'
  CERBERO_TAG: '2020-10-22.0'
  ANDROID_TAG: '2020-10-22.0'
  MANIFEST_TAG: '2020-10-22.0'
  TEST_MANIFEST_TAG: '2020-10-22.0'
  INDENT_TAG: '2020-10-22.0'
30
31
32
33
34
35
36
37

  GST_UPSTREAM_REPO: 'gstreamer/gst-ci'

  FEDORA_AMD64_SUFFIX:  'amd64/fedora'
  CERBERO_AMD64_SUFFIX: 'amd64/cerbero-fedora'
  ANDROID_AMD64_SUFFIX: 'amd64/android-fedora'
  MANIFEST_AMD64_SUFFIX: 'amd64/build-manifest'
  TEST_MANIFEST_AMD64_SUFFIX: 'amd64/test-manifest'
38
  INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
39
40

  FEDORA_IMAGE:   "$CI_REGISTRY_IMAGE/$FEDORA_AMD64_SUFFIX:$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
41
  FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
42
43
44
45
  CERBERO_IMAGE:  "$CI_REGISTRY_IMAGE/$CERBERO_AMD64_SUFFIX:$CERBERO_TAG-$GST_UPSTREAM_BRANCH"
  ANDROID_IMAGE:  "$CI_REGISTRY_IMAGE/$ANDROID_AMD64_SUFFIX:$ANDROID_TAG-$GST_UPSTREAM_BRANCH"
  MANIFEST_IMAGE: "$CI_REGISTRY_IMAGE/$MANIFEST_AMD64_SUFFIX:$MANIFEST_TAG-$GST_UPSTREAM_BRANCH"
  TEST_MANIFEST_IMAGE: "$CI_REGISTRY_IMAGE/$TEST_MANIFEST_AMD64_SUFFIX:$TEST_MANIFEST_TAG-$GST_UPSTREAM_BRANCH"
46
  INDENT_IMAGE:   "$CI_REGISTRY_IMAGE/$INDENT_AMD64_SUFFIX:$INDENT_TAG-$GST_UPSTREAM_BRANCH"
47

48
  WINDOWS_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v13-master'
49

50
  # Can't use $CI_* variables since we use this template in all repos, not just gst-ci
51
  CERBERO_SCRIPT_URL: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/cerbero_setup.sh"
52

53
  GIT_STRATEGY: none
54
  MESON_BUILDTYPE_ARGS: --default-library=both
Xavier Claessens's avatar
Xavier Claessens committed
55
  DEFAULT_MESON_ARGS: >
56
57
58
59
    -Dlibnice:tests=disabled
    -Dlibnice:examples=disabled
    -Dopenh264:tests=disabled
    -Dpygobject:tests=false
Xavier Claessens's avatar
Xavier Claessens committed
60
61
62
63
64
65
66
67
68
    -Dpython=enabled
    -Dlibav=enabled
    -Dugly=enabled
    -Dbad=enabled
    -Ddevtools=enabled
    -Dges=enabled
    -Drtsp_server=enabled
    -Dvaapi=enabled
    -Dsharp=disabled
69

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
  MESON_GST_WERROR: >
    -Dgstreamer:werror=true
    -Dgst-plugins-base:werror=true
    -Dgst-plugins-good:werror=true
    -Dgst-plugins-ugly:werror=true
    -Dgst-plugins-bad:werror=true
    -Dgst-rtsp-server:werror=true
    -Dgst-libav:werror=true
    -Dgst-examples:werror=true
    -Dgst-editing-services:werror=true
    -Dgst-docs:werror=true
    -Dgst-omx:werror=true
    -Dgst-devtools:werror=true
    -Dgst-python:werror=true
    -Dgstreamer-vaapi:werror=true
    -Dgstreamer-sharp:werror=true

87
  DEFAULT_CERBERO_ARGS: >
88
89
    --variants werror
    --timestamps
90

91
92
93
94
95
workflow:
  rules:
    - if: $CI_MERGE_REQUEST_IID
    - if: $CI_COMMIT_TAG
    - if: $CI_COMMIT_BRANCH
96
97
98
#
# Global CI policy
#
Nicolas Dufresne's avatar
Nicolas Dufresne committed
99
# This can be used to configure global behaviour our our jobs.
100
#
101
default:
102
103
104
105
  retry:
    max: 2
    when:
      - 'runner_system_failure'
106
107
      - 'stuck_or_timeout_failure'
      - 'scheduler_failure'
108
      - 'api_failure'
109
  interruptible: true
110

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129

# Script to check if a docker image exists in the upstream registry
# and if so copy it to the forked registry so we can use it
#
# This is copied/adapted from citemplates/templates/fedora.yml
# https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/96b621fe9f57ec2464f8d1a0940446afbf6c8f59/templates/fedora.yml
.check_image: &check_image_exists |
  # if-not-exists steps
  set -x

  if [[ -z "$GST_FORCE_REBUILD" ]]
  then
    # disable exit on failure
    set +e

    # check if our image is already in the current registry
    # we store the sha of the digest and the layers
    skopeo inspect docker://$LOCAL_IMAGE | jq '[.Digest, .Layers]' > local_sha

130
131
132
    # check if our image is already in our gst-ci registry fork
    skopeo inspect docker://$LOCAL_GST_CI_IMAGE | jq '[.Digest, .Layers]' > local_gst_ci_sha

133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
    # check if our image is already in the upstream registry
    if [[ -z "$GST_UPSTREAM_REPO" ]]
    then
      echo "WARNING! Variable \$GST_UPSTREAM_REPO is undefined, cannot check for images"
    else
      skopeo inspect docker://$GST_UPSTREAM_IMAGE | jq '[.Digest, .Layers]' > upstream_sha
    fi

    # reenable exit on failure
    set -e

    # if the upstream repo has an image, ensure we use the same
    if [ -s upstream_sha ]
    then

148
      echo "Checking if $LOCAL_IMAGE is up to date"
149
150
151
      # ensure we use the same image from upstream
      diff upstream_sha local_sha && exit 0 || true

152
      echo "Copying image from gstreamer/gst-ci to local registry"
153
154
155
156
157
158
159
160
161
162
163
164
      # copy the original image into the current project registry namespace
      # we do 2 attempts with skopeo copy at most
      skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
                  docker://$GST_UPSTREAM_IMAGE \
                  docker://$LOCAL_IMAGE || \
      skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
                  docker://$GST_UPSTREAM_IMAGE \
                  docker://$LOCAL_IMAGE

      exit 0
    fi

165
166
    set +x

167
168
169
    # if the local ci fork repo has an image, ensure we use the same
    if [ -s local_gst_ci_sha ]
    then
170
      echo "Checking if $LOCAL_GST_CI_IMAGE is up to date"
171
172
173
      # ensure we use the same image from upstream
      diff local_gst_ci_sha local_sha && exit 0 || true

174
      echo "Copying image from $CI_PROJECT_NAMESPACE/gst-ci to local registry"
175
176
177
178
179
180
181
182
183
184
185
186
      # copy the original image into the current project registry namespace
      # we do 2 attempts with skopeo copy at most
      skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
                  docker://$LOCAL_GST_CI_IMAGE \
                  docker://$LOCAL_IMAGE || \
      skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
                  docker://$LOCAL_GST_CI_IMAGE \
                  docker://$LOCAL_IMAGE

      exit 0
    fi

187
188
189
    # if we have a local image but none in the upstream repo, use our
    if [ -s local_sha ]
    then
190
      echo "Using $LOCAL_IMAGE"
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
      exit 0
    fi
  fi


# Build docker images from Dockerfiles
#
# This is copied/adapted from citemplates/templates/fedora.yml
# https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/96b621fe9f57ec2464f8d1a0940446afbf6c8f59/templates/fedora.yml
#
# CITemplates builds uses buildah run/commit workflow to build the images which doesn't
# fit us atm and our images need further adjustment to make use of it. Porting to
# ci-templates is the next step though.
#
# All the documentation from citemplates should be applicable here, so please refer there
.base:
207
  image: "$CI_REGISTRY/freedesktop/ci-templates/buildah:2020-07-20.1"
208
209
210
211
212
213
214
215
  variables:
    STORAGE_DRIVER: 'vfs'
    BUILDAH_FORMAT: 'docker'
    BUILDAH_ISOLATION: 'chroot'

    GIT_STRATEGY: fetch
  script:
    - export LOCAL_IMAGE="$CI_REGISTRY_IMAGE/$REPO_SUFFIX:$TAG"
216
    - export LOCAL_GST_CI_IMAGE="$CI_REGISTRY/$CI_PROJECT_NAMESPACE/gst-ci/$REPO_SUFFIX:$TAG"
217
218
    - export GST_UPSTREAM_IMAGE="$CI_REGISTRY/$GST_UPSTREAM_REPO/$REPO_SUFFIX:$TAG"

219
220
221
222
223
224
225
226
227
228
    # check if the docker registry is enabled, else the variable will be missing
    - |
      if [[ -z "$CI_REGISTRY_IMAGE" ]]
      then
        echo "ERROR! Looks like your repository/fork has disabled Docker Registries."
        echo "Pleae enable them by following the documentation from here:"
        echo "https://docs.gitlab.com/ee/user/packages/container_registry/#enable-the-container-registry-for-your-project"
        exit 1
      fi

229
230
231
232
    # Newer versions of podman/buildah try to set overlayfs mount options when
    # using the vfs driver, and this causes errors.
    - sed -i '/^mountopt =.*/d' /etc/containers/storage.conf

233
    - *check_image_exists
234

235
236
237
238
239
240
241
242
243
    # This part of the job should only ever be possible to be reach in a gst-ci fork
    - |
      if [[ "$CI_PROJECT_NAME" != 'gst-ci' ]]
      then
        echo "ERROR! Something is wrong!"
        echo "This part of the job is supposed to be executed only in gst-ci forks, and its probably going to fail else"
        exit 1
      fi

244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
    - echo "Building image $LOCAL_IMAGE"

    - >
      buildah bud
      --build-arg DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH
      --label ci.job_id=$CI_JOB_ID
      --label pipeline.url=$CI_PIPELINE_URL
      --label git.ref_name=$CI_COMMIT_REF_NAME
      --label git.sha=$CI_COMMIT_SHA
      --label gitlab.project_path=$CI_PROJECT_PATH
      --label gitlab.project_url=$CI_PROJECT_URL
      --label fdo.upstream-repo=$GST_UPSTREAM_REPO
      -f $DOCKERFILE
      -t $LOCAL_IMAGE
      $CONTEXT_DIR

    - buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY

    # Sanity check
    - |
      if [ "$CI_PROJECT_PATH" = "gstreamer/gst-ci" ]; then
        if [ "$LOCAL_IMAGE" != "$GST_UPSTREAM_IMAGE" ]; then
          echo "ERROR!!! AAAAA! THE IMAGE URI DOES NOT MATCH THE EXPECTED UPSTREAM ONE"
          echo $LOCAL_IMAGE
          echo $GST_UPSTREAM_IMAGE
          exit 1
        fi
      fi

    -  buildah push $LOCAL_IMAGE

fedora amd64 docker:
  stage: "build docker"
  variables:
    REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
    TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"

    CONTEXT_DIR: "./docker/fedora/"
    DOCKERFILE: "docker/fedora/Dockerfile"
  extends: .base

cerbero fedora amd64 docker:
  stage: "build docker"
  variables:
    REPO_SUFFIX: "$CERBERO_AMD64_SUFFIX"
    TAG: "$CERBERO_TAG-$GST_UPSTREAM_BRANCH"

    CONTEXT_DIR: "docker/cerbero/"
    DOCKERFILE: "docker/cerbero/Dockerfile-fedora"
  extends: .base

android docker:
  stage: "build docker"
  variables:
    REPO_SUFFIX: "$ANDROID_AMD64_SUFFIX"
    TAG: "$ANDROID_TAG-$GST_UPSTREAM_BRANCH"

    CONTEXT_DIR: "docker/android/"
    DOCKERFILE: "docker/android/Dockerfile"
  extends: .base

alpine amd64 manifest builder docker:
  stage: "build docker"
  variables:
    REPO_SUFFIX: "$MANIFEST_AMD64_SUFFIX"
    TAG: '$MANIFEST_TAG-$GST_UPSTREAM_BRANCH'

    CONTEXT_DIR: "docker/build_manifest/"
    DOCKERFILE: "docker/build_manifest/Dockerfile"
  extends: .base

gst-indent amd64 docker:
  stage: "build docker"
  variables:
    REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
319
    TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
320
321
322
323
324
325
326
327

    CONTEXT_DIR: "docker/indent/"
    DOCKERFILE: "docker/indent/Dockerfile"
  extends: .base

#
# Job to create the manifest.xml to used for our builds
#
328
manifest:
329
  image: $MANIFEST_IMAGE
330
  rules:
331
332
    # Always have automatic pipeline for branchs in cerbero and docs
    # cause they need to update artifacts, like the docs site or cerbero deps
333
    - if: '$CI_PROJECT_PATH == "gstreamer/cerbero"'
334
    - if: '$CI_PROJECT_PATH == "gstreamer/gst-docs"'
335

336
337
338
    # If the MR is assigned to the Merge bot, trigger the pipeline automatically
    - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
    # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
339
    # to avoid wasting CI resources
340
    - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
341
342
343
      when: 'manual'
    # If this matches, it means the pipeline is running against either the main
    # or a stable branch, so make it manual
344
    - if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
345
346
      when: 'manual'

347
  stage: 'preparation'
348
  script:
349
350
351
352
    - cd /gst-ci
    - gitlab/build_manifest.py --self-update
    - gitlab/build_manifest.py ${CI_PROJECT_DIR}/manifest.xml
    - cat ${CI_PROJECT_DIR}/manifest.xml
353
  artifacts:
354
    expire_in: "7 days"
355
356
357
    paths:
      - "manifest.xml"

358
359
360
#
# gst-indent!!
#
361
gst indent:
362
  image: $INDENT_IMAGE
363
364
365
  stage: 'preparation'
  variables:
    GIT_STRATEGY: 'fetch'
Nicolas Dufresne's avatar
Nicolas Dufresne committed
366
367
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(gstreamer-sharp|gst-integration-testsuites|cerbero|gst-docs)$/'
368
369
370
  script:
    # man indent. grep RETURN VALUE, grab a beer on my behalf...
    - indent --version || true
371
    - |
372
      filter_cmd=("cat")
373
      if test -f ".indentignore"; then
374
          filter_args=()
375
376
          while read -r line; do
              if test -n "$line"; then
377
                  filter_args+=("-e" "$line")
378
379
              fi
          done < ".indentignore"
380
381
          if [[ ${#filter_args[@]} -gt 0 ]]; then
              filter_cmd=("grep" "-v" "${filter_args[@]}")
382
383
          fi
      fi
384
      find . -name '*.c' | "${filter_cmd[@]}" | xargs -d '\n' gst-indent
385
    - |
386
387
388
      if git diff --quiet; then
          echo "Code is properly formatted"
      else
389
390
391
392
393
          git diff --color=always
          echo 'style diverges, please run gst-indent first'
          exit 1
      fi

394
395
396
397
398
399
400
401
402
403
404
405
#
# Check commit messages with ci-fairy
#
check commits:
  extends: '.fdo.ci-fairy'
  needs: []
  stage: 'preparation'
  variables:
    GIT_STRATEGY: 'fetch'
  script:
    - ci-fairy check-commits --textwidth 0 --no-signed-off-by

406
407
408
#
# gst-build setup templates
#
409
410
.gst_build_template: &gst_build
  - echo $MESON_ARGS
411
412
413
414
415
416
  # Sometimes, gitlab-runner want to reuse
  # existing docker volumes without cleaning them up...
  # Make sure the docker volume is clean
  - rm -rf gst-build || true
  - rm -rf meson-logs || true
  - rm -rf validate-logs || true
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442

  - curl -L -o clone_manifest_ref.py "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/clone_manifest_ref.py"
  - python3 clone_manifest_ref.py --manifest manifest.xml --project gst-build --destination gst-build
  - cd gst-build/
  # only copy immediate directories. We don't want to modify .wrap files
  - find /gst-build/subprojects/ -mindepth 1 -maxdepth 1 -type d -exec cp -r \{\} subprojects/ \;
  - ./git-update --no-interaction --manifest="${CI_PROJECT_DIR}/manifest.xml"
  - meson build/ $MESON_ARGS
  - ninja -C build/
  - ccache --show-stats

.gst_build_ccache_vars:
  variables:
    CCACHE_COMPILERCHECK: 'content'
    CCACHE_COMPRESS: 'true'
    CCACHE_BASEDIR: '/cache/gstreamer/gst-build'
    CCACHE_DIR: '/cache/gstreamer/gst-build/ccache/'
    # shared across everything really
    CCACHE_MAXSIZE: '10G'
    CARGO_HOME: '/cache/gstreamer/cargo'

.simple_fedora_build: &simple_build >-
  ${DEFAULT_MESON_ARGS}
  -Dsharp=enabled
  -Domx=enabled
  -Dgst-omx:target=generic
443
  -Ddoc=disabled
444
445
  -Drs=disabled
  ${MESON_BUILDTYPE_ARGS}
446
  ${MESON_GST_WERROR}
447

448
.build:
Matthew Waters's avatar
Matthew Waters committed
449
  stage: 'build'
450
  extends:
451
    - '.gst_build_ccache_vars'
452
453
  needs:
    - "manifest"
454
  # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
455
456
  # Also need to take into account I/O of pulling docker images and uploading artifacts
  timeout: '45min'
457
  variables:
458
    MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
459
460
  rules:
    - if: '$CI_PROJECT_NAME != "cerbero"'
461
  script:
462
    *gst_build
463
  after_script:
464
465
466
467
    - mv gst-build/build/meson-logs/ meson-logs
    # Cleanup everything else to reduce the size
    # of the docker volume we leave behind
    - rm -rf gst-build
468
469
470
471
  artifacts:
    expire_in: "7 days"
    when: "always"
    paths:
472
      - 'meson-logs/'
473
      - 'manifest.xml'
474

475
.build fedora x86_64:
476
  extends: '.build'
477
  image: $FEDORA_IMAGE
Thibault Saunier's avatar
Thibault Saunier committed
478
  variables:
479
    MESON_ARGS: *simple_build
Nicolas Dufresne's avatar
Nicolas Dufresne committed
480
481
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-omx|gst-plugins-rs)$/'
482

483
build nodebug fedora x86_64:
484
  extends: '.build'
Thibault Saunier's avatar
Thibault Saunier committed
485
  image: $FEDORA_IMAGE
486
  variables:
487
    MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
488
489
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
490
491

build static fedora x86_64:
492
  extends: '.build fedora x86_64'
493
494
  variables:
    MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
495
496
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
497
498
499
500
501

build static nodebug fedora x86_64:
  extends: 'build nodebug fedora x86_64'
  variables:
    MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
502
503
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
504

505
build clang fedora x86_64:
506
  extends: '.build fedora x86_64'
507
508
509
  variables:
    CC: 'ccache clang'
    CXX: 'ccache clang++'
Nicolas Dufresne's avatar
Nicolas Dufresne committed
510
511
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
512

513
514
.test:
  stage: 'test'
515
  extends:
516
517
518
    - '.gst_build_ccache_vars'
  needs:
    - "manifest"
519
  variables:
520
521
    MESON_ARGS: *simple_build

522
    # Disable colored output to avoid weird rendering issues
523
524
525
    GST_DEBUG_NO_COLOR: "true"
    CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
    GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
526
    TIMEOUT_FACTOR: "2"
527
    CARGO_HOME: "/cache/gstreamer/cargo"
528
529
530
    # Enable the fault handler so we get backtraces on segfaults.
    # any non-empty string will do
    PYTHONFAULTHANDLER: "enabled"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
531
532
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-examples|gst-docs)$/'
533
  script:
534
535
    - *gst_build

536
    - echo "-> Running ${TEST_SUITE}"
537
538
539
    - >
      ./gst-uninstalled.py
      gst-validate-launcher ${TEST_SUITE}
540
      --dump-on-failure
541
542
543
544
      --mute
      --shuffle
      --no-display
      --meson-no-rebuild
545
      --timeout-factor "${TIMEOUT_FACTOR}"
546
547
548
      --fail-on-testlist-change
      -l "${CI_PROJECT_DIR}/validate-logs/"
      --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
549
      ${EXTRA_VALIDATE_ARGS}
550
551
552
553
554
  after_script:
    - mv gst-build/build/meson-logs/ meson-logs
    # Cleanup everything else to reduce the size
    # of the docker volume we leave behind
    - rm -rf gst-build
555
  artifacts:
556
    expire_in: '14 days'
557
558
    when: always
    paths:
559
      - 'meson-logs/'
560
      - 'validate-logs'
561
      - 'manifest.xml'
562
563
    reports:
      junit:
564
        - "validate-logs/*.xml"
565
566

.test fedora x86_64:
567
  image: $FEDORA_IMAGE
568
  extends: '.test'
569
  tags: ['gstreamer']
570
571
572
573
574

check fedora:
  extends: '.test fedora x86_64'
  variables:
    TEST_SUITE: "check.gst*"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
575
  rules:
576
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
577

578
579
integration testsuites fedora:
  extends: '.test fedora x86_64'
580
  parallel: 4
581
  variables:
582
    EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --check-bugs --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX}"
583
    TEST_SUITE: "validate ges"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
584
  rules:
585
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-examples|gst-omx|gstreamer-sharp|gst-plugins-rs)$/'
586

587
588
589
590
gstreamer-full:
  extends: 'build static fedora x86_64'
  stage: integrate
  variables:
591
    MESON_ARGS: >
592
      --default-library=static
593
      -Dauto_features=disabled
594
595
      -Dgstreamer:check=enabled
      -Dtests=enabled
596
      $MESON_GST_WERROR
Nicolas Dufresne's avatar
Nicolas Dufresne committed
597
598
599
  rules:
    - if: '$CI_PROJECT_NAME =~ /^(gst-build|gst-ci)$/'

600
601
602
  script:
  - *gst_build
  - meson test -C build -v test-gst-full
603
  artifacts:
604
605
    expire_in: "7 days"
    when: "always"
606
    paths:
607
      - 'meson-logs/'
608

609
610
611
# Valgrind
.valgrind fedora x86_64:
  extends: '.test fedora x86_64'
Matthew Waters's avatar
Matthew Waters committed
612
  stage: 'test'
613
  variables:
614
    EXTRA_VALIDATE_ARGS: "--valgrind"
615
616
617
618
619

valgrind core:
  extends: '.valgrind fedora x86_64'
  variables:
    TEST_SUITE: "check.gstreamer\\..*"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
620
  rules:
621
    - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-ci|gst-devtools)$/'
622
623
624
625
626

valgrind base:
  extends: '.valgrind fedora x86_64'
  variables:
    TEST_SUITE: "check.gst-plugins-base\\..*"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
627
  rules:
628
    - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-ci|gst-devtools)$/'
629
630
631
632
633

valgrind good:
  extends: '.valgrind fedora x86_64'
  variables:
    TEST_SUITE: "check.gst-plugins-good\\..*"
634
635
    # take longer time due to splitmux unit test
    TIMEOUT_FACTOR: "4"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
636
  rules:
637
    - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-ci|gst-devtools)$/'
638
639
640
641
642

valgrind ugly:
  extends: '.valgrind fedora x86_64'
  variables:
    TEST_SUITE: "check.gst-plugins-ugly\\..*"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
643
  rules:
644
    - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-ugly|gst-ci|gst-devtools)$/'
645
646
647
648
649

valgrind bad:
  extends: '.valgrind fedora x86_64'
  variables:
    TEST_SUITE: "check.gst-plugins-bad\\..*"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
650
  rules:
651
    - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-plugins-bad|gst-ci|gst-devtools)$/'
652

653
654
655
656
valgrind ges:
  extends: '.valgrind fedora x86_64'
  variables:
    TEST_SUITE: "check.gst-editing-services\\..*"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
657
658
  rules:
    - if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-editing-services|gst-ci|gst-devtools)$/'
659

660
661
662
663
# Template for Cerbero GStreamer Build
#
# Parameters:
# CONFIG: The name of the configuration file to use
Matthew Waters's avatar
Matthew Waters committed
664
# ARCH: The cerbero <os>_<cpu> (used in cache key)
665
666
#
.cerbero:
Matthew Waters's avatar
Matthew Waters committed
667
  stage: "build"
668
  image: $CERBERO_IMAGE
Nicolas Dufresne's avatar
Nicolas Dufresne committed
669
670
  rules:
    - if: '$CI_PROJECT_NAME == "cerbero"'
671
672
  needs:
    - "manifest"
673
674
675
  # Ensure that the runners it will be executed on
  # will have plenty of space for the cache
  tags: ['gstreamer']
676
  timeout: '3h'
677
  variables:
678
679
680
681
682
683
684
    CCACHE_COMPILERCHECK: "content"
    CCACHE_COMPRESS: "true"
    CCACHE_BASEDIR: "/cache/gstreamer/cerbero/"
    CCACHE_DIR: "/cache/gstreamer/cerbero/ccache/"
    # shared across everything really
    CCACHE_MAXSIZE: "50G"

Matthew Waters's avatar
Matthew Waters committed
685
686
    CERBERO_HOME: "cerbero-build"
    CERBERO_SOURCES: "cerbero-sources"
687
688
    CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS}"
    CERBERO: "./cerbero-uninstalled -c config/${CONFIG} -c localconf.cbc -m manifest.xml"
Matthew Waters's avatar
Matthew Waters committed
689
    CERBERO_PACKAGE_ARGS: "-t"
690
691
    CERBERO_RUN_WRAPPER: "" # 'wine' on cross-winXX
    CERBERO_RUN_SUFFIX: "" # '.exe' on cross-winXX
Matthew Waters's avatar
Matthew Waters committed
692
693
694
    HAVE_CCACHE: "yes"
    # used by macos packages as we only ever install to a fixed directory
    CERBERO_OVERRIDDEN_DIST_DIR: ""
695
    # location where the cerbero git repo is stored on the image
696
    CERBERO_HOST_DIR: "/cerbero/"
697
  before_script:
698
    - echo "Fetching ${CERBERO_SCRIPT_URL}"
699
700
701
    - curl -L -o cerbero_setup.sh "${CERBERO_SCRIPT_URL}"
    - chmod +x cerbero_setup.sh
    - ./cerbero_setup.sh cerbero_before_script
702
  script:
703
    - ./cerbero_setup.sh cerbero_script
704
  cache:
705
    key: "${CI_JOB_NAME}"
706
707
708
709
    paths:
      - "${CERBERO_SOURCES}"
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
710
    expire_in: '5 days'
711
712
713
    when: 'always'
    paths:
      - "manifest.xml"
Matthew Waters's avatar
Matthew Waters committed
714
      - "${CERBERO_HOME}/logs"
715
      - "*.tar.*"
716

717
.build windows:
718
  image: $WINDOWS_IMAGE
719
  stage: 'build'
720
721
  needs:
    - 'manifest'
722
723
724
  tags:
    - 'docker'
    - 'windows'
725
726
    - '1809'
  timeout: '45min'
727
728
729
730
731
732
  variables:
    MESON_ARGS: >
      ${DEFAULT_MESON_ARGS}
      -Dpython=disabled
      -Dlibav=disabled
      -Dvaapi=disabled
733
      -Dgst-plugins-base:pango=enabled
734
      -Dgst-plugins-good:cairo=enabled
Nicolas Dufresne's avatar
Nicolas Dufresne committed
735
736
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs|gstreamer-vaapi)$/'
737
  script:
738
739
740
741
742
743
    # Sometimes there's seems to be an existing gst-build clone that comes either from the ether or
    # from a previous job due to some gitlab bug or implicit behavior?
    # So let's always check and clear it out if its there
    # https://gitlab.freedesktop.org/tpm/gstreamer-sharp/-/jobs/1672137
    - if (Test-Path $env:CI_PROJECT_DIR/gst-build) { Remove-Item -Recurse -Force $env:CI_PROJECT_DIR/gst-build }

744
745
746
747
    # Make sure powershell exists on errors
    # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
    - $ErrorActionPreference = "Stop"

748
749
    - Invoke-WebRequest -Uri "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/$env:GST_UPSTREAM_BRANCH/gitlab/clone_manifest_ref.py" -OutFile $env:CI_PROJECT_DIR/clone_manifest_ref.py
    - python clone_manifest_ref.py --manifest manifest.xml --project gst-build --destination $env:CI_PROJECT_DIR/gst-build
750
    - cd $env:CI_PROJECT_DIR/gst-build
751

752
    - cp -r C:/subprojects/* subprojects/
753
    # Run the git-update script and feed it the manifest to setup the environment
754
    - cd $env:CI_PROJECT_DIR/gst-build;  python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml
755
756
757
758
759
760
761
762
763
    # For some reason, options are separated by newline instead of space, so we
    # have to replace them first.
    - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
    # Gitlab executes PowerShell in docker, but VsDevCmd.bat is a batch script.
    # Environment variables substitutions is done by PowerShell before calling
    # cmd.exe, that's why we use $env:FOO instead of %FOO%
    - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
        meson build $env:MESON_ARGS &&
        ninja -C build"
764
765
766
767
768
769
  # XXX: Re-enable when uploading stops timing out
  #artifacts:
  #  expire_in: "7 days"
  #  when: "always"
  #  paths:
  #    - 'gst-build/build/meson-logs/'
770
771
772
773
774
775
776
777
778
779
780
781
782

build vs2017 amd64:
  extends: '.build windows'
  variables:
    ARCH: 'amd64'

build vs2017 x86:
  extends: '.build windows'
  variables:
    ARCH: 'x86'

build msys2 :
  extends: '.build windows'
783
  timeout: '60min'
784
785
786
787
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs|gstreamer-vaapi)$/'
      allow_failure: true
      when: 'manual'
788
  script:
789
790
791
792
793
794
    # Sometimes there's seems to be an existing gst-build clone that comes either from the ether or
    # from a previous job due to some gitlab bug or implicit behavior?
    # So let's always check and clear it out if its there
    # https://gitlab.freedesktop.org/tpm/gstreamer-sharp/-/jobs/1672137
    - if (Test-Path $env:CI_PROJECT_DIR/gst-build) { Remove-Item -Recurse -Force $env:CI_PROJECT_DIR/gst-build }

795
796
797
798
    # Make sure powershell exists on errors
    # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
    - $ErrorActionPreference = "Stop"

799
800
    # For some reason docker build hangs if this is included in the image, needs more troubleshooting
    - $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
Nirbheek Chauhan's avatar
Nirbheek Chauhan committed
801
    # Copied from https://github.com/msys2/setup-msys2/blob/master/main.js#L98
802
    - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
Nirbheek Chauhan's avatar
Nirbheek Chauhan committed
803
804
805
806
807
808
809
810
    - C:\msys64\usr\bin\bash -c "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
    - echo "Updating MSYS2"
    - C:\msys64\usr\bin\bash -c "pacman -Syuu --noconfirm || echo Update failed, ignoring"
    - echo "Killing all MSYS2 processes"
    - taskkill /F /FI "MODULES eq msys-2.0.dll"
    - echo "Completing MSYS2 update"
    - C:\msys64\usr\bin\bash -c "pacman -Suu --noconfirm"
    - echo "Installing needed MSYS2 packages"
811
812
    - C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"

813
814
815
816
    - Invoke-WebRequest -Uri "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/$env:GST_UPSTREAM_BRANCH/gitlab/clone_manifest_ref.py" -OutFile $env:CI_PROJECT_DIR/clone_manifest_ref.py
    - python clone_manifest_ref.py --manifest manifest.xml --project gst-build --destination $env:CI_PROJECT_DIR/gst-build
    - cd $env:CI_PROJECT_DIR/gst-build

817
818
819
    - cp -r C:\subprojects\* subprojects\

    # Run the git-update script and feed it the manifest to setup the environment
820
    - cd $env:CI_PROJECT_DIR/gst-build; python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml
821
822
823
    # For some reason, options are separated by newline instead of space, so we
    # have to replace them first.
    - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
824
825
826
    # Replace forward slashes with backwards so bash doesn't complain
    - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
    - C:\msys64\usr\bin\bash -c "cd $env:_PROJECT_DIR/gst-build &&
827
828
829
830
        meson build $env:MESON_ARGS &&
        ninja -C build"


831
832
833
# Template for Cerbero GStreamer Deps
#
# This template is used by cerbero/ project to pre-built the GStreamer
Thibault Saunier's avatar
Thibault Saunier committed
834
# dependencies. When available, the .cerbero jobs will download this artifact
835
836
837
838
# in order to speed up the build.
#
# Parameters:
# CONFIG: The name of the configuration file to use
839
# ARCH: The cerbero <os>_<cpu> (used in cache key)
840
#
841
# Produce an artifact with the dist/ and .cache along
842
843
844
# with the associated build-tools.
.cerbero deps:
  extends: .cerbero
Nicolas Dufresne's avatar
Nicolas Dufresne committed
845
846
  rules:
    - if: '$CI_PROJECT_NAME == "cerbero"'
847
  script:
848
    - ./cerbero_setup.sh cerbero_deps_script
849

850
851
852
#
# Cerbero Linux X86_64 build
#
853
854
cerbero deps fedora x86_64:
  extends: '.cerbero deps'
855
856
  variables:
    CONFIG: "linux.config"
857
    ARCH: "linux_x86_64"
858

859
build cerbero fedora x86_64:
860
  extends: '.cerbero'
Nicolas Dufresne's avatar
Nicolas Dufresne committed
861
862
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
863
864
  variables:
    CONFIG: "linux.config"
865

866
867
868
#
# Cerbero Android Universal build
#
869
.cerbero cross-android universal:
870
871
  variables:
    CONFIG: "cross-android-universal.cbc"
872
    ARCH: "android_universal"
873
874
875
876
877
878
879
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
    expire_in: '5 days'
    when: 'always'
    paths:
      - "manifest.xml"
      - "${CERBERO_HOME}/logs"
880
      - "*[0-9].tar.*"
881

882
883
884
885
cerbero deps cross-android universal:
  extends:
    - '.cerbero deps'
    - '.cerbero cross-android universal'
886

887
build cerbero cross-android universal:
888
889
890
  extends:
    - '.cerbero'
    - '.cerbero cross-android universal'
Nicolas Dufresne's avatar
Nicolas Dufresne committed
891
  rules:
892
    - if: '$CI_MERGE_REQUEST_IID && $CI_PROJECT_NAME == "gst-docs"'
893
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
894

895
896
897
#
# Cerbero Cross Windows builds
#
898
cerbero deps cross-windows x86:
899
  extends: '.cerbero deps'
900
901
  variables:
    CONFIG: "cross-win32.cbc"
902
    ARCH: "mingw_x86"
903

904
build cerbero cross win32:
905
  extends: '.cerbero'
906
907
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
908
909
  variables:
    CONFIG: "cross-win32.cbc"
910
911
    CERBERO_RUN_WRAPPER: "wine"
    CERBERO_RUN_SUFFIX: ".exe"
912

913

914
cerbero deps cross-windows x86_64:
915
  extends: '.cerbero deps'
916
917
  variables:
    CONFIG: "cross-win64.cbc"
918
    ARCH: "mingw_x86_64"
919

920
build cerbero cross win64:
921
  extends: '.cerbero'
922
923
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
924
925
  variables:
    CONFIG: "cross-win64.cbc"
926
927
    CERBERO_RUN_WRAPPER: "wine"
    CERBERO_RUN_SUFFIX: ".exe"
928

929
930
931
#
# Build an Android App using the android binaries
#
932
.cross-android universal examples:
933
  image: $ANDROID_IMAGE
Matthew Waters's avatar
Matthew Waters committed
934
  stage: 'integrate'
935
936
937
938
  variables:
    EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples
    GSTREAMER_ROOT_ANDROID: ${CI_PROJECT_DIR}/examples/cerbero-android-universal
  script:
939
    - mkdir -p ${EXAMPLES_HOME}/outputs
940
    - curl -L -o clone_manifest_ref.py https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/clone_manifest_ref.py
941
942
    - chmod +x clone_manifest_ref.py
    - ./clone_manifest_ref.py --manifest manifest.xml --project gst-examples --destination ${EXAMPLES_HOME}/gst-examples
943
    - ./clone_manifest_ref.py --manifest manifest.xml --project gst-docs --destination ${EXAMPLES_HOME}/gst-docs
944
945
946
    - rm clone_manifest_ref.py

    # extract our binaries
947
    - rm -f gstreamer-1.0-android-universal-*-runtime.tar.*
948
    - mkdir ${GSTREAMER_ROOT_ANDROID}
949
    - time tar -C ${GSTREAMER_ROOT_ANDROID} -xf gstreamer-1.0-android-universal-*.tar.*
950

951
    # gst-examples - player
952
    - chmod +x ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew
953
    - ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew --no-daemon --project-dir ${EXAMPLES_HOME}/gst-examples/playback/player/android assembleDebug
954
955
    - cp ${EXAMPLES_HOME}/gst-examples/playback/player/android/app/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/

956
957
    # gst-examples - vulkan
    - chmod +x ${EXAMPLES_HOME}/gst-examples/vulkan/android/gradlew
958
    - ${EXAMPLES_HOME}/gst-examples/vulkan/android/gradlew --no-daemon --project-dir ${EXAMPLES_HOME}/gst-examples/vulkan/android assembleDebug
959
960
    - cp ${EXAMPLES_HOME}/gst-examples/vulkan/android/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/

961
    # gst-docs android tutorials
962
    - chmod +x ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew
963
    - ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew --no-daemon --project-dir ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android assembleDebug
964
    - cp ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/android-tutorial-*/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/
965
966
  after_script:
    - rm -rf ${GSTREAMER_ROOT_ANDROID}
967
    - rm -rf ${EXAMPLES_HOME}/gst-examples ${EXAMPLES_HOME}/gst-docs
968
969
970
971
972
973
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
    expire_in: '5 days'
    when: 'always'
    paths:
      - "manifest.xml"
974
      - "${EXAMPLES_HOME}/outputs"
975

976
977
cross-android universal examples:
  extends: ".cross-android universal examples"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
978
  rules:
979
    - if: '$CI_MERGE_REQUEST_IID && $CI_PROJECT_NAME == "gst-docs"'
980
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
981
  needs:
982
    - "build cerbero cross-android universal"
983

984
985
cerbero cross-android universal examples:
  extends: ".cross-android universal examples"
Nicolas Dufresne's avatar
Nicolas Dufresne committed
986
987
  rules:
    - if: '$CI_PROJECT_NAME == "cerbero"'
988
  needs:
989
    - "cerbero deps cross-android universal"
990

Matthew Waters's avatar
Matthew Waters committed
991
992
993
994
995
996
997
998
999
1000
#
# Cerbero macOS X86_64 build
#
.cerbero macos x86_64:
  variables:
    ARCH: "darwin_x86_64"
    CONFIG: "osx-x86-64.cbc"
    CERBERO_PACKAGE_ARGS: ""
    HAVE_CCACHE: ""
    CERBERO_OVERRIDDEN_DIST_DIR: "/Library/Frameworks/GStreamer.framework/Versions/1.0"
1001
    CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/"
Matthew Waters's avatar
Matthew Waters committed
1002
  tags:
1003
    - gst-macos-10.15
Matthew Waters's avatar
Matthew Waters committed
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
    expire_in: '5 days'
    when: 'always'
    paths:
      - "manifest.xml"
      - "${CERBERO_HOME}/logs"
      - "gstreamer-1.0-1.*.pkg"
      - "gstreamer-1.0-devel-1.*.pkg"

1014
1015
1016
1017
cerbero deps macos x86_64:
  extends:
    - '.cerbero deps'
    - '.cerbero macos x86_64'
Matthew Waters's avatar
Matthew Waters committed
1018
1019

build cerbero macos x86_64:
1020
1021
1022
  extends:
    - '.cerbero'
    - '.cerbero macos x86_64'
Nicolas Dufresne's avatar
Nicolas Dufresne committed
1023
1024
  rules:
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
Matthew Waters's avatar
Matthew Waters committed
1025

Matthew Waters's avatar
Matthew Waters committed
1026
1027
1028
#
# Cerbero iOS build
#
1029
.cerbero cross-ios universal:
Matthew Waters's avatar
Matthew Waters committed
1030
1031
1032
1033
1034
1035
  variables:
    ARCH: "ios_universal"
    CONFIG: "cross-ios-universal.cbc"
    CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v nowerror"
    CERBERO_PACKAGE_ARGS: ""
    HAVE_CCACHE: ""
1036
    CERBERO_HOST_DIR: "/Users/gst-ci/cerbero/"
Matthew Waters's avatar
Matthew Waters committed
1037
  tags:
1038
    - gst-ios-13.2
Matthew Waters's avatar
Matthew Waters committed
1039
1040
1041
1042
1043
1044
1045
1046
1047
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
    expire_in: '5 days'
    when: 'always'
    paths:
      - "manifest.xml"
      - "${CERBERO_HOME}/logs"
      - "gstreamer-1.0-*-ios-universal.pkg"

1048
1049
1050
1051
cerbero deps cross-ios universal:
  extends:
    - '.cerbero deps'
    - '.cerbero cross-ios universal'
Matthew Waters's avatar
Matthew Waters committed
1052

1053
build cerbero cross-ios universal:
1054
1055
1056
  extends:
    - '.cerbero'
    - '.cerbero cross-ios universal'
Nicolas Dufresne's avatar
Nicolas Dufresne committed
1057
  rules:
1058
    - if: '$CI_MERGE_REQUEST_IID && $CI_PROJECT_NAME == "gst-docs"'
Nicolas Dufresne's avatar
Nicolas Dufresne committed
1059
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
Matthew Waters's avatar
Matthew Waters committed
1060

1061
documentation:
1062
  image: $FEDORA_DOCS_IMAGE
1063
  extends:
1064
    - '.gst_build_ccache_vars'
Nicolas Dufresne's avatar
Nicolas Dufresne committed
1065
  rules:
1066
    - if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-integration-testsuites|gst-plugins-rs|gst-python)$/'
1067
  needs:
1068
    - "manifest"
Matthew Waters's avatar
Matthew Waters committed
1069
  stage: integrate
1070
1071
  variables:
    MESON_ARGS: *simple_build
1072
    MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
1073
    CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
1074
  script:
Mathieu Duponchelle's avatar
Mathieu Duponchelle committed
1075
  - pip3 install --upgrade git+https://github.com/hotdoc/hotdoc@28ad9aa59daa49d6b3fd1bc6b144df52af39475b
1076
1077
1078
1079

  # FIXME: remove this once the docs image is updated
  - rm -rf /gst-build/subprojects/pygobject/

1080
  - *gst_build
1081
1082
1083
1084
  - ./gst-uninstalled.py ninja -C build/ plugins_doc_caches
  - |
    python3 -c "import os, subprocess, sys
    subprojects = [os.environ['CI_PROJECT_NAME']]