Commit graph

89 commits

Author SHA1 Message Date
Marijn Suijten
43a4bde600 CI: Ensure all documentation comments are protected against stripping 2021-05-05 12:23:40 +02:00
Marijn Suijten
baa29777a4 ci: Deduplicate clippy linter arguments 2021-04-29 21:36:44 +02:00
Marijn Suijten
3af9de175c ci: Create index page for the documentation 2021-04-24 10:38:50 +02:00
Marijn Suijten
4be08cc7df ci: Update gtk-rs docs link to https://gtk-rs.org/gtk-rs/git/docs/
This link was falsely pointing to https://gtk-rs.org/gtk-rs/ where no
documentation resides (anymore?).
2021-04-24 10:38:50 +02:00
Marijn Suijten
801b1f2371 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.
2021-04-24 10:38:49 +02:00
Guillaume Desmottes
f00c57cd6f ci: coverage: ignore build.rs when generating reports 2021-04-23 12:28:54 +00:00
Guillaume Desmottes
c3946eef7c ci: generate cobertura report directly
grcov 0.8.0 now has cobertura support so we no longer need to to export
to lcov format and then convert.

Extract the summary from the generated html so the metric matches the
one from the html report (for some reason the cobertura ones are
differents).

The new gitlab summary parsing regexp is now:
  <abbr .*>(\d+.\d+) %<\/abbr>
2021-04-23 12:28:54 +00:00
Guillaume Desmottes
c22a863a57 ci: coverage: don't build examples and tutorials
We just want to build and run the tests to generate the coverage
reports.

Workaround for https://github.com/rust-lang/rust/issues/84421
2021-04-23 12:28:54 +00:00
Sebastian Dröge
56b7c1916f ci: Allow the coverage job to fail
It's using the nightly compiler and can easily break every now and then,
like it does now with https://github.com/rust-lang/rust/issues/84421 .
2021-04-22 11:23:45 +03:00
Sebastian Dröge
7d8485612e ci: Don't allow failure of the cargo outdated job anymore
All dependencies are up to date now and we should try keeping it that
way.
2021-04-22 11:23:45 +03:00
Guillaume Desmottes
48f74d39e8 ci: always run coverage job
It should be fixed now.
2021-04-16 09:03:25 +02:00
Bilal Elmoussaoui
b83b8c8675 ci: link to external dependencies instead of building them for docs 2021-03-31 09:06:35 +02:00
Sebastian Dröge
d66394f7c4 ci: Allow clippy::upper_case_acronyms
That would otherwise change a lot of API in confusing ways, e.g. RTSP -> Rtsp
and would be inconsistent with the naming in C.
2021-03-25 17:43:54 +02:00
Marijn Suijten
a0358ada40 ci: Always build-test the documentation (dox feature)
Quite a few issues slipped in over time because the docs are only
extended with `embed-lgpl-docs` and provided as artifact as part of a
manual action, that isn't clicked often.
2021-03-24 13:43:44 +01:00
Guillaume Desmottes
68253e1c28 ci: run 'pages' job with nightly image
We need nightly to generate the doc.
2021-01-27 18:55:03 +02:00
Guillaume Desmottes
beee75dabe ci: make coverage job manual
It's broken atm, likely because of https://github.com/mozilla/grcov/issues/555
2021-01-22 09:09:41 +01:00
Guillaume Desmottes
01e1cfce54 ci: add coverage job
Uses the new llvm source-base coverage from nightly to generate coverage
reports:
- full html report as artifact
- cobertura report for gitlab MR integration
- output coverage summary for gitlab parsing

Here is the regexp to set in gitlab as "Test coverage parsing":
\s*lines\.*:\s*([\d\.]+%)

Ignore sys crates when calculating coverage are those are fully
generated anyway.

Resources:
- https://github.com/marco-c/rust-code-coverage-sample
- https://github.com/mozilla/grcov/issues/468#issuecomment-691615245
- https://www.greycastle.se/how-to-show-flutter-test-coverage-in-gitlab-ci/
2021-01-11 15:41:21 +01:00
Marijn Suijten
9dc110be07 gitlab-ci: Do not ignore un-violated clippy lints
redundant_pattern_matching does not seem to exist (perhaps renamed to
if_let_redundant_pattern_matching), and single_match + cast_lossless do
not seem to be violated (anymore?).
2021-01-08 11:01:02 +01:00
Marijn Suijten
7ed20090d1 Fix clippy::field_reassign_with_defaults instead of ignoring it
Fixes: fc2d7fc4 ("ci: Add some more ignored lints to the clippy configuration")
2021-01-08 11:01:02 +01:00
Sebastian Dröge
fc2d7fc4d0 ci: Add some more ignored lints to the clippy configuration 2020-12-31 16:54:33 +02:00
Marijn Suijten
8549046994 CI: Test v1_18 feature of egl/wayland/x11 crates
In 55badab1 versioning features were added to these crates after all
(even though they are not used in the actual code, merely to forward the
feature flag to dependencies like `gst` and `gst-gl`). They were omitted
at first and have these special cases in the CI, but those are not
necessary anymore.

Fixes: b2f3363c ("CI: Update to restructured GL EGL/Wayland/X11 layout")
2020-12-19 14:15:27 +00:00
Marijn Suijten
6fe1b26a10 CI: Gir_*.toml files have moved to <crate>/Gir.toml
See f657a56947
2020-11-28 11:15:22 +01:00
Marijn Suijten
b2f3363c8c CI: Update to restructured GL EGL/Wayland/X11 layout 2020-11-28 11:15:22 +01:00
Marijn Suijten
3129027b9d CI: Do not enable all features in .cargo test sys
This solves build breakage when dox is enabled on non-nightly targets,
which uses the experimental doc_cfg feature.
2020-11-19 17:21:30 +01:00
Marijn Suijten
2a169e0fdd CI: Build docs on nightly for feature(doc_cfg)
The doc_cfg feature displays cfg requirements for a given symbol
directly in the documentation.
2020-11-19 16:39:31 +01:00
Jordan Petridis
3bab13b228 ci: move f.do_distro_{tag, exec} vars to the jobs
The gitlab parser will only expand the variables once,
which make it impossible to abstract over the rust
version in a nice way. A hacky workaround is to
duplicate some things and get rid of the RUST_VERSION
var to avoid the issue.

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/618#note_679774
2020-11-05 16:55:29 +00:00
Sebastian Dröge
773d92f9f5 ci: Store stable and minimum supported Rust version (MSRV) in template variables
And don't make the actual version numbers part of the jobs.
2020-11-05 16:55:29 +00:00
Sebastian Dröge
918a30a60b ci: Disable gstreamer-gl-sys tests for now
This requires moving over to splitting the bindings between GL, EGL,
etc.
2020-11-01 10:26:33 +02:00
Sebastian Dröge
bdcb133fc2 ci: Run sys tests with --all-features and only build --all-features
They're fully additive so there's no point in building with default
features too.

For the non-sys bindings we might want to consider building with default
features though.
2020-11-01 10:09:57 +02:00
Sebastian Dröge
9c141a2fbf ci: Explicitly select stable Rust version
And for now we stay at 1.46.0 because 1.47.0 has a bug that prevents
clippy from succeeding.
2020-11-01 09:58:52 +02:00
Sebastian Dröge
dd4dd364da ci: Enable cargo's colors in more cases 2020-11-01 09:48:40 +02:00
Sebastian Dröge
36291d738e ci: Add GstController to the gir checks 2020-11-01 09:48:37 +02:00
Sebastian Dröge
f08bd7ef88 ci: Add CI tests for the sys crates 2020-11-01 09:48:35 +02:00
Sebastian Dröge
7cca791580 Only run non-sys checks on the CI if the crate actually exists 2020-11-01 09:48:35 +02:00
Jordan Petridis
8ff3cdde7e
ci: avoid trying to cache cargo registry
There have been some very weird issues, where
cargo keeps fetching older commits of glib-rs
and breaking the build like so [1]

Might be stale cache, or some http/git mirroring
shenanigans, so lets stop trying to use the
cache for now and check if the issue persists.
2020-09-29 18:11:08 +03:00
Sebastian Dröge
a540274c72 ci: Update minimum supported version to 1.41
Needed for gst-plugins-rs now because one dependency requires a newer
version now.
2020-09-09 09:25:15 +03:00
Jordan Petridis
42768a3159
ci: get rid of some template inheretence in yaml
its confusing and it took 3 attempts to get `before_script`
to fucntion as expected. Instead get rid of the anchor
and use a (questionable) but simpler heuristic to detemine
when to update the lockfile.
2020-08-25 19:24:45 +03:00
Jordan Petridis
0ec95b4aae
ci: fix plugins-update jobs
This is a hotfix for 8d9bb82492

These jobs are only run on after merge and were not tested before
2020-08-25 11:33:59 +03:00
Jordan Petridis
8d9bb82492 ci: ensure the registry cache and lockfile are up-to-date
We are caching the CARGO_HOME which includes git repos of
the gtk-rs bindings. Since we don't specify a branch
so it uses the default branch for the ref.

cargo build usually does an update if it has network access,
but its not guaranted or the case for other tools like clippy
which may still point to the stale git snapshot like here:

https://gitlab.freedesktop.org/thaytan/gstreamer-rs/-/jobs/4165449
2020-08-25 07:30:11 +00:00
Guillaume Desmottes
4b553c3ae7 ci: check commit using ci-fairy
See https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#checking-commits

In this setup it will check for any leftover fixup!/squash! commits and
that messages don't have the 'Signed-off-by:' tag.
2020-06-11 13:57:23 +00:00
Sebastian Dröge
61c80ada48 ci: Run build with v1_18 feature 2020-05-03 16:48:35 +03:00
Guillaume Desmottes
f28a92c46c ci: update ci template
Prevent creating a second useless layer, see
https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/26

Update image tag to ensure building images is still working.
2020-04-28 16:08:56 +02:00
Guillaume Desmottes
fe30b4a388 ci: improve docker image layering
At the moment we are building 3 independent images, each one having a different
Rust version. This works perfectly fine but we can save storage space and
bandwith by making a smarter use of Docker's layering system.

Introducing a new 'base' image containing all the deps, including
GStreamer, acting as a base for the actual images.
As a result most of the actual content is now shared accross the same
Docker layer. This would save us from downloading/building all the deps
when updating images and will reduce storage and transfers for runners.
2020-04-28 15:25:48 +02:00
Jordan Petridis
cc0775388f CI: Build docs and deploy them with gitlab pages 2020-04-27 16:54:41 +02:00
Guillaume Desmottes
e23ca02261 ci: fix trigger update request
Forgot to change the branch to 'master' instead of my custom test
branch.
2020-04-27 14:01:50 +02:00
Guillaume Desmottes
0d2829d955 ci: add deploy jobs triggering gst-plugins-rs image updates
Those jobs will trigger a rebuild of gst-plugins-rs when our images are
updated.
2020-04-27 11:14:29 +02:00
Guillaume Desmottes
e40e23b82c ci: move image tags to its own file
Will be used by gst-plugins-rs to reference gstreamer-rs images as
bases.
2020-04-24 14:00:11 +02:00
Sebastian Dröge
020e2a4464 ci: Rebuild CI images for Rust 1.43
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/468>
2020-04-24 12:31:10 +03:00
Guillaume Desmottes
932d4720c0 ci: fix CARGO_HOME caching
CARGO_HOME's semantic depends on when it's used in the pipeline:
- it's the install prefix when installing Cargo
- it's the crate cache location when building jobs

env.sh is sourced at the start of all jobs and was overidding the
CARGO_HOME path defined in the CI template for caching. Fix this by
moving the prefix install path to install-rust.sh.
2020-04-21 09:35:33 +00:00
Guillaume Desmottes
38b64473e9 ci: make clippy warnings fatal 2020-04-21 11:06:46 +02:00