Commit graph

63 commits

Author SHA1 Message Date
Sebastian Dröge
e61bfa1ea9 ci: Update to dav1d 0.9.2 2021-09-10 10:21:01 +03:00
Jordan Petridis
610f98dc2d
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:06:25 +03:00
Sebastian Dröge
96d86eaa06 Clean up clippy warnings and CI configuration
Put clippy overrides into the sources files instead of the CI
configuration, and fix various warnings / clean up code.
2021-09-08 12:35:41 +00:00
Jordan Petridis
6b9f915286
ci: update base image to debian 11
Like it was done for the bindings [1]

Also update the ci-template sha

[1] https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/836
2021-08-17 15:01:25 +03:00
Sebastian Dröge
0592e46e65 ci: Update image version 2021-06-20 11:54:06 +03:00
François Laignel
8f8f5bdff7 Allow clippy::blocks-in-if-conditions
It rejects code such as:

```rust
    if state
        .start_ts
        .zip(accumulate_time)
        .map_or(false, |(start_ts, accumulate_time)| {
            start_ts + accumulate_time < pts
        })
```

because it looks like:

```rust
if { true }
```
2021-06-05 10:36:21 +02:00
Guillaume Desmottes
1ec1352c88 meson: fix csound detection
csound-sys can detect the system lib using either pkg-config or using
the CSOUND_LIB_DIR env variable.
The former case just work but the second is trickier as we need to
ensure that CSOUND_LIB_DIR is defined when building.

So we no longer try to detect the lib using find_library() if user
didn't define the env variable as the build will fail later.

Also explicitly pass the env variable to cargo so user can now call
'CSOUND_LIB_DIR=/usr/lib64 meson build && ninja -C build'
and have it work without repassing the env variable to ninja.
2021-05-26 12:08:05 +02:00
Guillaume Desmottes
40765f7c53 ci: coverage: generate cobertura report with grcov
It's supported with the latest version.
Also ignore build.rs when generating reports.

The new gitlab summary parsing regexp is now:
  <abbr .*>(\d+.\d+) %<\/abbr>
2021-04-23 16:41:06 +02:00
Sebastian Dröge
8f74314e96 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:28:03 +03:00
Guillaume Desmottes
b92360db37 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\.]+%)

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-04-16 13:10:32 +00:00
Sebastian Dröge
9acacbb320 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 21:12:05 +02:00
Sebastian Dröge
9d359d9341 ci: Update to dav1d 0.8.2 2021-03-25 18:20:05 +02:00
Guillaume Desmottes
595616fe2d ci: install cargo-c to proper location
Need to define CARGO_HOME so it's installed to the same places as the
rest of the Rust tools.
2021-01-04 16:04:52 +01:00
Guillaume Desmottes
fdc3ea68e8 ci: test linking on all static plugins
Will ensure that our static libraries and pkg-config files are properly
generated.
2021-01-04 12:26:45 +01:00
Guillaume Desmottes
fc1bae347e ci: install cargo-c 2021-01-04 10:38:05 +01:00
Marijn Suijten
a2b766d568 CI: Remove unnecessary lint-ignore for clippy::cast_lossless 2021-01-02 17:55:06 +01:00
Marijn Suijten
1a7c4c14cc Fix clippy::redundant_pattern_matching 2021-01-02 17:55:06 +01:00
Sebastian Dröge
817a4710f3 ci: Add some more ignored lints to the clippy configuration 2020-12-31 17:28:51 +02:00
Guillaume Desmottes
d921ee2245 ci: check if all plugins are installed with meson
Will prevent us to forget adding new plugins to meson.
2020-11-19 09:23:52 +01:00
Guillaume Desmottes
3e211415c3 ci: test building with meson 2020-11-19 09:23:25 +01:00
Jordan Petridis
49198f9c11 ci: move 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 19:24:45 +02:00
Sebastian Dröge
8e4cca6981 ci: Take stable and minimum supported Rust version (MSRV) from template variables
And don't make the actual version numbers part of the jobs.
2020-11-05 17:11:55 +00:00
Sebastian Dröge
53b7bdd4d5 ci: Use 1.46.0 for stable 2020-11-01 11:51:01 +02:00
Jordan Petridis
643544876b
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.

[1]: https://gitlab.freedesktop.org/slomo/gst-plugins-rs/-/jobs/4715922
2020-09-30 10:03:10 +03:00
Sebastian Dröge
8c1906eb6c ci: Update minimum supported version to 1.41 2020-09-09 09:36:03 +03:00
Jordan Petridis
0f89576235
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 guaranteed 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-26 13:52:04 +03:00
Guillaume Desmottes
61f76548bc 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-15 10:25:09 +02:00
Jordan Petridis
896bda12f9
ci: always run the clippy and rustfmt jobs
Unless they are explicitly marked, they won't
run on detached pipelines by default
2020-04-30 19:21:42 +03:00
Jordan Petridis
3d2792a1c3
ci: replace only clause with rules
only/except is deprecated and going to be removed
from future versions of gitlab.
2020-04-30 19:14:04 +03:00
Guillaume Desmottes
ee71a4ab8a 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:11:18 +02:00
Guillaume Desmottes
9efe4168b7 ci: install dav1d when generating image
Save us from using the static version when building the crate.
2020-04-28 14:21:01 +02:00
Guillaume Desmottes
3d1df3ca25 ci: switch from cargo-audit to cargo-deny
Fix #110
2020-04-28 10:39:50 +02:00
Guillaume Desmottes
f34673b704 ci: add update jobs
Those jobs are triggered by gstreamer-rs when their images are updated
so we can rebuild ours.

Also disable normal building jobs and unrelated tests when updating a
specific image as they are not needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/321>
2020-04-27 12:19:17 +02:00
Guillaume Desmottes
54586c6ecc ci: use fdo template
Build our own images based on the ones used by gstreamer-rs ci.

Fix #109

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/321>
2020-04-27 12:19:08 +02:00
Guillaume Desmottes
15d863a26c ci: make clippy warnings fatal 2020-04-21 11:52:21 +02:00
Guillaume Desmottes
575d3534b1 ci: force git-fetch-with-cli
Workaround so fdo redirects actually work.
2020-04-21 11:52:21 +02:00
Guillaume Desmottes
660e325bbc ci: allow outdated job to fail
We'd like to be able to ignore some outdated deps which is not yet
possible: https://github.com/kbknapp/cargo-outdated/issues/127
2020-04-14 10:49:14 +02:00
Guillaume Desmottes
281aad2243 ci: run 'cargo outdated' in scheduled jobs
Automatically detect if a crate we are directly using is outdated.
2020-04-10 12:18:42 +02:00
Natanael Mojica
cf59318ab4 Add csound-based filter plugin 2020-03-22 13:44:40 +02:00
Sebastian Dröge
cd2957679d Don't include gst-ci template
It disables all our other tests apparently.
2020-03-19 11:43:13 +02:00
Sebastian Dröge
d58cdc41b7 Require Rust 1.40 for the CI
At least one dependency of one plugin uses 1.40 features now.
2020-02-25 10:10:13 +02:00
Guillaume Desmottes
e73e27cda4 ci: include gst-ci
- Use gst-ci's stages instead of our own
- Override GIT_STRATEGY for Rust only builds as gst-ci relies on
  gst-build subprojects by default.

First step merging our Rust CI with gst-ci. Once this is merged we'll
enable Rust in gst-ci builds and so will guard gst-plugins-rs MR against
breaking gst-build.
2020-01-03 14:35:49 +05:30
Philippe Normand
9d659fbd00 ci: Add dav1d build support 2019-12-24 15:10:58 +01:00
Sebastian Dröge
bc94cc999e Run clippy on --all-targets 2019-12-22 10:20:18 +02:00
François Laignel
0221524a10 Update to tokio release 0.2.5 + throttling 2019-12-21 08:56:43 +01:00
François Laignel
8eec141517 threadsharing: migrate to async/await and tokio 0.2.0-alpha.6
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/merge_requests/164
2019-12-19 20:44:00 +01:00
Sebastian Dröge
b89a0d18dc Require Rust 1.39 on the CI and fix the build after gstreamer-rs changes 2019-11-11 13:29:41 +01:00
Jordan Petridis
dd5b24fcc9
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:22 +03:00
Guillaume Desmottes
82841555f2 ci: run 'cargo audit' in scheduled jobs 2019-10-10 14:40:09 +02:00
Sebastian Dröge
69aefb15f7 Update GStreamer to 1.16.1 and explicitly use Debian buster docker images 2019-10-05 00:36:13 +03:00