2020-04-27 11:12:17 +00:00
|
|
|
include:
|
|
|
|
- remote: "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/raw/master/ci/images_template.yml"
|
|
|
|
|
2018-10-15 14:14:44 +00:00
|
|
|
stages:
|
2019-06-18 10:03:55 +00:00
|
|
|
- "lint"
|
2018-10-15 14:14:44 +00:00
|
|
|
- "test"
|
2020-04-27 11:18:28 +00:00
|
|
|
- "extras"
|
2018-10-15 14:14:44 +00:00
|
|
|
|
2020-04-27 11:12:17 +00:00
|
|
|
.base:
|
|
|
|
image: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$RUST_VERSION-$GST_RS_IMG_TAG"
|
|
|
|
variables:
|
|
|
|
# Only stuff inside the repo directory can be cached
|
|
|
|
# Override the CARGO_HOME variable to force its location
|
|
|
|
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo_home"
|
|
|
|
G_DEBUG: "fatal_warnings"
|
|
|
|
before_script:
|
|
|
|
- source ./ci/env.sh
|
|
|
|
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
|
2018-10-15 14:14:44 +00:00
|
|
|
cache:
|
|
|
|
key: "gst"
|
|
|
|
paths:
|
2020-04-27 11:12:17 +00:00
|
|
|
- "${CARGO_HOME}"
|
2018-10-15 14:14:44 +00:00
|
|
|
|
2020-04-27 11:12:17 +00:00
|
|
|
.img-stable:
|
|
|
|
extends: .base
|
2018-10-15 14:14:44 +00:00
|
|
|
variables:
|
2020-04-27 11:12:17 +00:00
|
|
|
RUST_VERSION: "stable"
|
2018-10-15 14:14:44 +00:00
|
|
|
|
2020-04-27 11:12:17 +00:00
|
|
|
.img-1-40:
|
|
|
|
extends: .base
|
|
|
|
variables:
|
|
|
|
RUST_VERSION: "1.40.0"
|
2018-10-15 14:14:44 +00:00
|
|
|
|
2020-04-27 11:12:17 +00:00
|
|
|
.img-nightly:
|
|
|
|
extends: .base
|
|
|
|
variables:
|
|
|
|
RUST_VERSION: "nightly"
|
2018-11-11 06:59:36 +00:00
|
|
|
|
2020-04-27 11:12:17 +00:00
|
|
|
.cargo test:
|
|
|
|
stage: "test"
|
|
|
|
script:
|
2018-10-15 14:14:44 +00:00
|
|
|
- rustc --version
|
|
|
|
- cargo --version
|
|
|
|
- cargo build --all --color=always
|
|
|
|
# FIXME: tests are broken
|
|
|
|
# https://github.com/sdroege/gstreamer-sys/issues/16
|
|
|
|
# - cargo test --all --color=always
|
|
|
|
- cargo build --all --all-features --color=always
|
|
|
|
# FIXME: tests are broken
|
|
|
|
# https://github.com/sdroege/gstreamer-sys/issues/16
|
|
|
|
# - cargo test --all --all-features --color=always
|
|
|
|
|
2018-11-11 06:59:36 +00:00
|
|
|
# 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 \
|
|
|
|
gstreamer-webrtc-sys; \
|
|
|
|
do \
|
|
|
|
cargo test -p $crate; \
|
|
|
|
done
|
|
|
|
|
2018-10-15 14:14:44 +00:00
|
|
|
test stable:
|
2020-04-27 11:12:17 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-stable
|
2018-10-15 14:14:44 +00:00
|
|
|
|
2020-04-27 11:12:17 +00:00
|
|
|
test 1.40:
|
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-1-40
|
2018-12-19 16:14:15 +00:00
|
|
|
|
2020-04-27 11:12:17 +00:00
|
|
|
test nightly:
|
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-nightly
|
2018-12-19 16:14:15 +00:00
|
|
|
|
2019-06-18 10:03:55 +00:00
|
|
|
rustfmt:
|
2020-04-27 11:12:17 +00:00
|
|
|
extends: .img-stable
|
2019-06-18 10:03:55 +00:00
|
|
|
stage: "lint"
|
|
|
|
script:
|
|
|
|
- cargo fmt --version
|
|
|
|
- cargo fmt -- --color=always --check
|
2020-04-27 11:18:28 +00:00
|
|
|
|
2020-06-11 13:16:09 +00:00
|
|
|
check commits:
|
|
|
|
extends: .img-stable
|
|
|
|
stage: "lint"
|
|
|
|
script:
|
|
|
|
- ci-fairy check-commits --textwidth 0 --no-signed-off-by
|
|
|
|
|
2020-04-27 11:18:28 +00:00
|
|
|
outdated:
|
|
|
|
extends: .img-stable
|
|
|
|
allow_failure: true
|
|
|
|
stage: 'extras'
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
script:
|
|
|
|
- cargo outdated --root-deps-only --exit-code 1 -v
|
2020-04-27 12:21:22 +00:00
|
|
|
|
|
|
|
deny:
|
|
|
|
extends: .img-stable
|
|
|
|
stage: 'extras'
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
script:
|
|
|
|
- cargo deny check
|