ci: Install rustdoc-stripper in Nightly Rust image

This saves two build-jobs from performing the same (expensive!)
compilation+installation over and over again, when it is much cheaper to
cache it in the image instead.
This commit is contained in:
Marijn Suijten 2021-05-05 10:17:49 +02:00
parent dae2fd361f
commit d203745cfc
3 changed files with 7 additions and 6 deletions

View file

@ -1,7 +1,7 @@
# We use https://gitlab.freedesktop.org/freedesktop/ci-templates # We use https://gitlab.freedesktop.org/freedesktop/ci-templates
# to build the images used by the ci. # to build the images used by the ci.
# #
# Here is how to properly update thoses images: # Here is how to properly update those images:
# - new Rust stable version: update GST_RS_IMG_TAG and update Rust version # - new Rust stable version: update GST_RS_IMG_TAG and update Rust version
# - add dependencies: update FDO_DISTRIBUTION_PACKAGES and update GST_RS_IMG_TAG # - 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 # - update GStreamer version: update the tag in ci/install-gst.sh and update GST_RS_IMG_TAG
@ -11,7 +11,7 @@
# - setting it to the current date and the version suffix to 0 # - setting it to the current date and the version suffix to 0
# - incrementing the version suffix # - incrementing the version suffix
# #
# After each update commit your changes and push to your personnal repo. # After each update commit your changes and push to your personal repo.
# After review and ci approval merge the branch as usual. # After review and ci approval merge the branch as usual.
# #
# Updating the nightly image should be done by simply running a scheduled ci # Updating the nightly image should be done by simply running a scheduled ci
@ -450,7 +450,6 @@ doc-stripping:
extends: .img-nightly extends: .img-nightly
stage: 'extras' stage: 'extras'
script: script:
- cargo install rustdoc-stripper
- PATH=~/.cargo/bin/:$PATH ./generator.py --strip-docs --no-fmt - PATH=~/.cargo/bin/:$PATH ./generator.py --strip-docs --no-fmt
- 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) - 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)
@ -460,7 +459,6 @@ docs:
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 - PATH=~/.cargo/bin/:$PATH ./generator.py --embed-docs --no-fmt
- | - |
crate_names=$(for manifest in gstreamer*/Cargo.toml; do echo -n " -p ${manifest%%/Cargo.toml}"; done) crate_names=$(for manifest in gstreamer*/Cargo.toml; do echo -n " -p ${manifest%%/Cargo.toml}"; done)

View file

@ -1,4 +1,4 @@
variables: variables:
GST_RS_IMG_TAG: '2021-04-23.1' GST_RS_IMG_TAG: '2021-05-05.0'
GST_RS_STABLE: '1.51.0' GST_RS_STABLE: '1.51.0'
GST_RS_MSRV: '1.51.0' GST_RS_MSRV: '1.51.0'

View file

@ -27,8 +27,11 @@ if [ "$RUST_IMAGE_FULL" = "1" ]; then
cargo install --force cargo-outdated cargo install --force cargo-outdated
fi fi
# coverage tools
if [ "$RUST_VERSION" = "nightly" ]; then if [ "$RUST_VERSION" = "nightly" ]; then
# Coverage tools
cargo install grcov cargo install grcov
rustup component add llvm-tools-preview rustup component add llvm-tools-preview
# Documentation tools
cargo install --force rustdoc-stripper
fi fi