Commit graph

157 commits

Author SHA1 Message Date
Sebastian Dröge
4b8f85c4c6 Regenerate with new gir and gir files 2021-09-19 13:12:58 +00:00
Sebastian Dröge
ce09e333b3 ci: Add libsoup2.4-dev to FDO_DISTRIBUTION_PACKAGES for now
It fails building via gst-build because of its sysprof subproject.
2021-09-10 09:43:12 +03:00
Jordan Petridis
2e57783c9f
ci: avoid spawning 2 pipelines for each commit
When an MR is open, you can have both a normal and a "detached"
pipeline.

They have different properties, but a detached pipeline is
enough for us and identical to the normal one, so we can avoid
the extra load on the CI.

https://docs.gitlab.com/ee/ci/jobs/job_control.html#avoid-duplicate-pipelines

https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
2021-09-09 06:13:56 +03:00
Jordan Petridis
abfa75b334 ci: update base image to debian 11
also update the ci-template sha

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/836>
2021-08-16 15:25:08 +00:00
Guillaume Gomez
e2264a3f3f Fix (new) clippy warnings 2021-08-03 10:08:32 +02:00
Sebastian Dröge
7380f18ae7 Revert "ci: namespace should be GStreamer and not gstreamer"
This reverts commit c30ea09e4c.
It was actually wrong.
2021-07-05 13:02:02 +03:00
Jordan Petridis
6275b4ba70 ci: use parentheses for the rules:if statement
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/818>
2021-07-02 16:33:30 +03:00
Sebastian Dröge
c30ea09e4c ci: namespace should be GStreamer and not gstreamer 2021-07-02 12:08:46 +00:00
Sebastian Dröge
e008923a30 ci: Don't deploy docs on forks
It would fail unless the fork also has docs build artefacts for all
previous releases.

Based on https://gitlab.gnome.org/World/Rust/gir-rustdoc/-/merge_requests/10
2021-07-02 14:01:01 +03:00
Sebastian Dröge
7bb9a0df70 ci: Add 0.17 release for the docs 2021-06-25 09:38:19 +03:00
Sebastian Dröge
a94d84e780 Silence/fix various clippy warnings 2021-06-20 10:59:49 +03:00
Marijn Suijten
b8d50a342f CI: test all features on v1_20 2021-06-04 11:51:01 +02:00
Sophie Herold
e453701b50 Adapt gir-docs -> gir-rustdoc script rename 2021-05-30 12:55:11 +02:00
Marijn Suijten
819d60ec8b ci: gir-checks: Update submodules before running jobs
This might explain the weird diff we were seeing in submodule hashes.
All other jobs checking `git diff` after their operations make sure
they're up-to-date, except the `gir-checks` step.
2021-05-28 17:07:27 +00:00
Sebastian Dröge
b15d8e4c2e ci: Add more git diffs to the gir checker job to figure out where it fails
It regularly fails when building a pipeline on master with dirty git
submodules, but never seems to fail in MRs.
2021-05-28 16:54:56 +03:00
Sophie Herold
8e05ee28ed Base pages on gir-docs 2021-05-25 19:04:48 +02:00
Guillaume Gomez
1b1a4aa30b Add CI check for doc aliases 2021-05-21 12:05:46 +02:00
Marijn Suijten
d203745cfc 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.
2021-05-05 12:23:40 +02:00
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
Guillaume Desmottes
20b672eae3 ci: force git-fetch-with-cli
Workaround so fdo redirects actually work.

Fix https://gitlab.freedesktop.org/gstreamer/gst-ci/-/issues/71
2020-04-20 18:19:23 +02:00
Guillaume Desmottes
1295d9fc6a ci: remove target/ as manual clean up
It seems that when a job is failing, target/ is not properly wiped out
from the ci container triggering later jobs to fail, see for example
https://gitlab.freedesktop.org/gdesmott/gstreamer-rs/-/jobs/2349943

Manually clean it up as after_script to hopefully workaround this
problem.
2020-04-20 18:04:55 +02:00
Sebastian Dröge
47d839e58a Switch from cargo-audit to cargo-deny
This provides a superset of the features, including license checks.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/238
2020-04-16 12:12:45 +02:00
Guillaume Desmottes
99f91167af ci: build GStreamer instead of importing tarball
Makes it much easier to update to a new gst version.
2020-04-16 09:47:15 +02:00
Guillaume Desmottes
23545fcf7d ci: no need to fetch gtk-rs checker history 2020-04-16 09:46:59 +02:00
Guillaume Desmottes
429962bdd7 ci: use fdo ci template
Build our own images instead of manually installing everything we need
for each job. This should hopefully speed up our ci and make it more
robust.
2020-04-16 09:46:57 +02:00
Guillaume Desmottes
5de8fa89c4 ci: allow outdated job to fail
glutin and winit updates are pending.
2020-04-13 11:03:19 +02:00
Sebastian Dröge
92faaeacdb Update minimum supported Rust version to 1.40 2020-04-12 19:47:49 +03:00
Guillaume Gomez
2f72261360 gitlab-ci: Add checks for missing init asserts 2020-04-12 17:25:52 +03:00
Guillaume Gomez
bfb4ec25c5 gitlab-ci: Add manual traits check 2020-04-12 17:25:30 +03:00
Guillaume Desmottes
669bf98128 ci: run 'cargo outdated' in scheduled jobs
Automatically detect if a crate we are directly using is outdated.
2020-04-10 12:27:38 +02:00
Sebastian Dröge
68e7a4078e Run clippy on --all-targets
Also ignore clippy::missing_safety_doc for now.
2019-12-22 12:10:27 +02:00
Sebastian Dröge
77c6741ae0 Update to futures 0.3 and require Rust 1.39
Also use async/await in the futures examples.
2019-11-11 12:18:49 +01:00
Jordan Petridis
d584c3ba23
CI: force install cargo audit
We are caching $CARGO_HOME in between runs, so an arbitrary
cargo audit binary might already exist in the environment.
Force install it so cargo doesn't complain and our binary
is guaranteed "fresh".
2019-10-21 14:20:42 +03:00
Guillaume Desmottes
69ed7cd630 ci: run cargo-audit
Can be used to detect vulnerabilities in deps, see
https://blog.rust-lang.org/inside-rust/2019/10/03/Keeping-secure-with-cargo-audit-0.9.html

Added libssl-dev as it's a build dep of one of audit's crate.
2019-10-10 10:34:07 +02:00
Sebastian Dröge
06a9f891bd Update GStreamer to 1.16.1 and explicitly use Debian buster docker images 2019-10-05 00:35:21 +03:00
Sebastian Dröge
0cfe6c58a6 Minor cleanup to gitlab-ci.yml
Don't special-case the features of gstreamer-base and gstreamer-video
anymore, they have the same as most other crates now.
2019-09-17 11:05:57 +03:00
Sebastian Dröge
52509b4b95 Remove subclassing feature and make it the default 2019-09-09 11:51:07 +03:00
Sebastian Dröge
ea367bac14 Fix or ignore various clippy warnings
And ignore some common warnings we don't care about in general, while
also making clippy errors fail the build.
2019-09-07 19:39:19 +03:00
Sebastian Dröge
cd4ae139d0 Explicitly enable the features we want to test on the CI 2019-08-13 18:30:40 +03:00
Sebastian Dröge
3ea9a435e2 Update minimum supported Rust version to 1.36 2019-07-10 11:21:53 +03:00
Sebastian Dröge
27f0d86068 Run stable clippy in gitlab CI again and also build all features on stable
Now that futures are stable in 1.36 we can do that again.
2019-07-04 17:28:15 +03:00
Guillaume Desmottes
e9fbbc2b40 ci: bump minimum Rust version to 1.34
Needed for TryFrom.
2019-06-01 11:57:15 +05:30
Sebastian Dröge
059860c744 Allow clippy job to fail in the CI for now 2019-05-24 10:04:16 +00:00
Jordan Petridis
3bf853e42f CI: only build with all-features on nightly
glib has a futures feature that only works on nighty
and there is no easy to exclude a feature without specifying
every other feature.
2019-05-03 22:35:30 +03:00
Jordan Petridis
bc355ea3ee CI: refactor to use 'extends' instead of anchors 2019-05-03 22:35:30 +03:00
Sebastian Dröge
8aad3e4dbb Update CI configuration for 1.16 2019-04-23 20:45:39 +03:00
Jordan Petridis
4ce27c130b
CI: Add a clippy job
Uses stable clippy for the time being

Otherwise we'll get warnings about lint names being deprecated without
being able to fix it while still being able to compile on stable.

This will solve itself once the new lint names move to stable and we can
switch to them.
2019-03-12 11:36:24 +02:00
Jordan Petridis
9d5347d7b5
CI: abstract the setup needed compile the crates 2019-03-12 11:36:24 +02:00
Sebastian Dröge
a99652f236 Enable 1.31 test job now that 1.32 is released
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/167
2019-01-18 08:14:36 +00:00
Sebastian Dröge
bfcdec782e Switch to stable rustfmt and add skip annotations for the generated code to the lib.rs 2019-01-16 17:10:01 +02:00
Sebastian Dröge
e804ef4d76 Switch to Rust 1.31 as minimum supported version
Too many dependencies switched and we can't really keep everything at an
older version.

Commented out for now until stable becomes 1.32.
2018-12-19 12:45:57 +02:00