Commit graph

75 commits

Author SHA1 Message Date
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