mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 13:31:00 +00:00
595616fe2d
Need to define CARGO_HOME so it's installed to the same places as the rest of the Rust tools.
218 lines
5.1 KiB
YAML
218 lines
5.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
|
|
before_script:
|
|
- source ./ci/env.sh
|
|
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
|
|
# If cargo exists assume we probably will want to update
|
|
# the lockfile
|
|
- |
|
|
if command -v cargo; then
|
|
cargo generate-lockfile
|
|
cargo update
|
|
fi
|
|
|
|
.debian:10-stable:
|
|
extends: .debian:10
|
|
variables:
|
|
FDO_DISTRIBUTION_TAG: '$GST_RS_STABLE-${GST_RS_IMG_TAG}_2021-01-04.1'
|
|
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$GST_RS_STABLE-$GST_RS_IMG_TAG"
|
|
|
|
.debian:10-msrv:
|
|
extends: .debian:10
|
|
variables:
|
|
FDO_DISTRIBUTION_TAG: '$GST_RS_MSRV-${GST_RS_IMG_TAG}_2021-01-04.1'
|
|
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$GST_RS_MSRV-$GST_RS_IMG_TAG"
|
|
|
|
.debian:10-nightly:
|
|
extends: .debian:10
|
|
variables:
|
|
FDO_DISTRIBUTION_TAG: 'nightly-${GST_RS_IMG_TAG}_2021-01-04.1'
|
|
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:nightly-$GST_RS_IMG_TAG"
|
|
|
|
.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 &&
|
|
apt clean &&
|
|
bash ./ci/install-rust-ext.sh
|
|
rules:
|
|
- if: '$UPDATE_IMG == null'
|
|
|
|
build-stable:
|
|
extends:
|
|
- .build-debian-container
|
|
- .debian:10-stable
|
|
|
|
build-msrv:
|
|
extends:
|
|
- .build-debian-container
|
|
- .debian:10-msrv
|
|
|
|
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-msrv:
|
|
extends: build-msrv
|
|
rules:
|
|
- if: '$UPDATE_IMG == "msrv"'
|
|
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
|
|
variables:
|
|
SODIUM_USE_PKG_CONFIG: "true"
|
|
after_script:
|
|
- rm -rf target
|
|
|
|
.img-stable:
|
|
extends:
|
|
- .dist-debian-container
|
|
- .debian:10-stable
|
|
|
|
.img-msrv:
|
|
extends:
|
|
- .dist-debian-container
|
|
- .debian:10-msrv
|
|
|
|
.img-nightly:
|
|
extends:
|
|
- .dist-debian-container
|
|
- .debian:10-nightly
|
|
|
|
.cargo test:
|
|
stage: "test"
|
|
script:
|
|
- rustc --version
|
|
|
|
- cargo build --locked --color=always --all
|
|
- G_DEBUG=fatal_warnings cargo test --locked --color=always --all
|
|
- cargo build --locked --color=always --all --examples --all-features
|
|
- G_DEBUG=fatal_warnings cargo test --locked --color=always --all --examples --all-features
|
|
|
|
test msrv:
|
|
extends:
|
|
- '.cargo test'
|
|
- .img-msrv
|
|
rules:
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "msrv"'
|
|
|
|
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"'
|
|
|
|
meson shared:
|
|
extends: .img-stable
|
|
script:
|
|
- meson build --default-library=shared --prefix=$(pwd)/install
|
|
- ninja -C build install
|
|
- ./ci/check-plugins-installed.py install
|
|
rules:
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "stable"'
|
|
|
|
meson static:
|
|
extends: .img-stable
|
|
script:
|
|
- meson build --default-library=static --prefix=$(pwd)/install -Dsodium=built-in
|
|
- ninja -C build install
|
|
- ./ci/generate-static-test.py test-static-link-all
|
|
- cd test-static-link-all
|
|
- PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$(pwd)/../install/lib/x86_64-linux-gnu/pkgconfig meson build
|
|
- ninja -C build
|
|
- ./build/test-gst-static
|
|
rules:
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "stable"'
|
|
|
|
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 --locked --color=always --all --all-features --all-targets -- -A clippy::single_match -A clippy::manual_range_contains -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
|