Commit graph

132 commits

Author SHA1 Message Date
Thibault Saunier
e391f1ef25 ci: Check that documentation is updated as required 2022-08-29 18:33:22 -04:00
Sebastian Dröge
065bc72bfe ci: Update to cargo-c 0.9.11 2022-07-19 18:16:19 +03:00
Sebastian Dröge
dda125edb5 ci: Update image version 2022-07-01 10:40:06 +03:00
Sebastian Dröge
87f5d0b31c ci: Fix syntax for coverage reports to the new format 2022-06-07 09:36:03 +03:00
Sebastian Dröge
b9bc331ebc ci: Generate coverage report also for crates with external dependencies 2022-05-12 18:32:04 +03:00
Arun Raghavan
ea98a0b596 dav1ddec: Bump dependency for dav1d 1.0.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 08:29:15 -04:00
Jordan Petridis
a4aa45d27f ci: remove the david checkot after install
Makes the docker image slightly smaller
2022-05-10 12:34:03 +03:00
Sebastian Dröge
e8f15eb1e8 ci: Rebuild image and move coverage job to the stable image 2022-04-07 19:48:57 +03:00
Vivia Nikolaidou
d48d732038 .gitlab-ci.yml: Fix deprecated -Zinstrument-coverage switch 2022-03-30 16:16:25 +03:00
Guillaume Desmottes
ab344a469a ci: run tests with RUST_BACKTRACE
Handy to debug failing tests.
2022-02-22 17:31:35 +01:00
François Laignel
e0e890fd8d ci: cargo test --all-features too...
... and replace the deprecated --all argument with --workspace.

Also use --all-targets so that code, unit tests, integration tests
and examples can all be compiled or tested in one go.
2022-02-21 23:32:32 +01:00
Sebastian Dröge
75d348709c Change default branch from master to main 2022-01-16 16:19:36 +02:00
Sebastian Dröge
ab14c50d1c Ignore clippy::non_send_fields_in_send_ty lint
It's useless in its current shape and wrongly triggering on all types.

See https://github.com/rust-lang/rust-clippy/issues/8045
2022-01-14 12:09:57 +02:00
Jordan Petridis
f78b97ba4a ci: stop installing gtk4 manually
It's now included in the base image we use.

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/942
2022-01-12 22:24:22 +02:00
Sebastian Dröge
82d969190f ci: Remove the gstreamer directory if it exists already for the gst-build job
Otherwise it will regularly fail because the runner already has the
directory available for some reason.
2021-12-20 10:51:41 +02:00
Guillaume Desmottes
c99b7785f9 ci: add gst-build job schedule job 2021-11-02 14:25:32 +01:00
Sebastian Dröge
0a7d1639e7 Update to Rust edition 2021 and minimum supported Rust version to 1.56 2021-10-31 17:40:05 +02:00
Sebastian Dröge
db30cfcc74 ci: Install cargo-c 0.9.4 until our minimum supported Rust version is 1.56 2021-10-23 10:37:55 +03:00
Bilal Elmoussaoui
30796fbe07 Add a GTK4 paintable sink plugin
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Co-authored-by: Jordan Petridis <jordan@centricular.com>
2021-10-13 12:28:51 +03:00
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
Sebastian Dröge
83cc8104a1 Fix or silence all remaining clippy warnings
Also ignore common errors we don't care about when running clippy and
make clippy errors fail the CI.
2019-09-07 10:42:07 +03:00
Sebastian Dröge
70385a4833 Update minimum supported Rust version to 1.36 2019-07-10 11:24:07 +03:00
Sebastian Dröge
63a840e0e7 Bring gitlab CI in sync with gstreamer-rs and add clippy task
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/issues/58
2019-07-04 18:21:29 +03:00
Sebastian Dröge
a11550a59d CI: Update minimum supported Rust version to 1.34
To be in sync with gstreamer-rs.
2019-06-03 13:04:50 +03:00
Jordan Petridis
8c03237949 Add libsodium-based encrypter/decrypter elements
With some changes by Sebastian Dröge <sebastian@centricular.com>
2019-05-09 12:29:39 +03:00
Sebastian Dröge
8b49953a7a Update CI for 1.16 2019-04-24 12:07:08 +03:00
Jordan Petridis
34c7a541f6
CI: build and test with all-features and examples 2019-04-22 10:58:02 +03:00
Sebastian Dröge
8c671ed7dc Enable 1.31 test job now that 1.32 is released 2019-01-18 08:14:38 +00:00
Sebastian Dröge
5b0d79bc73 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 13:21:48 +02:00
François Laignel
4812884453 CI: fix fmt 2018-12-09 16:03:27 +01:00
Sebastian Dröge
46f80da72e First run lints, then tests 2018-11-04 18:52:31 +02:00
Sebastian Dröge
87f94ddcc8 Run gitlab-ci also with Rust 1.28 2018-11-04 18:52:25 +02:00
Jordan Petridis
252b8498ff CI: Add gitlab-ci config.
Similar to how ti was done for gstreamer-rs.
See [1] for more.

[1] https://github.com/sdroege/gstreamer-rs/pull/132
2018-10-15 16:26:28 +03:00