2020-04-28 14:11:18 +00:00
|
|
|
.templates_sha: &templates_sha 322bf2b8f29b6491caeb13861201e96969ddc169
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
2020-04-21 10:19:38 +00:00
|
|
|
.debian:10:
|
2018-10-15 12:08:29 +00:00
|
|
|
variables:
|
2020-04-21 10:19:38 +00:00
|
|
|
FDO_DISTRIBUTION_VERSION: 10
|
2020-04-28 14:11:18 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: '$RUST_VERSION-${GST_RS_IMG_TAG}_2020-04-28.1'
|
2020-04-21 10:19:38 +00:00
|
|
|
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$RUST_VERSION-$GST_RS_IMG_TAG"
|
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
|
|
|
|
|
|
|
.debian:10-stable:
|
|
|
|
extends: .debian:10
|
|
|
|
variables:
|
2020-11-01 09:51:01 +00:00
|
|
|
RUST_VERSION: "1.46.0"
|
2020-04-21 10:19:38 +00:00
|
|
|
|
2020-09-09 06:36:03 +00:00
|
|
|
.debian:10-1-41:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends: .debian:10
|
|
|
|
variables:
|
2020-09-09 06:36:03 +00:00
|
|
|
RUST_VERSION: "1.41.0"
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
.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"
|
2020-04-28 12:09:10 +00:00
|
|
|
FDO_DISTRIBUTION_EXEC: 'bash ci/install-dav1d.sh'
|
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
|
|
|
|
- .debian:10-stable
|
|
|
|
|
2020-09-09 06:36:03 +00:00
|
|
|
build-1-41:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends:
|
|
|
|
- .build-debian-container
|
2020-09-09 06:36:03 +00:00
|
|
|
- .debian:10-1-41
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
build-nightly:
|
|
|
|
extends:
|
|
|
|
- .build-debian-container
|
|
|
|
- .debian:10-nightly
|
|
|
|
|
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-09-09 06:36:03 +00:00
|
|
|
update-1-41:
|
|
|
|
extends: build-1-41
|
2020-04-22 06:33:36 +00:00
|
|
|
rules:
|
2020-09-09 06:36:03 +00:00
|
|
|
- if: '$UPDATE_IMG == "1-41"'
|
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
|
|
|
|
- .debian:10-stable
|
|
|
|
|
2020-09-09 06:36:03 +00:00
|
|
|
.img-1-41:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends:
|
|
|
|
- .dist-debian-container
|
2020-09-09 06:36:03 +00:00
|
|
|
- .debian:10-1-41
|
2020-04-21 10:19:38 +00:00
|
|
|
|
|
|
|
.img-nightly:
|
|
|
|
extends:
|
|
|
|
- .dist-debian-container
|
|
|
|
- .debian:10-nightly
|
2019-07-04 14:37:17 +00:00
|
|
|
|
|
|
|
.cargo test:
|
2020-03-19 09:39:52 +00:00
|
|
|
stage: "test"
|
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
|
|
|
|
|
|
|
- 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
|
2018-10-15 12:08:29 +00:00
|
|
|
|
2020-09-09 06:36:03 +00:00
|
|
|
test 1.41:
|
2020-04-21 10:19:38 +00:00
|
|
|
extends:
|
|
|
|
- '.cargo test'
|
2020-09-09 06:36:03 +00:00
|
|
|
- .img-1-41
|
2020-04-22 06:33:36 +00:00
|
|
|
rules:
|
2020-09-09 06:36:03 +00:00
|
|
|
- if: '$UPDATE_IMG == null || $UPDATE_IMG == "1-41"'
|
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
|
|
|
|
|
|
|
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'
|
2020-04-30 16:19:48 +00:00
|
|
|
rules:
|
|
|
|
- when: 'always'
|
2019-07-04 14:37:17 +00:00
|
|
|
script:
|
2020-08-21 02:29:35 +00:00
|
|
|
- cargo clippy --locked --color=always --all --all-features --all-targets -- -A clippy::redundant_pattern_matching -A clippy::single_match -A clippy::cast_lossless -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
|