mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-22 00:48:17 +00:00
Bring gitlab CI in sync with gstreamer-rs and add clippy task
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/issues/58
This commit is contained in:
parent
b5b7e91c49
commit
612436a37b
1 changed files with 31 additions and 25 deletions
|
@ -1,17 +1,13 @@
|
||||||
stages:
|
stages:
|
||||||
- "lint"
|
- "lint"
|
||||||
- "test"
|
- "test"
|
||||||
|
- "extras"
|
||||||
|
|
||||||
.cargo_cache: &cache
|
.tarball_setup:
|
||||||
cache:
|
|
||||||
key: "gst"
|
|
||||||
paths:
|
|
||||||
- ".cargo_cache/"
|
|
||||||
|
|
||||||
.cargo_test_template: &cargo_test
|
|
||||||
stage: "test"
|
|
||||||
variables:
|
variables:
|
||||||
G_DEBUG: "fatal_warnings"
|
# Only stuff inside the repo directory can be cached
|
||||||
|
# Override the CARGO_HOME variable to force its location
|
||||||
|
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo_home"
|
||||||
SODIUM_USE_PKG_CONFIG: "true"
|
SODIUM_USE_PKG_CONFIG: "true"
|
||||||
DEPENDENCIES: |
|
DEPENDENCIES: |
|
||||||
curl
|
curl
|
||||||
|
@ -28,16 +24,10 @@ stages:
|
||||||
libgl1-mesa-dri
|
libgl1-mesa-dri
|
||||||
libgl1-mesa-glx
|
libgl1-mesa-glx
|
||||||
libwayland-egl1-mesa
|
libwayland-egl1-mesa
|
||||||
|
|
||||||
<<: *cache
|
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update -yqq
|
- apt-get update -yqq
|
||||||
- apt-get install -yqq --no-install-recommends $DEPENDENCIES
|
- apt-get install -yqq --no-install-recommends $DEPENDENCIES
|
||||||
|
|
||||||
# Only stuff inside the repo directory can be cached
|
|
||||||
# Override the CARGO_HOME variable to force its location
|
|
||||||
- export CARGO_HOME="${PWD}/.cargo_cache"
|
|
||||||
|
|
||||||
- mkdir -p precompiled-gst && cd precompiled-gst
|
- mkdir -p precompiled-gst && cd precompiled-gst
|
||||||
|
|
||||||
- curl -L https://people.freedesktop.org/~slomo/gstreamer-1.16.0.tar.gz | tar xz
|
- curl -L https://people.freedesktop.org/~slomo/gstreamer-1.16.0.tar.gz | tar xz
|
||||||
|
@ -48,33 +38,40 @@ stages:
|
||||||
- export PATH=$PATH:$PWD/gstreamer/bin
|
- export PATH=$PATH:$PWD/gstreamer/bin
|
||||||
- export LD_LIBRARY_PATH=$PWD/gstreamer/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
- export LD_LIBRARY_PATH=$PWD/gstreamer/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
- rustc --version
|
- cd "${CI_PROJECT_DIR}"
|
||||||
- cargo --version
|
cache:
|
||||||
|
key: "gst"
|
||||||
|
paths:
|
||||||
|
- "${CARGO_HOME}"
|
||||||
|
|
||||||
|
.cargo test:
|
||||||
|
extends: '.tarball_setup'
|
||||||
|
stage: "test"
|
||||||
script:
|
script:
|
||||||
- cargo build --all --color=always
|
- rustc --version
|
||||||
- cargo test --all --color=always
|
- cargo build --color=always --all
|
||||||
- cargo build --all-features --all --color=always
|
- G_DEBUG=fatal_warnings cargo test --color=always --all
|
||||||
- cargo test --all-features --all --color=always
|
- cargo build --color=always --all --examples --all-features
|
||||||
- cargo build --all-features --examples --all --color=always
|
- G_DEBUG=fatal_warnings cargo test --color=always --all --examples --all-features
|
||||||
|
|
||||||
test 1.34:
|
test 1.34:
|
||||||
# 1.34 img
|
# 1.34 img
|
||||||
# https://hub.docker.com/_/rust/
|
# https://hub.docker.com/_/rust/
|
||||||
image: "rust:1.34-slim"
|
image: "rust:1.34-slim"
|
||||||
<<: *cargo_test
|
extends: '.cargo test'
|
||||||
|
|
||||||
test stable:
|
test stable:
|
||||||
# Stable img
|
# Stable img
|
||||||
# https://hub.docker.com/_/rust/
|
# https://hub.docker.com/_/rust/
|
||||||
image: "rust:slim"
|
image: "rust:slim"
|
||||||
<<: *cargo_test
|
extends: '.cargo test'
|
||||||
|
|
||||||
test nightly:
|
test nightly:
|
||||||
# Nightly
|
# Nightly
|
||||||
# https://hub.docker.com/r/rustlang/rust/
|
# https://hub.docker.com/r/rustlang/rust/
|
||||||
image: "rustlang/rust:nightly-slim"
|
image: "rustlang/rust:nightly-slim"
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
<<: *cargo_test
|
extends: '.cargo test'
|
||||||
|
|
||||||
rustfmt:
|
rustfmt:
|
||||||
image: "rust:slim"
|
image: "rust:slim"
|
||||||
|
@ -83,3 +80,12 @@ rustfmt:
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
- cargo fmt --version
|
- cargo fmt --version
|
||||||
- cargo fmt -- --color=always --check
|
- cargo fmt -- --color=always --check
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
extends: '.tarball_setup'
|
||||||
|
image: "rust:slim"
|
||||||
|
stage: 'extras'
|
||||||
|
allow_failure: true
|
||||||
|
script:
|
||||||
|
- rustup component add clippy-preview
|
||||||
|
- cargo clippy --color=always --all --all-features
|
||||||
|
|
Loading…
Reference in a new issue