2020-04-14 12:10:42 +00:00
|
|
|
# We use https://gitlab.freedesktop.org/freedesktop/ci-templates
|
|
|
|
# to build the images used by the ci.
|
|
|
|
#
|
2020-04-21 13:24:36 +00:00
|
|
|
# Here is how to properly update thoses images:
|
2020-11-01 07:47:18 +00:00
|
|
|
# - new Rust stable version: update GST_RS_IMG_TAG and update Rust version
|
2020-04-21 13:24:36 +00:00
|
|
|
# - add dependencies: update FDO_DISTRIBUTION_PACKAGES and update GST_RS_IMG_TAG
|
|
|
|
# - update GStreamer version: update the tag in ci/install-gst.sh and update GST_RS_IMG_TAG
|
2020-04-14 12:10:42 +00:00
|
|
|
#
|
2020-04-21 13:24:36 +00:00
|
|
|
# GST_RS_IMG_TAG is defined in ci/images_template.yml and should be updated
|
|
|
|
# either by:
|
2020-04-14 12:10:42 +00:00
|
|
|
# - setting it to the current date and the version suffix to 0
|
|
|
|
# - incrementing the version suffix
|
|
|
|
#
|
|
|
|
# After each update commit your changes and push to your personnal repo.
|
|
|
|
# After review and ci approval merge the branch as usual.
|
|
|
|
#
|
|
|
|
# Updating the nightly image should be done by simply running a scheduled ci
|
|
|
|
# pipeline on the upstream repo with the $UPDATE_NIGHTLY variable defined.
|
|
|
|
|
2020-04-28 14:08:56 +00:00
|
|
|
.templates_sha: &templates_sha 322bf2b8f29b6491caeb13861201e96969ddc169
|
2020-04-14 12:10:42 +00:00
|
|
|
|
|
|
|
include:
|
|
|
|
- project: 'freedesktop/ci-templates'
|
|
|
|
ref: *templates_sha
|
|
|
|
file: '/templates/debian.yml'
|
|
|
|
|
2020-04-21 13:24:36 +00:00
|
|
|
- local: "ci/images_template.yml"
|
|
|
|
|
2020-04-14 12:10:42 +00:00
|
|
|
variables:
|
|
|
|
FDO_UPSTREAM_REPO: gstreamer/gstreamer-rs
|
2021-04-24 07:47:11 +00:00
|
|
|
RUST_DOCS_FLAGS: "--extern-html-root-url=glib=https://gtk-rs.org/gtk-rs/git/docs/ --extern-html-root-url=gio=https://gtk-rs.org/gtk-rs/git/docs/ --extern-html-root-url=muldiv=https://docs.rs/muldiv/1.0.0/muldiv/ --enable-index-page -Z unstable-options"
|
2021-03-30 12:05:45 +00:00
|
|
|
|
2020-04-14 12:10:42 +00:00
|
|
|
|
2018-10-08 06:46:47 +00:00
|
|
|
stages:
|
2020-04-28 12:39:02 +00:00
|
|
|
- "container-base"
|
|
|
|
- "container-final"
|
2018-10-08 09:03:42 +00:00
|
|
|
- "lint"
|
2018-11-04 14:32:17 +00:00
|
|
|
- "test"
|
2018-11-09 16:44:26 +00:00
|
|
|
- "extras"
|
2020-04-22 07:20:56 +00:00
|
|
|
- "deploy"
|
2018-10-08 06:46:47 +00:00
|
|
|
|
2020-08-21 02:49:20 +00:00
|
|
|
|
2020-04-14 12:10:42 +00:00
|
|
|
.debian:10:
|
2018-10-08 06:46:47 +00:00
|
|
|
variables:
|
2020-04-14 12:10:42 +00:00
|
|
|
FDO_DISTRIBUTION_VERSION: 10
|
2018-10-08 06:46:47 +00:00
|
|
|
before_script:
|
2020-08-25 16:22:50 +00:00
|
|
|
- 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
|
2020-10-31 07:43:32 +00:00
|
|
|
cargo generate-lockfile --color=always
|
|
|
|
cargo update --color=always
|
2020-08-25 16:22:50 +00:00
|
|
|
fi
|
2020-04-14 12:10:42 +00:00
|
|
|
|
2020-04-28 12:39:02 +00:00
|
|
|
.debian:10-base:
|
|
|
|
extends: .debian:10
|
|
|
|
variables:
|
|
|
|
FDO_DISTRIBUTION_TAG: 'base-$GST_RS_IMG_TAG'
|
|
|
|
|
2020-04-14 12:10:42 +00:00
|
|
|
.debian:10-stable:
|
|
|
|
extends: .debian:10
|
|
|
|
variables:
|
2020-11-01 07:47:18 +00:00
|
|
|
RUST_IMAGE_FULL: "1"
|
2020-11-03 18:52:31 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: '$GST_RS_STABLE-$GST_RS_IMG_TAG'
|
|
|
|
FDO_DISTRIBUTION_EXEC: 'bash ci/install-rust.sh $GST_RS_STABLE $RUST_IMAGE_FULL'
|
2018-10-08 08:47:44 +00:00
|
|
|
|
2020-11-01 10:08:23 +00:00
|
|
|
.debian:10-msrv:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends: .debian:10
|
|
|
|
variables:
|
2020-11-03 18:52:31 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: '$GST_RS_MSRV-$GST_RS_IMG_TAG'
|
|
|
|
FDO_DISTRIBUTION_EXEC: 'bash ci/install-rust.sh $GST_RS_MSRV $RUST_IMAGE_FULL'
|
2020-04-14 12:10:42 +00:00
|
|
|
|
|
|
|
.debian:10-nightly:
|
|
|
|
extends: .debian:10
|
|
|
|
variables:
|
2020-11-03 18:52:31 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: 'nightly-$GST_RS_IMG_TAG'
|
|
|
|
FDO_DISTRIBUTION_EXEC: 'bash ci/install-rust.sh nightly $RUST_IMAGE_FULL'
|
2018-10-08 06:46:47 +00:00
|
|
|
|
2020-04-28 12:39:02 +00:00
|
|
|
.build-base-image:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends:
|
|
|
|
- .fdo.container-build@debian
|
2020-04-28 12:39:02 +00:00
|
|
|
stage: container-base
|
2020-04-14 12:10:42 +00:00
|
|
|
variables:
|
2021-04-22 14:01:04 +00:00
|
|
|
FDO_DISTRIBUTION_PACKAGES: "build-essential curl python3-setuptools liborc-0.4-dev libglib2.0-dev libxml2-dev libgtk-3-dev libegl1-mesa libgles2-mesa libgl1-mesa-dri libgl1-mesa-glx libwayland-egl1-mesa xz-utils libssl-dev git wget ca-certificates ninja-build python3-pip flex bison libglib2.0-dev"
|
2020-06-11 12:28:23 +00:00
|
|
|
FDO_DISTRIBUTION_EXEC: 'bash ci/install-gst.sh && pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates'
|
2020-04-28 12:39:02 +00:00
|
|
|
|
|
|
|
.build-final-image:
|
|
|
|
extends:
|
|
|
|
- .fdo.container-build@debian
|
|
|
|
stage: container-final
|
|
|
|
variables:
|
|
|
|
FDO_BASE_IMAGE: '$CI_REGISTRY_IMAGE/debian/10:base-$GST_RS_IMG_TAG'
|
|
|
|
|
|
|
|
build-base:
|
|
|
|
extends:
|
|
|
|
- .build-base-image
|
|
|
|
- .debian:10-base
|
2020-04-14 12:10:42 +00:00
|
|
|
|
|
|
|
build-stable:
|
|
|
|
extends:
|
2020-04-28 12:39:02 +00:00
|
|
|
- .build-final-image
|
2020-04-14 12:10:42 +00:00
|
|
|
- .debian:10-stable
|
|
|
|
|
2020-11-01 10:08:23 +00:00
|
|
|
build-msrv:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends:
|
2020-04-28 12:39:02 +00:00
|
|
|
- .build-final-image
|
2020-11-01 10:08:23 +00:00
|
|
|
- .debian:10-msrv
|
2020-04-14 12:10:42 +00:00
|
|
|
|
|
|
|
build-nightly:
|
|
|
|
extends:
|
2020-04-28 12:39:02 +00:00
|
|
|
- .build-final-image
|
2020-04-14 12:10:42 +00:00
|
|
|
- .debian:10-nightly
|
|
|
|
|
|
|
|
update-nightly:
|
|
|
|
extends: build-nightly
|
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $UPDATE_NIGHTLY == "1"
|
|
|
|
variables:
|
|
|
|
FDO_FORCE_REBUILD: 1
|
2018-11-09 16:36:36 +00:00
|
|
|
|
2020-04-14 12:10:42 +00:00
|
|
|
.dist-debian-container:
|
|
|
|
extends:
|
|
|
|
- .fdo.distribution-image@debian
|
2020-04-20 13:19:22 +00:00
|
|
|
after_script:
|
|
|
|
- rm -rf target
|
2018-11-09 16:36:36 +00:00
|
|
|
|
2020-04-14 12:10:42 +00:00
|
|
|
.img-stable:
|
|
|
|
extends:
|
|
|
|
- .debian:10-stable
|
2020-08-21 02:49:20 +00:00
|
|
|
- .dist-debian-container
|
2020-04-14 12:10:42 +00:00
|
|
|
|
2020-11-01 10:08:23 +00:00
|
|
|
.img-msrv:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends:
|
2020-11-01 10:08:23 +00:00
|
|
|
- .debian:10-msrv
|
2020-08-21 02:49:20 +00:00
|
|
|
- .dist-debian-container
|
2020-04-14 12:10:42 +00:00
|
|
|
|
|
|
|
.img-nightly:
|
|
|
|
extends:
|
|
|
|
- .debian:10-nightly
|
2020-08-21 02:49:20 +00:00
|
|
|
- .dist-debian-container
|
2020-04-14 12:10:42 +00:00
|
|
|
|
2020-04-22 07:20:56 +00:00
|
|
|
# GST_PLUGINS_RS_TOKEN is a variable of type 'Var' defined in gstreamer-rs CI
|
|
|
|
# settings and containing a gst-plugins-rs pipeline trigger token
|
|
|
|
.plugins-update:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
# FDO_DISTRIBUTION_IMAGE still has indirections
|
|
|
|
- echo $FDO_DISTRIBUTION_IMAGE
|
|
|
|
- DISTRO_IMAGE=$(eval echo ${FDO_DISTRIBUTION_IMAGE})
|
|
|
|
- echo $DISTRO_IMAGE
|
|
|
|
# retrieve the infos from the registry
|
|
|
|
- JSON_IMAGE=$(skopeo inspect docker://$DISTRO_IMAGE)
|
|
|
|
- IMAGE_PIPELINE_ID=$(echo $JSON_IMAGE | jq -r '.Labels["fdo.pipeline_id"]')
|
|
|
|
- echo $IMAGE_PIPELINE_ID
|
|
|
|
- echo $CI_PIPELINE_ID
|
|
|
|
- |
|
|
|
|
if [[ x"$IMAGE_PIPELINE_ID" == x"$CI_PIPELINE_ID" ]]; then
|
|
|
|
echo "Image has been updated, notify gst-plugins-rs"
|
2020-04-27 12:01:50 +00:00
|
|
|
curl -X POST -F "token=$GST_PLUGINS_RS_TOKEN" -F "ref=master" -F "variables[UPDATE_IMG]=$UPDATE_IMG" https://gitlab.freedesktop.org/api/v4/projects/1400/trigger/pipeline
|
2020-04-22 07:20:56 +00:00
|
|
|
else
|
|
|
|
echo "Image has not been updated, ignore"
|
|
|
|
fi
|
|
|
|
rules:
|
|
|
|
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PROJECT_PATH == "gstreamer/gstreamer-rs"'
|
|
|
|
|
|
|
|
# Those jobs need to use another image as ours doesn't have 'skopeo'
|
|
|
|
# and it's not easily installable in Debian stable for now.
|
|
|
|
plugins-update-stable:
|
|
|
|
extends:
|
|
|
|
- .plugins-update
|
|
|
|
- .img-stable
|
|
|
|
image: registry.freedesktop.org/freedesktop/ci-templates/buildah:2020-03-04
|
|
|
|
variables:
|
|
|
|
UPDATE_IMG: "stable"
|
|
|
|
|
2020-11-01 10:08:23 +00:00
|
|
|
plugins-update-msrv:
|
2020-04-22 07:20:56 +00:00
|
|
|
extends:
|
|
|
|
- .plugins-update
|
2020-11-01 10:08:23 +00:00
|
|
|
- .img-msrv
|
2020-04-22 07:20:56 +00:00
|
|
|
image: registry.freedesktop.org/freedesktop/ci-templates/buildah:2020-03-04
|
|
|
|
variables:
|
2020-11-01 10:08:23 +00:00
|
|
|
UPDATE_IMG: "msrv"
|
2020-04-22 07:20:56 +00:00
|
|
|
|
|
|
|
plugins-update-nightly:
|
|
|
|
extends:
|
|
|
|
- .plugins-update
|
|
|
|
- .img-nightly
|
|
|
|
image: registry.freedesktop.org/freedesktop/ci-templates/buildah:2020-03-04
|
|
|
|
variables:
|
|
|
|
UPDATE_IMG: "nightly"
|
|
|
|
|
2021-01-08 14:36:07 +00:00
|
|
|
.cargo_test_var: &cargo_test
|
2018-10-08 06:46:47 +00:00
|
|
|
- rustc --version
|
2019-08-13 14:24:19 +00:00
|
|
|
# First build and test all the crates with their relevant features
|
|
|
|
# Keep features in sync with below
|
|
|
|
- |
|
2020-11-19 11:03:50 +00:00
|
|
|
get_features() {
|
|
|
|
crate=$1
|
|
|
|
if [ "$crate" = "gstreamer" ]; then
|
2020-11-26 23:14:02 +00:00
|
|
|
echo "--features=ser_de,v1_18"
|
2020-11-19 11:03:50 +00:00
|
|
|
else
|
2020-11-26 23:14:02 +00:00
|
|
|
echo "--features=v1_18"
|
2020-11-19 11:03:50 +00:00
|
|
|
fi
|
|
|
|
}
|
2020-11-26 23:14:02 +00:00
|
|
|
for crate in gstreamer* gstreamer-gl/{egl,wayland,x11}; do
|
2020-10-30 16:45:55 +00:00
|
|
|
if [ -e $crate/Cargo.toml ]; then
|
|
|
|
if [ -n "$ALL_FEATURES" ]; then
|
2020-11-26 23:14:02 +00:00
|
|
|
FEATURES="$(get_features $crate)"
|
2019-08-13 14:24:19 +00:00
|
|
|
else
|
2020-11-19 11:03:50 +00:00
|
|
|
FEATURES=""
|
2019-08-13 14:24:19 +00:00
|
|
|
fi
|
2020-11-19 11:03:50 +00:00
|
|
|
|
|
|
|
echo "Building and testing $crate with $FEATURES"
|
|
|
|
|
|
|
|
cargo build --locked --color=always --manifest-path $crate/Cargo.toml $FEATURES
|
|
|
|
G_DEBUG=fatal_warnings cargo test --color=always --manifest-path $crate/Cargo.toml $FEATURES
|
2019-08-13 14:24:19 +00:00
|
|
|
fi
|
|
|
|
done
|
2019-05-02 15:51:26 +00:00
|
|
|
|
|
|
|
- |
|
2021-04-23 07:59:30 +00:00
|
|
|
if [ -n "$EXAMPLES_TUTORIALS" ]; then
|
2020-08-21 02:49:20 +00:00
|
|
|
cargo build --locked --color=always --manifest-path examples/Cargo.toml --bins --examples --all-features
|
|
|
|
cargo build --locked --color=always --manifest-path tutorials/Cargo.toml --bins --examples --all-features
|
2019-05-02 15:51:26 +00:00
|
|
|
fi
|
2018-10-08 06:46:47 +00:00
|
|
|
|
2021-01-08 14:36:07 +00:00
|
|
|
.cargo test:
|
|
|
|
stage: "test"
|
|
|
|
script:
|
|
|
|
- *cargo_test
|
|
|
|
|
2020-11-01 10:08:23 +00:00
|
|
|
test msrv:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
2020-11-01 10:08:23 +00:00
|
|
|
- .img-msrv
|
2018-10-08 06:46:47 +00:00
|
|
|
|
|
|
|
test stable:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-stable
|
2019-08-13 14:24:19 +00:00
|
|
|
|
|
|
|
test stable all-features:
|
2019-07-04 14:28:15 +00:00
|
|
|
variables:
|
|
|
|
ALL_FEATURES: 'yes'
|
2021-04-23 07:59:30 +00:00
|
|
|
EXAMPLES_TUTORIALS: 'yes'
|
2020-04-14 12:10:42 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-stable
|
2018-10-08 06:46:47 +00:00
|
|
|
|
|
|
|
test nightly:
|
2019-08-13 14:24:19 +00:00
|
|
|
allow_failure: true
|
2020-04-14 12:10:42 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-nightly
|
2019-08-13 14:24:19 +00:00
|
|
|
|
|
|
|
test nightly all-features:
|
2018-10-08 06:46:47 +00:00
|
|
|
allow_failure: true
|
2019-05-02 15:51:26 +00:00
|
|
|
variables:
|
2019-07-04 14:28:15 +00:00
|
|
|
ALL_FEATURES: 'yes'
|
2021-04-23 07:59:30 +00:00
|
|
|
EXAMPLES_TUTORIALS: 'yes'
|
2020-04-14 12:10:42 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-nightly
|
2018-10-08 09:03:42 +00:00
|
|
|
|
2020-10-31 07:15:09 +00:00
|
|
|
.cargo test sys:
|
|
|
|
stage: "test"
|
|
|
|
script:
|
|
|
|
- rustc --version
|
2020-11-19 11:03:50 +00:00
|
|
|
- |
|
|
|
|
get_features() {
|
|
|
|
module=${1%%/sys}
|
2020-12-12 12:24:09 +00:00
|
|
|
echo "--features=v1_18"
|
2020-11-19 11:03:50 +00:00
|
|
|
}
|
2020-10-31 07:15:09 +00:00
|
|
|
# First build and test all the crates with their relevant features
|
|
|
|
# Keep features in sync with below
|
2020-11-26 23:14:02 +00:00
|
|
|
for crate in gstreamer*/sys gstreamer-gl/*/sys; do
|
2020-10-31 07:15:09 +00:00
|
|
|
if [ -e $crate/Cargo.toml ]; then
|
2020-11-19 11:03:50 +00:00
|
|
|
echo "Building $crate with $(get_features $crate)"
|
2020-11-26 23:14:02 +00:00
|
|
|
cargo build --locked --color=always --manifest-path $crate/Cargo.toml $(get_features $crate)
|
2020-10-31 07:15:09 +00:00
|
|
|
fi
|
|
|
|
done
|
2020-11-19 11:03:50 +00:00
|
|
|
# Run tests for crates we can currently run.
|
|
|
|
# Other tests are broken currently.
|
|
|
|
for crate in gstreamer/sys \
|
|
|
|
gstreamer-app/sys \
|
|
|
|
gstreamer-audio/sys \
|
|
|
|
gstreamer-base/sys \
|
|
|
|
gstreamer-check/sys \
|
|
|
|
gstreamer-controller/sys \
|
2020-11-26 23:14:02 +00:00
|
|
|
gstreamer-gl/sys \
|
|
|
|
gstreamer-gl/egl/sys \
|
|
|
|
gstreamer-gl/wayland/sys \
|
|
|
|
gstreamer-gl/x11/sys \
|
2020-11-19 11:03:50 +00:00
|
|
|
gstreamer-mpegts/sys \
|
|
|
|
gstreamer-net/sys \
|
|
|
|
gstreamer-pbutils/sys \
|
|
|
|
gstreamer-player/sys \
|
|
|
|
gstreamer-rtsp-server/sys \
|
|
|
|
gstreamer-rtsp/sys \
|
|
|
|
gstreamer-sdp/sys \
|
|
|
|
gstreamer-tag/sys \
|
|
|
|
gstreamer-video/sys \
|
|
|
|
gstreamer-webrtc/sys; do
|
|
|
|
echo "Testing $crate with $(get_features $crate)"
|
2020-11-26 23:14:02 +00:00
|
|
|
cargo test --locked --color=always --manifest-path $crate/Cargo.toml $(get_features $crate)
|
2020-11-19 11:03:50 +00:00
|
|
|
done
|
2020-10-31 07:15:09 +00:00
|
|
|
|
|
|
|
test stable sys:
|
|
|
|
extends:
|
|
|
|
- '.cargo test sys'
|
|
|
|
- .img-stable
|
|
|
|
|
2020-11-01 10:08:23 +00:00
|
|
|
test msrv sys:
|
2020-10-31 07:15:09 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test sys'
|
2020-11-01 10:08:23 +00:00
|
|
|
- .img-msrv
|
2020-10-31 07:15:09 +00:00
|
|
|
|
|
|
|
test nightly sys:
|
|
|
|
extends:
|
|
|
|
- '.cargo test sys'
|
|
|
|
- .img-nightly
|
|
|
|
|
2018-10-08 09:03:42 +00:00
|
|
|
rustfmt:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends: .img-stable
|
2018-10-08 09:03:42 +00:00
|
|
|
stage: "lint"
|
|
|
|
script:
|
|
|
|
- cargo fmt --version
|
|
|
|
- cargo fmt -- --color=always --check
|
2018-11-09 16:44:26 +00:00
|
|
|
|
2020-06-11 12:28:23 +00:00
|
|
|
check commits:
|
|
|
|
extends: .img-stable
|
|
|
|
stage: "lint"
|
|
|
|
script:
|
|
|
|
- ci-fairy check-commits --textwidth 0 --no-signed-off-by
|
|
|
|
|
2018-11-09 16:44:26 +00:00
|
|
|
clippy:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends: .img-stable
|
2018-11-09 16:44:26 +00:00
|
|
|
stage: 'extras'
|
|
|
|
script:
|
|
|
|
- cargo clippy --version
|
2019-08-13 14:24:19 +00:00
|
|
|
# Keep features in sync with above
|
|
|
|
- |
|
2020-11-19 11:03:50 +00:00
|
|
|
get_features() {
|
|
|
|
crate=$1
|
|
|
|
if [ "$crate" = "gstreamer" ]; then
|
2020-11-26 23:14:02 +00:00
|
|
|
echo "--features=ser_de,v1_18"
|
2020-11-19 11:03:50 +00:00
|
|
|
else
|
2020-11-26 23:14:02 +00:00
|
|
|
echo "--features=v1_18"
|
2020-11-19 11:03:50 +00:00
|
|
|
fi
|
|
|
|
}
|
2020-11-26 23:14:02 +00:00
|
|
|
for crate in gstreamer* gstreamer-gl/{egl,wayland,x11}; do
|
2020-10-30 16:45:55 +00:00
|
|
|
if [ -e $crate/Cargo.toml ]; then
|
2020-11-19 11:03:50 +00:00
|
|
|
FEATURES=$(get_features $crate)
|
|
|
|
|
|
|
|
echo "Running clippy on $crate with $FEATURES"
|
2019-08-13 14:24:19 +00:00
|
|
|
|
2021-03-25 15:43:54 +00:00
|
|
|
cargo clippy --locked --color=always --manifest-path $crate/Cargo.toml $FEATURES --all-targets -- -A clippy::missing_safety_doc -A clippy::manual_range_contains -A clippy::upper_case_acronyms -D warnings
|
2020-10-30 16:45:55 +00:00
|
|
|
fi
|
2019-08-13 14:24:19 +00:00
|
|
|
done
|
2019-09-07 10:08:09 +00:00
|
|
|
# And also run over all the examples/tutorials
|
|
|
|
- |
|
2021-03-25 15:43:54 +00:00
|
|
|
cargo clippy --locked --color=always --manifest-path examples/Cargo.toml --all-targets --all-features -- -A clippy::missing_safety_doc -A clippy::manual_range_contains -A clippy::upper_case_acronyms -D warnings
|
|
|
|
cargo clippy --locked --color=always --manifest-path tutorials/Cargo.toml --all-targets --all-features -- -A clippy::missing_safety_doc -A clippy::manual_range_contains -A clippy::upper_case_acronyms -D warnings
|
2019-10-08 10:36:30 +00:00
|
|
|
|
2020-02-02 09:19:12 +00:00
|
|
|
deny:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends: .img-stable
|
2019-10-08 10:36:30 +00:00
|
|
|
stage: 'extras'
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
script:
|
2020-10-31 07:43:32 +00:00
|
|
|
- cargo deny --color=always check
|
2020-04-10 10:27:38 +00:00
|
|
|
|
2020-02-25 13:12:22 +00:00
|
|
|
gir-checks:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends: .img-stable
|
2020-02-25 13:12:22 +00:00
|
|
|
stage: 'extras'
|
|
|
|
script:
|
2020-04-15 13:03:35 +00:00
|
|
|
- git clone --depth 1 https://github.com/gtk-rs/checker
|
2020-02-25 13:12:22 +00:00
|
|
|
- cd checker && echo '[workspace]' >> Cargo.toml
|
2020-10-31 07:43:32 +00:00
|
|
|
- cargo build --locked --color=always --release
|
2020-02-25 13:12:22 +00:00
|
|
|
- |
|
2020-10-31 07:43:32 +00:00
|
|
|
cargo run --color=always --release -- \
|
2020-11-27 07:59:04 +00:00
|
|
|
../gstreamer/ \
|
|
|
|
../gstreamer-app \
|
|
|
|
../gstreamer-audio/ \
|
|
|
|
../gstreamer-base \
|
|
|
|
../gstreamer-check/ \
|
|
|
|
../gstreamer-controller/ \
|
|
|
|
../gstreamer-editing-services/ \
|
|
|
|
../gstreamer-gl/ \
|
|
|
|
../gstreamer-gl/egl \
|
|
|
|
../gstreamer-gl/wayland \
|
|
|
|
../gstreamer-gl/x11 \
|
|
|
|
../gstreamer-net/ \
|
|
|
|
../gstreamer-pbutils/ \
|
|
|
|
../gstreamer-player/ \
|
|
|
|
../gstreamer-rtp/ \
|
|
|
|
../gstreamer-rtsp-server/ \
|
|
|
|
../gstreamer-rtsp/ \
|
|
|
|
../gstreamer-sdp/ \
|
|
|
|
../gstreamer-video/ \
|
|
|
|
../gstreamer-webrtc/
|
2020-03-22 14:18:47 +00:00
|
|
|
- cd ..
|
|
|
|
- |
|
2020-11-26 23:14:02 +00:00
|
|
|
for crate in gstreamer* gstreamer-gl/{egl,wayland,x11}; do
|
2020-03-22 14:18:47 +00:00
|
|
|
echo '-->' $crate
|
2020-11-26 23:14:02 +00:00
|
|
|
./checker/check_init_asserts $crate
|
2020-03-22 14:18:47 +00:00
|
|
|
done
|
2020-02-25 13:12:22 +00:00
|
|
|
|
2020-04-10 10:27:38 +00:00
|
|
|
outdated:
|
2020-04-14 12:10:42 +00:00
|
|
|
extends: .img-stable
|
2020-04-10 10:27:38 +00:00
|
|
|
stage: 'extras'
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
script:
|
2020-10-31 07:43:32 +00:00
|
|
|
- cargo outdated --color=always --root-deps-only --exit-code 1 -v
|
2018-11-09 16:13:07 +00:00
|
|
|
|
2021-01-08 14:36:07 +00:00
|
|
|
coverage:
|
2021-04-22 08:22:49 +00:00
|
|
|
allow_failure: true
|
2021-01-08 14:36:07 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-nightly
|
|
|
|
stage: 'extras'
|
|
|
|
variables:
|
|
|
|
ALL_FEATURES: 'yes'
|
|
|
|
RUSTFLAGS: "-Zinstrument-coverage"
|
|
|
|
LLVM_PROFILE_FILE: "gstreamer-rs-%p-%m.profraw"
|
|
|
|
script:
|
|
|
|
- *cargo_test
|
|
|
|
# generate html report
|
2021-04-23 12:00:58 +00:00
|
|
|
- grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "*target*" --ignore "*/sys/*" --ignore "examples/*" --ignore "tutorials/*" --ignore "*/build.rs" -o ./coverage/
|
2021-01-08 14:36:07 +00:00
|
|
|
# generate cobertura report for gitlab integration
|
2021-04-23 12:00:58 +00:00
|
|
|
- grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "*target*" --ignore "*/sys/*" --ignore "examples/*" --ignore "tutorials/*" --ignore "*/build.rs" -o coverage.xml
|
2021-04-22 14:01:04 +00:00
|
|
|
# output coverage summary for gitlab parsing.
|
|
|
|
# TODO: use grcov once https://github.com/mozilla/grcov/issues/556 is fixed
|
|
|
|
- grep % coverage/index.html | head -1 ; true
|
2021-01-08 14:36:07 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- 'coverage'
|
|
|
|
reports:
|
|
|
|
cobertura: coverage.xml
|
|
|
|
|
2021-03-23 21:51:22 +00:00
|
|
|
docs:
|
2021-04-20 08:59:52 +00:00
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
2021-03-23 21:51:22 +00:00
|
|
|
extends: .img-nightly
|
|
|
|
stage: 'extras'
|
|
|
|
script:
|
2021-04-20 08:59:52 +00:00
|
|
|
- cargo install rustdoc-stripper
|
|
|
|
- PATH=~/.cargo/bin/:$PATH ./generator.py --embed-docs --no-fmt
|
2021-03-23 21:51:22 +00:00
|
|
|
- |
|
2021-04-20 08:59:52 +00:00
|
|
|
crate_names=$(for manifest in gstreamer*/Cargo.toml; do echo -n " -p ${manifest%%/Cargo.toml}"; done)
|
|
|
|
crate_names="$crate_names -p gstreamer-gl-egl -p gstreamer-gl-wayland -p gstreamer-gl-x11"
|
|
|
|
RUSTDOCFLAGS="$RUST_DOCS_FLAGS" cargo +nightly doc $crate_names --color=always --features=dox --no-deps
|
|
|
|
- mv target/doc public/
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- 'public'
|
2021-03-23 21:51:22 +00:00
|
|
|
|
2021-04-20 08:59:52 +00:00
|
|
|
# https://docs.gitlab.com/ee/user/project/pages/#how-it-works
|
|
|
|
# GitLab automatically deploys the `public/` folder from an
|
|
|
|
# artifact generated by the job named `pages`. This step
|
|
|
|
# re-uses the docs from the build-test `docs` step above.
|
2018-11-09 16:13:07 +00:00
|
|
|
pages:
|
|
|
|
stage: 'deploy'
|
|
|
|
when: 'manual'
|
2021-04-20 08:59:52 +00:00
|
|
|
dependencies:
|
|
|
|
- docs
|
|
|
|
script:
|
|
|
|
- ls public/
|
2018-11-09 16:13:07 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- 'public'
|