2021-08-16 15:43:09 +00:00
|
|
|
.templates_sha: &templates_sha 567700e483aabed992d0a4fea84994a0472deff6
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
include:
|
|
|
|
- project: 'freedesktop/ci-templates'
|
|
|
|
ref: *templates_sha
|
|
|
|
file: '/templates/debian.yml'
|
|
|
|
|
2022-01-16 14:19:36 +00:00
|
|
|
- remote: "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/raw/main/ci/images_template.yml"
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
variables:
|
|
|
|
FDO_UPSTREAM_REPO: gstreamer/gst-plugins-rs
|
|
|
|
|
2021-09-09 02:58:39 +00:00
|
|
|
workflow:
|
|
|
|
rules:
|
|
|
|
- if: $CI_MERGE_REQUEST_IID
|
|
|
|
# don't create a pipeline if its a commit pipeline, on a branch and that branch has
|
|
|
|
# open merge requests (bc we will get a MR build instead)
|
|
|
|
- if: $CI_OPEN_MERGE_REQUESTS
|
|
|
|
when: never
|
|
|
|
- if: $CI_COMMIT_TAG
|
|
|
|
- if: $CI_COMMIT_BRANCH
|
|
|
|
|
2020-03-19 09:39:52 +00:00
|
|
|
stages:
|
2020-04-21 10:19:38 +00:00
|
|
|
- "prep"
|
2020-03-19 09:39:52 +00:00
|
|
|
- "lint"
|
|
|
|
- "test"
|
|
|
|
- "extras"
|
2018-10-15 12:08:29 +00:00
|
|
|
|
2021-08-16 15:43:09 +00:00
|
|
|
.debian:11:
|
2018-10-15 12:08:29 +00:00
|
|
|
variables:
|
2021-08-16 15:43:09 +00:00
|
|
|
FDO_DISTRIBUTION_VERSION: 'bullseye-slim'
|
2018-10-15 12:08:29 +00:00
|
|
|
before_script:
|
2020-04-21 10:19:38 +00:00
|
|
|
- source ./ci/env.sh
|
2020-04-21 09:52:09 +00:00
|
|
|
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
|
2020-08-21 02:29:35 +00:00
|
|
|
# If cargo exists assume we probably will want to update
|
|
|
|
# the lockfile
|
|
|
|
- |
|
|
|
|
if command -v cargo; then
|
|
|
|
cargo generate-lockfile
|
|
|
|
cargo update
|
|
|
|
fi
|
2020-04-21 10:19:38 +00:00
|
|
|
|
2021-08-16 15:43:09 +00:00
|
|
|
.debian:11-stable:
|
|
|
|
extends: .debian:11
|
2020-04-21 10:19:38 +00:00
|
|
|
variables:
|
2022-09-04 20:20:31 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: '$GST_RS_STABLE-${GST_RS_IMG_TAG}_2022-09-04.0'
|
2021-08-16 15:43:09 +00:00
|
|
|
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bullseye-slim:$GST_RS_STABLE-$GST_RS_IMG_TAG"
|
2020-04-21 10:19:38 +00:00
|
|
|
|
2021-08-16 15:43:09 +00:00
|
|
|
.debian:11-msrv:
|
|
|
|
extends: .debian:11
|
2020-04-21 10:19:38 +00:00
|
|
|
variables:
|
2022-09-04 20:20:31 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: '$GST_RS_MSRV-${GST_RS_IMG_TAG}_2022-09-04.0'
|
2021-08-16 15:43:09 +00:00
|
|
|
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bullseye-slim:$GST_RS_MSRV-$GST_RS_IMG_TAG"
|
2020-04-21 10:19:38 +00:00
|
|
|
|
2021-08-16 15:43:09 +00:00
|
|
|
.debian:11-nightly:
|
|
|
|
extends: .debian:11
|
2020-04-21 10:19:38 +00:00
|
|
|
variables:
|
2022-09-04 20:20:31 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: 'nightly-${GST_RS_IMG_TAG}_2022-09-04.0'
|
2021-08-16 15:43:09 +00:00
|
|
|
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bullseye-slim:nightly-$GST_RS_IMG_TAG"
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
.build-debian-container:
|
|
|
|
extends:
|
|
|
|
- .fdo.container-build@debian
|
|
|
|
stage: prep
|
|
|
|
variables:
|
2022-08-30 19:59:17 +00:00
|
|
|
FDO_DISTRIBUTION_PACKAGES: "libcsound64-dev llvm clang nasm libsodium-dev libwebp-dev python3-pip"
|
2021-01-04 09:23:22 +00:00
|
|
|
FDO_DISTRIBUTION_EXEC: >-
|
|
|
|
bash ci/install-dav1d.sh &&
|
|
|
|
apt clean &&
|
2022-08-30 19:59:17 +00:00
|
|
|
bash ./ci/install-rust-ext.sh &&
|
|
|
|
pip install tomli
|
2020-04-22 06:33:36 +00:00
|
|
|
rules:
|
|
|
|
- if: '$UPDATE_IMG == null'
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
build-stable:
|
|
|
|
extends:
|
|
|
|
- .build-debian-container
|
2021-08-16 15:43:09 +00:00
|
|
|
- .debian:11-stable
|
2020-04-21 10:19:38 +00:00
|
|
|
|
2020-11-01 10:13:36 +00:00
|
|
|
build-msrv:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends:
|
|
|
|
- .build-debian-container
|
2021-08-16 15:43:09 +00:00
|
|
|
- .debian:11-msrv
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
build-nightly:
|
|
|
|
extends:
|
|
|
|
- .build-debian-container
|
2021-08-16 15:43:09 +00:00
|
|
|
- .debian:11-nightly
|
2020-04-21 10:19:38 +00:00
|
|
|
|
2020-04-22 06:33:36 +00:00
|
|
|
# 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
|
|
|
|
|
2020-11-01 10:13:36 +00:00
|
|
|
update-msrv:
|
|
|
|
extends: build-msrv
|
2020-04-22 06:33:36 +00:00
|
|
|
rules:
|
2020-11-01 10:13:36 +00:00
|
|
|
- if: '$UPDATE_IMG == "msrv"'
|
2020-04-22 06:33:36 +00:00
|
|
|
variables:
|
|
|
|
FDO_FORCE_REBUILD: 1
|
|
|
|
|
|
|
|
update-nightly:
|
|
|
|
extends: build-nightly
|
|
|
|
rules:
|
|
|
|
- if: '$UPDATE_IMG == "nightly"'
|
|
|
|
variables:
|
|
|
|
FDO_FORCE_REBUILD: 1
|
|
|
|
|
2020-04-21 10:19:38 +00:00
|
|
|
.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
|
2021-08-16 15:43:09 +00:00
|
|
|
- .debian:11-stable
|
2020-04-21 10:19:38 +00:00
|
|
|
|
2020-11-01 10:13:36 +00:00
|
|
|
.img-msrv:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends:
|
|
|
|
- .dist-debian-container
|
2021-08-16 15:43:09 +00:00
|
|
|
- .debian:11-msrv
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
.img-nightly:
|
|
|
|
extends:
|
|
|
|
- .dist-debian-container
|
2021-08-16 15:43:09 +00:00
|
|
|
- .debian:11-nightly
|
2019-07-04 14:37:17 +00:00
|
|
|
|
|
|
|
.cargo test:
|
2020-03-19 09:39:52 +00:00
|
|
|
stage: "test"
|
2021-08-16 15:43:09 +00:00
|
|
|
variables:
|
|
|
|
# csound-sys only looks at /usr/lib and /usr/local top levels
|
|
|
|
CSOUND_LIB_DIR: '/usr/lib/x86_64-linux-gnu/'
|
2022-02-22 16:31:35 +00:00
|
|
|
RUST_BACKTRACE: 'full'
|
2018-10-15 12:08:29 +00:00
|
|
|
script:
|
2019-07-04 14:37:17 +00:00
|
|
|
- rustc --version
|
2020-08-21 02:29:35 +00:00
|
|
|
|
2022-02-21 20:12:32 +00:00
|
|
|
- cargo build --locked --color=always --workspace --all-targets
|
|
|
|
- G_DEBUG=fatal_warnings cargo test --locked --color=always --workspace --all-targets
|
|
|
|
- cargo build --locked --color=always --workspace --all-targets --all-features
|
|
|
|
- G_DEBUG=fatal_warnings cargo test --locked --color=always --workspace --all-targets --all-features
|
2018-10-15 12:08:29 +00:00
|
|
|
|
2020-11-01 10:13:36 +00:00
|
|
|
test msrv:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
2020-11-01 10:13:36 +00:00
|
|
|
- .img-msrv
|
2020-04-22 06:33:36 +00:00
|
|
|
rules:
|
2020-11-01 10:13:36 +00:00
|
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "msrv"'
|
2018-10-15 12:08:29 +00:00
|
|
|
|
2019-11-30 18:51:31 +00:00
|
|
|
test stable:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-stable
|
2020-04-22 06:33:36 +00:00
|
|
|
rules:
|
|
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "stable"'
|
2018-10-15 12:08:29 +00:00
|
|
|
|
|
|
|
test nightly:
|
|
|
|
allow_failure: true
|
2020-04-21 10:19:38 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
|
|
|
- .img-nightly
|
2020-04-22 06:33:36 +00:00
|
|
|
rules:
|
|
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "nightly"'
|
2018-10-15 12:08:29 +00:00
|
|
|
|
2021-05-26 09:07:27 +00:00
|
|
|
.meson:
|
2020-11-18 14:12:34 +00:00
|
|
|
extends: .img-stable
|
2021-05-26 09:07:27 +00:00
|
|
|
rules:
|
|
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "stable"'
|
|
|
|
variables:
|
2021-08-16 15:43:09 +00:00
|
|
|
# csound-sys only looks at /usr/lib and /usr/local top levels
|
|
|
|
CSOUND_LIB_DIR: '/usr/lib/x86_64-linux-gnu/'
|
2021-05-26 09:07:27 +00:00
|
|
|
|
|
|
|
meson shared:
|
|
|
|
extends: .meson
|
2022-08-29 16:33:57 +00:00
|
|
|
variables:
|
|
|
|
CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
|
2020-11-18 14:12:34 +00:00
|
|
|
script:
|
2020-11-18 14:53:01 +00:00
|
|
|
- meson build --default-library=shared --prefix=$(pwd)/install
|
|
|
|
- ninja -C build install
|
|
|
|
- ./ci/check-plugins-installed.py install
|
2022-08-29 16:33:57 +00:00
|
|
|
- ninja -C build docs/gst_plugins_cache.json
|
|
|
|
- ci/check-documentation-diff.py
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
expire_in: "7 days"
|
|
|
|
paths:
|
|
|
|
- plugins-cache-diffs/
|
2022-09-01 19:13:18 +00:00
|
|
|
- 'build/meson-logs/'
|
2020-11-18 14:12:34 +00:00
|
|
|
|
|
|
|
meson static:
|
2021-05-26 09:07:27 +00:00
|
|
|
extends: .meson
|
2020-11-18 14:12:34 +00:00
|
|
|
script:
|
2020-11-27 12:44:04 +00:00
|
|
|
- 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
|
2020-11-18 14:12:34 +00:00
|
|
|
- ninja -C build
|
2020-11-27 12:44:04 +00:00
|
|
|
- ./build/test-gst-static
|
2022-09-01 19:13:18 +00:00
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
expire_in: "7 days"
|
|
|
|
paths:
|
|
|
|
- 'build/meson-logs/'
|
2020-11-18 14:12:34 +00:00
|
|
|
|
2021-11-02 13:03:47 +00:00
|
|
|
# build gst-plugins-rs as a gst-build subproject
|
|
|
|
gst-build:
|
|
|
|
extends: .meson
|
|
|
|
rules:
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
2022-08-31 15:24:24 +00:00
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
when: 'manual'
|
|
|
|
allow_failure: true
|
2022-08-30 19:59:17 +00:00
|
|
|
variables:
|
|
|
|
MESON_ARGS: >
|
|
|
|
-Domx=disabled
|
|
|
|
-Dpython=disabled
|
|
|
|
-Dlibav=disabled
|
|
|
|
-Dlibnice=disabled
|
|
|
|
-Dugly=disabled
|
|
|
|
-Dbad=disabled
|
|
|
|
-Ddevtools=disabled
|
|
|
|
-Dges=disabled
|
|
|
|
-Drtsp_server=disabled
|
|
|
|
-Dvaapi=disabled
|
|
|
|
-Dsharp=disabled
|
|
|
|
-Dgst-examples=disabled
|
|
|
|
-Drs=enabled
|
|
|
|
-Dgst-plugins-rs:sodium=system
|
2021-11-02 13:03:47 +00:00
|
|
|
script:
|
|
|
|
- P=$(pwd)
|
|
|
|
- cd ..
|
2021-12-20 08:51:41 +00:00
|
|
|
- rm -rf gstreamer
|
2021-11-02 13:03:47 +00:00
|
|
|
- git clone --depth 1 https://gitlab.freedesktop.org/gstreamer/gstreamer.git --branch main
|
|
|
|
- cd gstreamer
|
|
|
|
- ln -s $P subprojects/gst-plugins-rs
|
2022-08-30 19:59:17 +00:00
|
|
|
- meson build $MESON_ARGS
|
2021-11-02 13:03:47 +00:00
|
|
|
- ninja -C build
|
2022-08-30 19:59:17 +00:00
|
|
|
# Check static Rust plugins can be linked into gst-full
|
|
|
|
- meson build-gst-full --default-library=static $MESON_ARGS
|
|
|
|
- ninja -C build-gst-full
|
|
|
|
- meson devenv -C build-gst-full gst-inspect-1.0 rsaudiofx
|
2022-09-01 19:13:18 +00:00
|
|
|
artifacts:
|
|
|
|
expire_in: '7 days'
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- 'build/meson-logs/'
|
2022-08-30 19:59:17 +00:00
|
|
|
- 'build-gst-full/meson-logs/'
|
2021-11-02 13:03:47 +00:00
|
|
|
|
2018-10-15 12:08:29 +00:00
|
|
|
rustfmt:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends: .img-stable
|
2020-03-19 09:39:52 +00:00
|
|
|
stage: "lint"
|
2020-04-30 16:19:48 +00:00
|
|
|
rules:
|
|
|
|
- when: 'always'
|
2018-10-15 12:08:29 +00:00
|
|
|
script:
|
|
|
|
- cargo fmt --version
|
|
|
|
- cargo fmt -- --color=always --check
|
2019-07-04 14:37:17 +00:00
|
|
|
|
2020-06-11 13:17:33 +00:00
|
|
|
check commits:
|
|
|
|
extends: .img-stable
|
|
|
|
stage: "lint"
|
|
|
|
rules:
|
|
|
|
- when: 'always'
|
|
|
|
script:
|
|
|
|
- ci-fairy check-commits --textwidth 0 --no-signed-off-by
|
|
|
|
|
2019-07-04 14:37:17 +00:00
|
|
|
clippy:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends: .img-stable
|
2020-03-19 09:39:52 +00:00
|
|
|
stage: 'extras'
|
2021-08-16 15:43:09 +00:00
|
|
|
variables:
|
|
|
|
# csound-sys only looks at /usr/lib and /usr/local top levels
|
|
|
|
CSOUND_LIB_DIR: '/usr/lib/x86_64-linux-gnu/'
|
2020-04-30 16:19:48 +00:00
|
|
|
rules:
|
|
|
|
- when: 'always'
|
2019-07-04 14:37:17 +00:00
|
|
|
script:
|
2021-09-08 12:33:31 +00:00
|
|
|
- cargo clippy --locked --color=always --all --all-features --all-targets -- -D warnings
|
2019-10-10 12:40:09 +00:00
|
|
|
|
2020-04-16 11:03:28 +00:00
|
|
|
deny:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends: .img-stable
|
2020-03-19 09:39:52 +00:00
|
|
|
stage: 'extras'
|
2020-04-30 16:11:25 +00:00
|
|
|
rules:
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
2019-10-10 12:40:09 +00:00
|
|
|
script:
|
2020-04-16 11:03:28 +00:00
|
|
|
- cargo deny check
|
2019-11-21 08:15:36 +00:00
|
|
|
|
|
|
|
outdated:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends: .img-stable
|
2020-04-14 08:49:14 +00:00
|
|
|
allow_failure: true
|
2019-11-21 08:15:36 +00:00
|
|
|
stage: 'extras'
|
2020-04-30 16:11:25 +00:00
|
|
|
rules:
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
2019-11-21 08:15:36 +00:00
|
|
|
script:
|
|
|
|
- cargo outdated --root-deps-only --exit-code 1 -v
|
2021-01-11 15:26:57 +00:00
|
|
|
|
|
|
|
coverage:
|
2021-04-22 08:25:00 +00:00
|
|
|
allow_failure: true
|
2021-01-11 15:26:57 +00:00
|
|
|
extends:
|
2022-04-07 16:48:57 +00:00
|
|
|
- .img-stable
|
2021-01-11 15:26:57 +00:00
|
|
|
stage: 'extras'
|
|
|
|
rules:
|
|
|
|
- when: 'always'
|
|
|
|
variables:
|
2022-03-30 13:16:25 +00:00
|
|
|
RUSTFLAGS: "-Cinstrument-coverage"
|
2021-01-11 15:26:57 +00:00
|
|
|
LLVM_PROFILE_FILE: "gst-plugins-rs-%p-%m.profraw"
|
2021-08-16 15:43:09 +00:00
|
|
|
# csound-sys only looks at /usr/lib and /usr/local top levels
|
|
|
|
CSOUND_LIB_DIR: '/usr/lib/x86_64-linux-gnu/'
|
2021-01-11 15:26:57 +00:00
|
|
|
script:
|
2022-05-12 15:32:04 +00:00
|
|
|
- cargo test --locked --color=always --all --all-features
|
2021-01-11 15:26:57 +00:00
|
|
|
# generate html report
|
2021-04-23 12:19:53 +00:00
|
|
|
- grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "*target*" --ignore "*/build.rs" -o ./coverage/
|
2021-01-11 15:26:57 +00:00
|
|
|
# generate cobertura report for gitlab integration
|
2021-04-23 12:19:53 +00:00
|
|
|
- grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "*target*" --ignore "*/build.rs" -o coverage.xml
|
|
|
|
# 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-11 15:26:57 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- 'coverage'
|
|
|
|
reports:
|
2022-06-07 06:04:40 +00:00
|
|
|
coverage_report:
|
|
|
|
coverage_format: cobertura
|
|
|
|
path: coverage.xml
|