2018-10-08 06:46:47 +00:00
|
|
|
stages:
|
2018-10-08 09:03:42 +00:00
|
|
|
- "lint"
|
2018-11-04 14:32:17 +00:00
|
|
|
- "test"
|
2018-11-09 16:44:26 +00:00
|
|
|
- "extras"
|
2018-10-08 06:46:47 +00:00
|
|
|
|
2019-05-02 15:51:22 +00:00
|
|
|
.tarball_setup:
|
2018-10-08 06:46:47 +00:00
|
|
|
variables:
|
2018-11-09 16:36:36 +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"
|
2018-10-08 06:46:47 +00:00
|
|
|
DEPENDENCIES: |
|
|
|
|
curl
|
2019-04-23 15:47:50 +00:00
|
|
|
libssl-dev
|
|
|
|
liborc-0.4-dev
|
2018-10-08 06:46:47 +00:00
|
|
|
libglib2.0-dev
|
|
|
|
libxml2-dev
|
|
|
|
libgtk-3-dev
|
|
|
|
libegl1-mesa
|
|
|
|
libgles2-mesa
|
|
|
|
libgl1-mesa-dri
|
|
|
|
libgl1-mesa-glx
|
|
|
|
libwayland-egl1-mesa
|
|
|
|
before_script:
|
|
|
|
- apt-get update -yqq
|
|
|
|
- apt-get install -yqq --no-install-recommends $DEPENDENCIES
|
2018-10-08 08:47:44 +00:00
|
|
|
|
2018-10-08 06:46:47 +00:00
|
|
|
- mkdir -p precompiled-gst && cd precompiled-gst
|
|
|
|
|
2019-04-23 15:47:50 +00:00
|
|
|
- curl -L https://people.freedesktop.org/~slomo/gstreamer-1.16.0.tar.gz | tar xz
|
2018-10-08 06:46:47 +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
|
2018-11-09 16:36:36 +00:00
|
|
|
|
|
|
|
- cd "${CI_PROJECT_DIR}"
|
|
|
|
cache:
|
|
|
|
key: "gst"
|
|
|
|
paths:
|
|
|
|
- "${CARGO_HOME}"
|
|
|
|
|
2019-05-02 15:51:22 +00:00
|
|
|
.cargo test:
|
|
|
|
extends: '.tarball_setup'
|
2018-11-09 16:36:36 +00:00
|
|
|
stage: "test"
|
2018-10-08 06:46:47 +00:00
|
|
|
script:
|
|
|
|
- rustc --version
|
2018-10-08 08:11:40 +00:00
|
|
|
- cargo build --color=always --all
|
|
|
|
- G_DEBUG=fatal_warnings cargo test --color=always --all
|
2019-05-02 15:51:26 +00:00
|
|
|
|
|
|
|
- |
|
2019-07-04 14:28:15 +00:00
|
|
|
if [ -n "$ALL_FEATURES" ]; then
|
2019-05-02 15:51:26 +00:00
|
|
|
cargo build --color=always --all --all-features
|
|
|
|
G_DEBUG=fatal_warnings cargo test --color=always --all --all-features
|
|
|
|
fi
|
2018-10-08 06:46:47 +00:00
|
|
|
|
2019-07-10 08:21:53 +00:00
|
|
|
test 1.36:
|
|
|
|
# 1.36 img
|
2018-11-04 16:43:07 +00:00
|
|
|
# https://hub.docker.com/_/rust/
|
2019-07-10 08:21:53 +00:00
|
|
|
image: "rust:1.36-slim"
|
2019-05-02 15:51:22 +00:00
|
|
|
extends: '.cargo test'
|
2018-10-08 06:46:47 +00:00
|
|
|
|
|
|
|
test stable:
|
|
|
|
# Stable img
|
|
|
|
# https://hub.docker.com/_/rust/
|
|
|
|
image: "rust:slim"
|
2019-07-04 14:28:15 +00:00
|
|
|
variables:
|
|
|
|
ALL_FEATURES: 'yes'
|
2019-05-02 15:51:22 +00:00
|
|
|
extends: '.cargo test'
|
2018-10-08 06:46:47 +00:00
|
|
|
|
|
|
|
test nightly:
|
|
|
|
# Nightly
|
|
|
|
# https://hub.docker.com/r/rustlang/rust/
|
|
|
|
image: "rustlang/rust:nightly-slim"
|
|
|
|
allow_failure: true
|
2019-05-02 15:51:26 +00:00
|
|
|
variables:
|
2019-07-04 14:28:15 +00:00
|
|
|
ALL_FEATURES: 'yes'
|
2019-05-02 15:51:22 +00:00
|
|
|
extends: '.cargo test'
|
2018-10-08 09:03:42 +00:00
|
|
|
|
|
|
|
rustfmt:
|
2019-01-16 15:01:29 +00:00
|
|
|
image: "rust:slim"
|
2018-10-08 09:03:42 +00:00
|
|
|
stage: "lint"
|
|
|
|
script:
|
2018-12-09 17:33:17 +00:00
|
|
|
- rustup component add rustfmt
|
2018-10-08 09:03:42 +00:00
|
|
|
- cargo fmt --version
|
|
|
|
- cargo fmt -- --color=always --check
|
2018-11-09 16:44:26 +00:00
|
|
|
|
|
|
|
clippy:
|
2019-05-02 15:51:22 +00:00
|
|
|
extends: '.tarball_setup'
|
2019-07-04 14:28:15 +00:00
|
|
|
image: "rust:slim"
|
2018-11-09 16:44:26 +00:00
|
|
|
stage: 'extras'
|
2019-05-24 10:03:26 +00:00
|
|
|
allow_failure: true
|
2018-11-09 16:44:26 +00:00
|
|
|
script:
|
|
|
|
- rustup component add clippy-preview
|
|
|
|
- cargo clippy --version
|
|
|
|
- cargo clippy --color=always --all --all-features
|