mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 23:11:01 +00:00
61f76548bc
See https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#checking-commits In this setup it will check for any leftover fixup!/squash! commits and that messages don't have the 'Signed-off-by:' tag.
191 lines
4.1 KiB
YAML
191 lines
4.1 KiB
YAML
.templates_sha: &templates_sha 322bf2b8f29b6491caeb13861201e96969ddc169
|
|
|
|
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-28.1'
|
|
# 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"
|
|
FDO_DISTRIBUTION_EXEC: 'bash ci/install-dav1d.sh'
|
|
rules:
|
|
- if: '$UPDATE_IMG == null'
|
|
|
|
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
|
|
|
|
# Those jobs are triggered by gstreamer-rs when updating its images
|
|
update-stable:
|
|
extends: build-stable
|
|
rules:
|
|
- if: '$UPDATE_IMG == "stable"'
|
|
variables:
|
|
FDO_FORCE_REBUILD: 1
|
|
|
|
update-1-40:
|
|
extends: build-1-40
|
|
rules:
|
|
- if: '$UPDATE_IMG == "1-40"'
|
|
variables:
|
|
FDO_FORCE_REBUILD: 1
|
|
|
|
update-nightly:
|
|
extends: build-nightly
|
|
rules:
|
|
- if: '$UPDATE_IMG == "nightly"'
|
|
variables:
|
|
FDO_FORCE_REBUILD: 1
|
|
|
|
.dist-debian-container:
|
|
extends:
|
|
- .fdo.distribution-image@debian
|
|
cache:
|
|
key: "gst"
|
|
paths:
|
|
- "${CARGO_HOME}"
|
|
variables:
|
|
SODIUM_USE_PKG_CONFIG: "true"
|
|
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
|
|
rules:
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "1-40"'
|
|
|
|
test stable:
|
|
extends:
|
|
- '.cargo test'
|
|
- .img-stable
|
|
rules:
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "stable"'
|
|
|
|
test nightly:
|
|
allow_failure: true
|
|
extends:
|
|
- '.cargo test'
|
|
- .img-nightly
|
|
rules:
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "nightly"'
|
|
|
|
rustfmt:
|
|
extends: .img-stable
|
|
stage: "lint"
|
|
rules:
|
|
- when: 'always'
|
|
script:
|
|
- cargo fmt --version
|
|
- cargo fmt -- --color=always --check
|
|
|
|
check commits:
|
|
extends: .img-stable
|
|
stage: "lint"
|
|
rules:
|
|
- when: 'always'
|
|
script:
|
|
- ci-fairy check-commits --textwidth 0 --no-signed-off-by
|
|
|
|
clippy:
|
|
extends: .img-stable
|
|
stage: 'extras'
|
|
rules:
|
|
- when: 'always'
|
|
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
|
|
|
|
deny:
|
|
extends: .img-stable
|
|
stage: 'extras'
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
script:
|
|
- cargo deny check
|
|
|
|
outdated:
|
|
extends: .img-stable
|
|
allow_failure: true
|
|
stage: 'extras'
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
script:
|
|
- cargo outdated --root-deps-only --exit-code 1 -v
|