forked from mirrors/gstreamer-rs
ci: Update and embed docs in one step using generator.py
`generator.py` can now be used to perform documentation generation and embedding in one go, simplifying the entire process while at the same time getting rid of intermediate `docs.md` being checked in to the repository. For this the CI needs the submodules with `gir` and the `.gir` files.
This commit is contained in:
parent
9dec3c359f
commit
801b1f2371
1 changed files with 22 additions and 18 deletions
|
@ -443,29 +443,33 @@ coverage:
|
||||||
cobertura: coverage.xml
|
cobertura: coverage.xml
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
|
variables:
|
||||||
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
extends: .img-nightly
|
extends: .img-nightly
|
||||||
stage: 'extras'
|
stage: 'extras'
|
||||||
script:
|
script:
|
||||||
|
- cargo install rustdoc-stripper
|
||||||
|
- PATH=~/.cargo/bin/:$PATH ./generator.py --embed-docs --no-fmt
|
||||||
- |
|
- |
|
||||||
for crate in gstreamer* gstreamer-gl/{egl,wayland,x11}; do
|
crate_names=$(for manifest in gstreamer*/Cargo.toml; do echo -n " -p ${manifest%%/Cargo.toml}"; done)
|
||||||
pushd $crate
|
crate_names="$crate_names -p gstreamer-gl-egl -p gstreamer-gl-wayland -p gstreamer-gl-x11"
|
||||||
RUSTDOCFLAGS="$RUST_DOCS_FLAGS" cargo +nightly doc --color=always --features=dox,embed-lgpl-docs --no-deps
|
RUSTDOCFLAGS="$RUST_DOCS_FLAGS" cargo +nightly doc $crate_names --color=always --features=dox --no-deps
|
||||||
popd
|
|
||||||
done
|
|
||||||
|
|
||||||
pages:
|
|
||||||
extends: .img-nightly
|
|
||||||
stage: 'deploy'
|
|
||||||
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
for crate in gstreamer* gstreamer-gl/{egl,wayland,x11}; do
|
|
||||||
cd $crate
|
|
||||||
RUSTDOCFLAGS="$RUST_DOCS_FLAGS" cargo +nightly doc --color=always --features=dox,embed-lgpl-docs --no-deps
|
|
||||||
cd ..
|
|
||||||
done
|
|
||||||
- mv target/doc public/
|
- mv target/doc public/
|
||||||
when: 'manual'
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- 'public'
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
pages:
|
||||||
|
stage: 'deploy'
|
||||||
|
when: 'manual'
|
||||||
|
dependencies:
|
||||||
|
- docs
|
||||||
|
script:
|
||||||
|
- ls public/
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- 'public'
|
- 'public'
|
||||||
|
|
Loading…
Reference in a new issue