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.
#
2021-05-05 08:17:49 +00:00
# Here is how to properly update those 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
#
2021-05-05 08:17:49 +00:00
# After each update commit your changes and push to your personal repo.
2020-04-14 12:10:42 +00:00
# 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.
2024-08-13 12:33:29 +00:00
.templates_sha : &templates_sha 6a40df92957c8ce9ee741aaccc5daaaf70545b1e
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"
2021-09-09 03:13:56 +00:00
workflow :
rules :
2022-09-16 13:18:54 +00:00
- if : $CI_PIPELINE_SOURCE == "schedule"
2021-09-09 03:13:56 +00:00
- 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
2022-05-18 17:03:00 +00:00
default :
interruptible : true
2020-04-14 12:10:42 +00:00
variables :
FDO_UPSTREAM_REPO : gstreamer/gstreamer-rs
2020-10-27 22:03:02 +00:00
# DIY CI-templates like setup for windows
WINDOWS_RUST_MINIMUM_IMAGE : "$CI_REGISTRY_IMAGE/windows:$GST_RS_IMG_TAG-main-$GST_RS_MSRV"
2022-09-20 14:47:43 +00:00
WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE : "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows:$GST_RS_IMG_TAG-main-$GST_RS_MSRV"
2020-10-27 22:03:02 +00:00
WINDOWS_RUST_STABLE_IMAGE : "$CI_REGISTRY_IMAGE/windows:$GST_RS_IMG_TAG-main-$GST_RS_STABLE"
2022-09-20 14:47:43 +00:00
WINDOWS_RUST_STABLE_UPSTREAM_IMAGE : "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows:$GST_RS_IMG_TAG-main-$GST_RS_STABLE"
2020-10-27 22:03:02 +00:00
2023-11-16 15:17:39 +00:00
RUST_DOCS_FLAGS : "--cfg docsrs --extern-html-root-url=muldiv=https://docs.rs/muldiv/1.0.0/muldiv/ -Z unstable-options --generate-link-to-definition"
2021-07-05 10:02:02 +00:00
NAMESPACE : gstreamer
2021-05-25 10:59:37 +00:00
# format is <branch>=<name>
# the name is used in the URL
# latest release must be at the top
2022-01-16 14:15:00 +00:00
# (only relevant on main branch)
2021-05-25 10:59:37 +00:00
RELEASES :
2024-07-11 17:01:33 +00:00
0.23 =0.23
2020-04-14 12:10:42 +00:00
2018-10-08 06:46:47 +00:00
stages :
2022-11-23 16:08:25 +00:00
- "trigger"
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
2022-11-23 16:08:25 +00:00
# This is an empty job that is used to trigger the pipeline.
trigger :
image : alpine:latest
stage : 'trigger'
variables :
GIT_STRATEGY : none
2024-04-09 06:09:37 +00:00
tags : [ 'placeholder-job' ]
2022-11-23 16:08:25 +00:00
script :
- echo "Trigger job done, now running the pipeline."
rules :
- if : $CI_PIPELINE_SOURCE == "schedule"
# If the MR is assigned to the Merge bot, trigger the pipeline automatically
- if : '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
# Require explicit action to trigger tests post merge
- if : '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
when : 'manual'
# When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
# to avoid wasting CI resources
- if : '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
when : 'manual'
allow_failure : false
2020-08-21 02:49:20 +00:00
2023-03-09 18:22:30 +00:00
.debian:12 :
2022-11-23 16:08:25 +00:00
needs : [ ]
2018-10-08 06:46:47 +00:00
variables :
2023-03-09 18:22:30 +00:00
FDO_DISTRIBUTION_VERSION : 'bookworm-slim'
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
2020-04-14 12:10:42 +00:00
2023-03-09 18:22:30 +00:00
.debian:12-base :
extends : .debian:12
2020-04-28 12:39:02 +00:00
variables :
FDO_DISTRIBUTION_TAG : 'base-$GST_RS_IMG_TAG'
2023-03-09 18:22:30 +00:00
.debian:12-stable :
extends : .debian:12
2020-04-14 12:10:42 +00:00
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
2023-03-09 18:22:30 +00:00
.debian:12-msrv :
extends : .debian:12
2020-04-14 12:10:42 +00:00
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
2023-03-09 18:22:30 +00:00
.debian:12-nightly :
extends : .debian:12
2020-04-14 12:10:42 +00:00
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 :
2022-12-16 07:54:16 +00:00
FDO_DISTRIBUTION_PACKAGES : >-
2023-07-19 06:33:33 +00:00
build-essential curl python3-setuptools libglib2.0-dev libxml2-dev
libdrm-dev libegl1-mesa-dev libgl1-mesa-dev libgbm-dev libgles2-mesa-dev
libgl1-mesa-dri libegl-dev libgl1-mesa-glx libwayland-egl1-mesa xz-utils
libssl-dev git wget ca-certificates ninja-build python3-pip flex bison
libglib2.0-dev libx11-dev libx11-xcb-dev libsoup2.4-dev libvorbis-dev
libogg-dev libtheora-dev libmatroska-dev libvpx-dev libopus-dev
libgraphene-1.0-dev libjpeg-dev libwayland-dev wayland-protocols
python3-gi libavcodec-dev libavformat-dev libavutil-dev libavfilter-dev
libswscale-dev yasm libx264-dev libfontconfig-dev libfreetype-dev
libxkbcommon-dev libxi-dev libxcb-render0-dev libxcb-shm0-dev
libxcb1-dev libxext-dev libxrender-dev libxrandr-dev libxcursor-dev
libxdamage-dev libxfixes-dev libxinerama-dev libgudev-1.0-dev
libpango1.0-dev libcairo2-dev libjson-glib-dev libgdk-pixbuf-2.0-dev
libtiff-dev libpng-dev libjpeg-dev libepoxy-dev libsass-dev sassc
libcsound64-dev llvm clang nasm libsodium-dev libwebp-dev
2024-06-28 18:46:50 +00:00
libflac-dev libmysofa-dev
2022-01-11 16:03:22 +00:00
FDO_DISTRIBUTION_EXEC : >-
bash ci/install-gst.sh &&
2023-07-19 06:33:33 +00:00
bash ci/install-dav1d.sh &&
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates &&
pip3 install --break-system-packages tomli
2020-04-28 12:39:02 +00:00
.build-final-image :
extends :
- .fdo.container-build@debian
stage : container-final
variables :
2023-03-09 18:22:30 +00:00
FDO_BASE_IMAGE : '$CI_REGISTRY_IMAGE/debian/bookworm-slim:base-$GST_RS_IMG_TAG'
2020-04-28 12:39:02 +00:00
build-base :
extends :
- .build-base-image
2023-03-09 18:22:30 +00:00
- .debian:12-base
2020-04-14 12:10:42 +00:00
build-stable :
2022-12-09 14:36:41 +00:00
needs : [ "build-base" ]
2020-04-14 12:10:42 +00:00
extends :
2020-04-28 12:39:02 +00:00
- .build-final-image
2023-03-09 18:22:30 +00:00
- .debian:12-stable
2020-04-14 12:10:42 +00:00
2020-11-01 10:08:23 +00:00
build-msrv :
2022-12-09 14:36:41 +00:00
needs : [ "build-base" ]
2020-04-14 12:10:42 +00:00
extends :
2020-04-28 12:39:02 +00:00
- .build-final-image
2023-03-09 18:22:30 +00:00
- .debian:12-msrv
2020-04-14 12:10:42 +00:00
build-nightly :
2022-12-09 14:36:41 +00:00
needs : [ "build-base" ]
2020-04-14 12:10:42 +00:00
extends :
2020-04-28 12:39:02 +00:00
- .build-final-image
2023-03-09 18:22:30 +00:00
- .debian:12-nightly
2020-04-14 12:10:42 +00:00
update-nightly :
extends : build-nightly
2022-05-11 10:57:56 +00:00
rules :
- if : $UPDATE_NIGHTLY == "1"
2020-04-14 12:10:42 +00:00
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 :
2023-03-09 18:22:30 +00:00
- .debian:12-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 :
2023-03-09 18:22:30 +00:00
- .debian:12-msrv
2020-08-21 02:49:20 +00:00
- .dist-debian-container
2020-04-14 12:10:42 +00:00
.img-nightly :
extends :
2023-03-09 18:22:30 +00:00
- .debian:12-nightly
2020-08-21 02:49:20 +00:00
- .dist-debian-container
2020-04-14 12:10:42 +00:00
2021-01-08 14:36:07 +00:00
.cargo_test_var : &cargo_test
2022-12-23 19:11:37 +00:00
- ./ci/run-cargo-test.sh
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
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-msrv'
artifacts : false
2018-10-08 06:46:47 +00:00
test stable :
2020-04-14 12:10:42 +00:00
extends :
- '.cargo test'
- .img-stable
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-stable'
artifacts : false
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
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-stable'
artifacts : false
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
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-nightly'
artifacts : false
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
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-nightly'
artifacts : false
2018-10-08 09:03:42 +00:00
2020-10-31 07:15:09 +00:00
.cargo test sys :
stage : "test"
script :
2022-12-23 19:11:37 +00:00
- ./ci/run-sys-cargo-test.sh
2020-10-31 07:15:09 +00:00
test stable sys :
extends :
- '.cargo test sys'
- .img-stable
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-stable'
artifacts : false
2020-10-31 07:15:09 +00:00
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
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-msrv'
artifacts : false
2020-10-31 07:15:09 +00:00
test nightly sys :
extends :
- '.cargo test sys'
- .img-nightly
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-nightly'
artifacts : false
2020-10-31 07:15:09 +00:00
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"
2024-04-09 06:09:37 +00:00
tags : [ 'placeholder-job' ]
2018-10-08 09:03:42 +00:00
script :
- cargo fmt --version
- cargo fmt -- --color=always --check
2022-05-18 17:03:00 +00:00
needs :
- job : 'build-stable'
artifacts : false
2018-11-09 16:44:26 +00:00
2020-06-11 12:28:23 +00:00
check commits :
extends : .img-stable
stage : "lint"
2024-04-09 06:09:37 +00:00
tags : [ 'placeholder-job' ]
2020-06-11 12:28:23 +00:00
script :
- ci-fairy check-commits --textwidth 0 --no-signed-off-by
2022-05-18 17:03:00 +00:00
needs :
- job : 'build-stable'
artifacts : false
2020-06-11 12:28:23 +00:00
2023-04-07 12:07:12 +00:00
typos :
extends : .img-stable
stage : "lint"
2024-04-09 06:09:37 +00:00
tags : [ 'placeholder-job' ]
2023-04-07 12:07:12 +00:00
script :
- typos
needs :
- job : 'build-stable'
artifacts : false
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'
2021-04-25 16:44:26 +00:00
variables :
2022-11-01 09:14:31 +00:00
CLIPPY_LINTS : -D warnings -W unknown-lints
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-stable'
artifacts : false
2018-11-09 16:44:26 +00:00
script :
2022-12-23 19:11:37 +00:00
- ./ci/run-clippy.sh
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'
2022-05-18 17:03:00 +00:00
needs :
- job : 'build-stable'
artifacts : false
2022-05-11 10:57:56 +00:00
rules :
- if : $CI_PIPELINE_SOURCE == "schedule"
2019-10-08 10:36:30 +00:00
script :
2023-11-10 06:56:32 +00:00
- cargo update --color=always
2023-09-07 12:20:43 +00:00
- cargo deny --color=always --workspace --all-features check all
2020-04-10 10:27:38 +00:00
2020-02-25 13:12:22 +00:00
gir-checks :
2021-05-28 14:45:47 +00:00
variables :
GIT_SUBMODULE_STRATEGY : recursive
2020-04-14 12:10:42 +00:00
extends : .img-stable
2020-02-25 13:12:22 +00:00
stage : 'extras'
2024-04-09 06:09:37 +00:00
tags : [ 'placeholder-job' ]
2022-05-18 17:03:00 +00:00
needs :
- job : 'build-stable'
artifacts : false
2020-02-25 13:12:22 +00:00
script :
2022-09-04 19:46:57 +00:00
- git submodule update --checkout
2022-03-11 13:03:03 +00:00
- python3 ci/gir-checks.py
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'
2022-05-18 17:03:00 +00:00
needs :
- job : 'build-stable'
artifacts : false
2022-05-11 10:57:56 +00:00
rules :
- if : $CI_PIPELINE_SOURCE == "schedule"
2020-04-10 10:27:38 +00:00
script :
2023-11-10 06:56:32 +00:00
- cargo update --color=always
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'
2022-04-07 15:51:20 +00:00
- .img-stable
2021-01-08 14:36:07 +00:00
stage : 'extras'
2022-05-18 17:03:00 +00:00
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2022-05-18 17:03:00 +00:00
- job : 'build-stable'
artifacts : false
2021-01-08 14:36:07 +00:00
variables :
ALL_FEATURES : 'yes'
2022-03-30 13:19:58 +00:00
RUSTFLAGS : "-Cinstrument-coverage"
2021-01-08 14:36:07 +00:00
LLVM_PROFILE_FILE : "gstreamer-rs-%p-%m.profraw"
script :
- *cargo_test
2024-08-12 16:34:00 +00:00
# generate html and cobertura report for gitlab integration
- mkdir -p coverage
- grcov . --binary-path ./target/debug/ -s . -t html,cobertura --branch --ignore-not-existing --ignore "*target*" --ignore "*/sys/*" --ignore "examples/*" --ignore "tutorials/*" --ignore "*/build.rs" -o ./coverage/
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
2024-08-12 16:34:00 +00:00
- grep % coverage/html/index.html | head -1 ; true
2021-01-08 14:36:07 +00:00
artifacts :
paths :
- 'coverage'
reports :
2022-06-07 06:04:40 +00:00
coverage_report :
coverage_format : cobertura
2024-08-12 16:34:00 +00:00
path : "coverage/cobertura.xml"
2021-01-08 14:36:07 +00:00
2021-05-04 20:48:52 +00:00
doc-stripping :
variables :
GIT_SUBMODULE_STRATEGY : recursive
extends : .img-nightly
stage : 'extras'
2022-05-18 17:03:00 +00:00
needs :
- job : 'build-nightly'
artifacts : false
2021-05-04 20:48:52 +00:00
script :
2022-09-04 07:39:18 +00:00
- git submodule update --checkout
2022-09-04 07:39:48 +00:00
- PATH=~/.cargo/bin/:$PATH ./generator.py --gir-files-directories gir-files gst-gir-files --embed-docs
- PATH=~/.cargo/bin/:$PATH ./generator.py --gir-files-directories gir-files gst-gir-files --strip-docs
2021-05-04 20:48:52 +00:00
- git diff --quiet || (echo 'Files changed after running `rustdoc-stripper -s`, make sure all documentation is protected with `// rustdoc-stripper-ignore-next`!'; git diff; false)
2022-09-04 07:42:29 +00:00
regen-check :
variables :
GIT_SUBMODULE_STRATEGY : recursive
extends : .img-nightly
stage : 'extras'
needs :
- job : 'build-nightly'
artifacts : false
script :
- git submodule update --checkout
- PATH=~/.cargo/bin/:$PATH ./generator.py --gir-files-directories gir-files gst-gir-files --yes
- git diff --quiet || (echo 'Files changed after running `generator.py`, make sure all submodules and generated files are in the correct version!'; git diff; false)
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'
2022-05-18 17:03:00 +00:00
needs :
- job : 'build-nightly'
artifacts : false
2021-03-23 21:51:22 +00:00
script :
2022-09-04 07:39:18 +00:00
- git submodule update --checkout
2021-05-30 10:55:11 +00:00
- curl --proto '=https' --tlsv1.2 -sSf -o gir-rustdoc.py
https://gitlab.gnome.org/World/Rust/gir-rustdoc/-/raw/main/gir-rustdoc.py
- chmod +x gir-rustdoc.py
2021-09-19 08:04:08 +00:00
- PATH=~/.cargo/bin/:$PATH ./generator.py --gir-files-directories gir-files gst-gir-files --embed-docs --no-fmt
2021-03-23 21:51:22 +00:00
- |
2021-05-25 10:59:37 +00:00
RUSTDOCFLAGS="$RUST_DOCS_FLAGS"
2023-05-04 05:54:43 +00:00
RUSTFLAGS="--cfg docsrs"
2021-05-30 10:55:11 +00:00
eval $(./gir-rustdoc.py pre-docs)
2023-05-04 07:02:57 +00:00
cargo +nightly doc --workspace --exclude examples --exclude tutorials --all-features --color=always --no-deps
2021-05-25 10:59:37 +00:00
- mv target/doc docs
2021-04-20 08:59:52 +00:00
artifacts :
paths :
2021-05-25 10:59:37 +00:00
- 'docs'
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 :
2021-05-25 10:59:37 +00:00
extends : .img-nightly
2018-11-09 16:13:07 +00:00
stage : 'deploy'
2022-05-18 17:03:00 +00:00
needs : [ 'docs' ]
interruptible : false
2021-04-20 08:59:52 +00:00
script :
2021-05-30 10:55:11 +00:00
- curl --proto '=https' --tlsv1.2 -sSf -o gir-rustdoc.py
https://gitlab.gnome.org/World/Rust/gir-rustdoc/-/raw/main/gir-rustdoc.py
- chmod +x gir-rustdoc.py
- ./gir-rustdoc.py html-index
2021-05-25 10:59:37 +00:00
# development docs
- mkdir public/git
- mv docs public/git/docs
# stable docs
2021-05-30 10:55:11 +00:00
- ./gir-rustdoc.py docs-from-artifacts
2021-04-20 08:59:52 +00:00
- ls public/
2018-11-09 16:13:07 +00:00
artifacts :
paths :
- 'public'
2021-05-25 10:59:37 +00:00
rules :
2021-07-02 13:33:30 +00:00
- if : ($CI_DEFAULT_BRANCH == $CI_COMMIT_BRANCH) && ($CI_PROJECT_NAMESPACE == $NAMESPACE)
2021-05-25 10:59:37 +00:00
when : 'manual'
2020-10-27 22:03:02 +00:00
.windows rust docker build :
stage : 'container-final'
2023-07-19 07:54:06 +00:00
timeout : '2h'
2022-11-23 16:08:25 +00:00
needs : [ ]
2020-10-27 22:03:02 +00:00
variables :
# Unlike the buildah/linux jobs, this file
# needs to be relative to windows-docker/ subdir
# as it makes life easier in the powershell script
#
# We also don't need a CONTEXT_DIR var as its also
# hardcoded to be windows-docker/
DOCKERFILE : 'ci/windows-docker/Dockerfile'
tags :
- 'windows'
- 'shell'
- '2022'
script :
# We need to pass an array and to resolve the env vars, so we can't use a variable:
- $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "RUST_VERSION=$RUST_VERSION")
- "& ci/windows-docker/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
- |
if (!($?)) {
echo "Failed to build the image"
Exit 1
}
windows rust docker stable :
extends : '.windows rust docker build'
variables :
RUST_IMAGE : !reference [variables, "WINDOWS_RUST_STABLE_IMAGE"]
RUST_UPSTREAM_IMAGE : !reference [variables, "WINDOWS_RUST_STABLE_UPSTREAM_IMAGE"]
RUST_VERSION : !reference [variables, "GST_RS_STABLE"]
windows rust docker msrv :
extends : '.windows rust docker build'
variables :
RUST_IMAGE : !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
RUST_UPSTREAM_IMAGE : !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
RUST_VERSION : !reference [variables, "GST_RS_MSRV"]
.msvc2019 build :
stage : 'test'
tags :
- 'docker'
- 'windows'
- '2022'
script :
2021-05-28 03:02:25 +00:00
# Skip -sys tests as they don't work
# https://github.com/gtk-rs/gtk3-rs/issues/54
#
# We need to build each crate separately to avoid crates like -egl,-wayland etc on windows
2020-10-27 22:03:02 +00:00
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 &&
2021-05-28 03:02:25 +00:00
powershell ./ci/run_windows_tests.ps1"
2020-10-27 22:03:02 +00:00
- |
if (!$?) {
Write-Host "Tests Failed!"
Exit 1
}
test windows msrv :
image : $WINDOWS_RUST_MINIMUM_IMAGE
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2020-10-27 22:03:02 +00:00
- job : 'windows rust docker msrv'
artifacts : false
extends : '.msvc2019 build'
test windows stable :
needs :
2022-11-23 16:08:25 +00:00
- job : 'trigger'
artifacts : false
2020-10-27 22:03:02 +00:00
- job : 'windows rust docker stable'
artifacts : false
image : "$WINDOWS_RUST_STABLE_IMAGE"
extends : '.msvc2019 build'