From 56f6b9e727c649ab62b71c0f341b6d861afc8d2e Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Tue, 25 May 2021 16:37:04 +0200 Subject: [PATCH] Generate docs artifact for gir-doc --- .gitlab-ci.yml | 16 ++++++++++------ gstreamer-audio/src/lib.rs | 2 ++ gstreamer-video/src/lib.rs | 2 ++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cfee805cb..393912486 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -337,18 +337,22 @@ outdated: script: - cargo outdated --root-deps-only --exit-code 1 -v -pages: - extends: .img-stable +docs: + extends: .img-nightly stage: 'deploy' script: + - curl --proto '=https' --tlsv1.2 -sSf -o gir-docs.py + https://gitlab.gnome.org/World/Rust/gir-docs/-/raw/main/gir-docs.py + - chmod +x gir-docs.py - | + eval $(./gir-docs.py pre-docs) for crate in gstreamer*; do cd $crate - cargo doc --features --features=dox,embed-lgpl-docs + cargo doc --features --features=dox,embed-lgpl-docs --no-deps cd .. done - - mv target/doc public/ - when: 'manual' + - rm -rf docs/ + - mv target/doc docs/ artifacts: paths: - - 'public' + - 'docs' diff --git a/gstreamer-audio/src/lib.rs b/gstreamer-audio/src/lib.rs index f7f7160b6..674db354b 100644 --- a/gstreamer-audio/src/lib.rs +++ b/gstreamer-audio/src/lib.rs @@ -6,6 +6,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![cfg_attr(feature = "dox", feature(doc_cfg))] + extern crate array_init; #[macro_use] extern crate bitflags; diff --git a/gstreamer-video/src/lib.rs b/gstreamer-video/src/lib.rs index 036bb8292..960b96a6c 100644 --- a/gstreamer-video/src/lib.rs +++ b/gstreamer-video/src/lib.rs @@ -6,6 +6,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![cfg_attr(feature = "dox", feature(doc_cfg))] + #[macro_use] extern crate bitflags; extern crate libc;