mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-05-18 16:28:25 +00:00
54586c6ecc
Build our own images based on the ones used by gstreamer-rs ci. Fix #109 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/321>
154 lines
3.4 KiB
YAML
154 lines
3.4 KiB
YAML
.templates_sha: &templates_sha 8becba49be7e5886311972356345532ed9dd84c1
|
|
|
|
include:
|
|
- project: 'freedesktop/ci-templates'
|
|
ref: *templates_sha
|
|
file: '/templates/debian.yml'
|
|
|
|
- remote: "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/raw/master/ci/images_template.yml"
|
|
|
|
variables:
|
|
FDO_UPSTREAM_REPO: gstreamer/gst-plugins-rs
|
|
|
|
stages:
|
|
- "prep"
|
|
- "lint"
|
|
- "test"
|
|
- "extras"
|
|
|
|
.debian:10:
|
|
variables:
|
|
FDO_DISTRIBUTION_VERSION: 10
|
|
FDO_DISTRIBUTION_TAG: '$RUST_VERSION-${GST_RS_IMG_TAG}_2020-04-27.0'
|
|
# 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"
|
|
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$RUST_VERSION-$GST_RS_IMG_TAG"
|
|
before_script:
|
|
- source ./ci/env.sh
|
|
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
|
|
|
|
.debian:10-stable:
|
|
extends: .debian:10
|
|
variables:
|
|
RUST_VERSION: "stable"
|
|
|
|
.debian:10-1-40:
|
|
extends: .debian:10
|
|
variables:
|
|
RUST_VERSION: "1.40.0"
|
|
|
|
.debian:10-nightly:
|
|
extends: .debian:10
|
|
variables:
|
|
RUST_VERSION: "nightly"
|
|
|
|
.build-debian-container:
|
|
extends:
|
|
- .fdo.container-build@debian
|
|
stage: prep
|
|
variables:
|
|
FDO_DISTRIBUTION_PACKAGES: "libcsound64-dev llvm clang nasm libsodium-dev"
|
|
|
|
build-stable:
|
|
extends:
|
|
- .build-debian-container
|
|
- .debian:10-stable
|
|
|
|
build-1-40:
|
|
extends:
|
|
- .build-debian-container
|
|
- .debian:10-1-40
|
|
|
|
build-nightly:
|
|
extends:
|
|
- .build-debian-container
|
|
- .debian:10-nightly
|
|
|
|
.dist-debian-container:
|
|
extends:
|
|
- .fdo.distribution-image@debian
|
|
cache:
|
|
key: "gst"
|
|
paths:
|
|
- "${CARGO_HOME}"
|
|
variables:
|
|
SODIUM_USE_PKG_CONFIG: "true"
|
|
# The build feature is required for the dav1d plugin for building and
|
|
# statically linking the C dav1d library into the dav1d-rs bindings.
|
|
# FIXME: The feature name should explicitly mention the dav1d plugin but
|
|
# Cargo currently doesn't support passthrough for that scenario.
|
|
RUSTFLAGS: "--cfg feature=\"build\""
|
|
after_script:
|
|
- rm -rf target
|
|
|
|
.img-stable:
|
|
extends:
|
|
- .dist-debian-container
|
|
- .debian:10-stable
|
|
|
|
.img-1-40:
|
|
extends:
|
|
- .dist-debian-container
|
|
- .debian:10-1-40
|
|
|
|
.img-nightly:
|
|
extends:
|
|
- .dist-debian-container
|
|
- .debian:10-nightly
|
|
|
|
.cargo test:
|
|
stage: "test"
|
|
script:
|
|
- rustc --version
|
|
- cargo build --color=always --all
|
|
- G_DEBUG=fatal_warnings cargo test --color=always --all
|
|
- cargo build --color=always --all --examples --all-features
|
|
- G_DEBUG=fatal_warnings cargo test --color=always --all --examples --all-features
|
|
|
|
test 1.40:
|
|
extends:
|
|
- '.cargo test'
|
|
- .img-1-40
|
|
|
|
test stable:
|
|
extends:
|
|
- '.cargo test'
|
|
- .img-stable
|
|
|
|
test nightly:
|
|
allow_failure: true
|
|
extends:
|
|
- '.cargo test'
|
|
- .img-nightly
|
|
|
|
rustfmt:
|
|
extends: .img-stable
|
|
stage: "lint"
|
|
script:
|
|
- cargo fmt --version
|
|
- cargo fmt -- --color=always --check
|
|
|
|
clippy:
|
|
extends: .img-stable
|
|
stage: 'extras'
|
|
script:
|
|
- cargo clippy --color=always --all --all-features --all-targets -- -A clippy::redundant_pattern_matching -A clippy::single_match -A clippy::cast_lossless -D warnings
|
|
|
|
audit:
|
|
extends: .img-stable
|
|
stage: 'extras'
|
|
only:
|
|
- schedules
|
|
script:
|
|
- cargo audit --deny-warnings
|
|
|
|
outdated:
|
|
extends: .img-stable
|
|
allow_failure: true
|
|
stage: 'extras'
|
|
only:
|
|
- schedules
|
|
script:
|
|
- cargo outdated --root-deps-only --exit-code 1 -v
|