.gitlab-ci.yml 2.82 KB
Newer Older
1 2 3
include:
  - remote: "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/raw/master/ci/images_template.yml"

Jordan Petridіs's avatar
Jordan Petridіs committed
4
stages:
5
  - "lint"
Jordan Petridіs's avatar
Jordan Petridіs committed
6
  - "test"
7
  - "extras"
Jordan Petridіs's avatar
Jordan Petridіs committed
8

9 10 11 12 13 14 15
.base:
  image: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$RUST_VERSION-$GST_RS_IMG_TAG"
  variables:
    G_DEBUG: "fatal_warnings"
  before_script:
    - source ./ci/env.sh
    - mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
16 17 18 19 20 21
    # If cargo exists assume we probably will want to update the lockfile
    - |
      if command -v cargo; then
        cargo generate-lockfile
        cargo update
      fi
Jordan Petridіs's avatar
Jordan Petridіs committed
22

23 24
.img-stable:
  extends: .base
Jordan Petridіs's avatar
Jordan Petridіs committed
25
  variables:
26
    RUST_VERSION: "stable"
Jordan Petridіs's avatar
Jordan Petridіs committed
27

28
.img-1-41:
29 30
  extends: .base
  variables:
31
    RUST_VERSION: "1.41.0"
Jordan Petridіs's avatar
Jordan Petridіs committed
32

33 34 35 36
.img-nightly:
  extends: .base
  variables:
    RUST_VERSION: "nightly"
37

38 39 40
.cargo test:
  stage: "test"
  script:
Jordan Petridіs's avatar
Jordan Petridіs committed
41 42
    - rustc --version
    - cargo --version
43
    - cargo build --locked --all --color=always
Jordan Petridіs's avatar
Jordan Petridіs committed
44 45
    # FIXME: tests are broken
    # https://github.com/sdroege/gstreamer-sys/issues/16
46 47
    # - cargo test --locked --all --color=always
    - cargo build --locked --all --all-features --color=always
Jordan Petridіs's avatar
Jordan Petridіs committed
48 49
    # FIXME: tests are broken
    # https://github.com/sdroege/gstreamer-sys/issues/16
50
    # - cargo test --locked --all --all-features --color=always
Jordan Petridіs's avatar
Jordan Petridіs committed
51

52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
    # Run tests for crates we can currently run. The others
    # need a new release of the C library first
    - |
        for crate in gstreamer-app-sys \
                     gstreamer-audio-sys \
                     gstreamer-base-sys \
                     gstreamer-check-sys \
                     gstreamer-gl-sys \
                     gstreamer-mpegts-sys \
                     gstreamer-net-sys \
                     gstreamer-pbutils-sys \
                     gstreamer-player-sys \
                     gstreamer-rtsp-sys \
                     gstreamer-sdp-sys \
                     gstreamer-sys \
                     gstreamer-tag-sys \
                     gstreamer-video-sys \
69 70
                     gstreamer-webrtc-sys \
                     gstreamer-controller-sys; \
71
            do \
72
                cargo test --locked -p $crate; \
73 74
            done

Jordan Petridіs's avatar
Jordan Petridіs committed
75
test stable:
76 77 78
  extends:
    - '.cargo test'
    - .img-stable
Jordan Petridіs's avatar
Jordan Petridіs committed
79

80
test 1.41:
81 82
  extends:
    - '.cargo test'
83
    - .img-1-41
84

85 86 87 88
test nightly:
  extends:
    - '.cargo test'
    - .img-nightly
89

90
rustfmt:
91
  extends: .img-stable
92 93 94 95
  stage: "lint"
  script:
    - cargo fmt --version
    - cargo fmt -- --color=always --check
96

97 98 99 100 101 102
check commits:
  extends: .img-stable
  stage: "lint"
  script:
    - ci-fairy check-commits --textwidth 0 --no-signed-off-by

103 104 105 106 107 108 109 110
outdated:
  extends: .img-stable
  allow_failure: true
  stage: 'extras'
  only:
    - schedules
  script:
    - cargo outdated --root-deps-only --exit-code 1 -v
111 112 113 114 115 116 117 118

deny:
  extends: .img-stable
  stage: 'extras'
  only:
    - schedules
  script:
    - cargo deny check