2018-10-15 12:08:29 +00:00
|
|
|
stages:
|
|
|
|
- "lint"
|
2018-11-04 16:52:31 +00:00
|
|
|
- "test"
|
2019-07-04 14:37:17 +00:00
|
|
|
- "extras"
|
2018-10-15 12:08:29 +00:00
|
|
|
|
2019-07-04 14:37:17 +00:00
|
|
|
.tarball_setup:
|
2018-10-15 12:08:29 +00:00
|
|
|
variables:
|
2019-07-04 14:37:17 +00:00
|
|
|
# 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"
|
2019-03-20 14:36:10 +00:00
|
|
|
SODIUM_USE_PKG_CONFIG: "true"
|
2018-10-15 12:08:29 +00:00
|
|
|
DEPENDENCIES: |
|
|
|
|
curl
|
2019-03-20 14:36:10 +00:00
|
|
|
file
|
|
|
|
libsodium-dev
|
2018-10-15 12:08:29 +00:00
|
|
|
libssl-dev
|
|
|
|
liborc-0.4-dev
|
|
|
|
libglib2.0-dev
|
2019-04-22 06:43:43 +00:00
|
|
|
libgdk-pixbuf2.0-dev
|
|
|
|
libgtk-3-dev
|
2018-10-15 12:08:29 +00:00
|
|
|
libxml2-dev
|
|
|
|
libegl1-mesa
|
|
|
|
libgles2-mesa
|
|
|
|
libgl1-mesa-dri
|
|
|
|
libgl1-mesa-glx
|
|
|
|
libwayland-egl1-mesa
|
2019-10-04 21:20:04 +00:00
|
|
|
xz-utils
|
2018-10-15 12:08:29 +00:00
|
|
|
before_script:
|
|
|
|
- apt-get update -yqq
|
|
|
|
- apt-get install -yqq --no-install-recommends $DEPENDENCIES
|
|
|
|
|
|
|
|
- mkdir -p precompiled-gst && cd precompiled-gst
|
|
|
|
|
2019-10-04 21:20:04 +00:00
|
|
|
- curl -L https://people.freedesktop.org/~slomo/gstreamer-1.16.1.tar.xz | tar xJ
|
2018-10-15 12:08:29 +00:00
|
|
|
- sed -i "s;prefix=/root/gstreamer;prefix=$PWD/gstreamer;g" $PWD/gstreamer/lib/x86_64-linux-gnu/pkgconfig/*.pc
|
|
|
|
- export PKG_CONFIG_PATH=$PWD/gstreamer/lib/x86_64-linux-gnu/pkgconfig
|
|
|
|
- export GST_PLUGIN_SYSTEM_PATH=$PWD/gstreamer/lib/x86_64-linux-gnu/gstreamer-1.0
|
|
|
|
- export GST_PLUGIN_SCANNER=$PWD/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
|
|
|
|
- export PATH=$PATH:$PWD/gstreamer/bin
|
|
|
|
- export LD_LIBRARY_PATH=$PWD/gstreamer/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
|
|
|
|
2019-07-04 14:37:17 +00:00
|
|
|
- cd "${CI_PROJECT_DIR}"
|
|
|
|
cache:
|
|
|
|
key: "gst"
|
|
|
|
paths:
|
|
|
|
- "${CARGO_HOME}"
|
|
|
|
|
|
|
|
.cargo test:
|
|
|
|
extends: '.tarball_setup'
|
|
|
|
stage: "test"
|
2018-10-15 12:08:29 +00:00
|
|
|
script:
|
2019-07-04 14:37:17 +00:00
|
|
|
- rustc --version
|
|
|
|
- cargo build --color=always --all
|
|
|
|
- G_DEBUG=fatal_warnings cargo test --color=always --all
|
|
|
|
- cargo build --color=always --all --examples --all-features
|
|
|
|
- G_DEBUG=fatal_warnings cargo test --color=always --all --examples --all-features
|
2018-10-15 12:08:29 +00:00
|
|
|
|
2019-07-10 08:23:57 +00:00
|
|
|
test 1.36:
|
|
|
|
# 1.36 img
|
2018-11-04 16:52:25 +00:00
|
|
|
# https://hub.docker.com/_/rust/
|
2019-10-04 21:20:04 +00:00
|
|
|
image: "rust:1.36-slim-buster"
|
2019-07-04 14:37:17 +00:00
|
|
|
extends: '.cargo test'
|
2018-10-15 12:08:29 +00:00
|
|
|
|
|
|
|
test stable:
|
|
|
|
# Stable img
|
|
|
|
# https://hub.docker.com/_/rust/
|
2019-10-04 21:20:04 +00:00
|
|
|
image: "rust:slim-buster"
|
2019-07-04 14:37:17 +00:00
|
|
|
extends: '.cargo test'
|
2018-10-15 12:08:29 +00:00
|
|
|
|
|
|
|
test nightly:
|
|
|
|
# Nightly
|
|
|
|
# https://hub.docker.com/r/rustlang/rust/
|
2019-10-04 21:20:04 +00:00
|
|
|
image: "rustlang/rust:nightly-buster-slim"
|
2018-10-15 12:08:29 +00:00
|
|
|
allow_failure: true
|
2019-07-04 14:37:17 +00:00
|
|
|
extends: '.cargo test'
|
2018-10-15 12:08:29 +00:00
|
|
|
|
|
|
|
rustfmt:
|
2019-10-04 21:20:04 +00:00
|
|
|
image: "rust:slim-buster"
|
2018-10-15 12:08:29 +00:00
|
|
|
stage: "lint"
|
|
|
|
script:
|
2018-12-09 14:57:41 +00:00
|
|
|
- rustup component add rustfmt
|
2018-10-15 12:08:29 +00:00
|
|
|
- cargo fmt --version
|
|
|
|
- cargo fmt -- --color=always --check
|
2019-07-04 14:37:17 +00:00
|
|
|
|
|
|
|
clippy:
|
|
|
|
extends: '.tarball_setup'
|
2019-10-04 21:20:04 +00:00
|
|
|
image: "rust:slim-buster"
|
2019-07-04 14:37:17 +00:00
|
|
|
stage: 'extras'
|
|
|
|
script:
|
|
|
|
- rustup component add clippy-preview
|
2019-09-07 07:42:07 +00:00
|
|
|
- cargo clippy --color=always --all --all-features -- -A clippy::redundant_pattern_matching -A clippy::single_match -A clippy::cast_lossless
|
2019-10-10 12:40:09 +00:00
|
|
|
|
|
|
|
audit:
|
|
|
|
extends: '.tarball_setup'
|
|
|
|
image: "rust:slim-buster"
|
|
|
|
stage: 'extras'
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
script:
|
|
|
|
- cargo install cargo-audit
|
|
|
|
- cargo audit --deny-warnings
|