image: rust:latest variables: # --all-features CURRENT_FEATURES: --features v2018_9 SCCACHE_URL: https://github.com/mozilla/sccache/releases/download/0.2.8/sccache-0.2.8-x86_64-unknown-linux-musl.tar.gz CARGO_TARGET_DIR: ${CI_PROJECT_DIR}/target CARGO_HOME: ${CI_PROJECT_DIR}/cargo SCCACHE_DIR: ${CI_PROJECT_DIR}/sccache RUSTC_WRAPPER: sccache before_script: - echo deb http://ftp.debian.org/debian stretch-backports main > /etc/apt/sources.list.d/backports.list - apt-get update - apt-get install -y -t stretch-backports cmake libostree-dev - wget -O - ${SCCACHE_URL} | tar -C /usr/bin/ -xz --wildcards --strip-components=1 '*/sccache' cache: paths: - cargo/ - sccache/ stages: - check - build - publish # checks check: stage: check script: - rustup component add clippy rustfmt - cargo fmt --all -- --check - cargo clippy --all ${CURRENT_FEATURES} -- -D warnings gir: stage: check script: - rm -rf src/auto/ - make gir - git diff -R --exit-code # ostree-sys ostree-sys: stage: build script: - cargo test --verbose --manifest-path sys/Cargo.toml ${CURRENT_FEATURES} publish_ostree-sys: stage: publish script: - cargo publish --verbose --manifest-path sys/Cargo.toml --token $CRATES_IO_TOKEN cache: {} when: manual # ostree ostree: stage: build script: - cargo test --verbose ${CURRENT_FEATURES} ostree_default_features: stage: build script: - cargo test --verbose publish_ostree: stage: publish script: - cargo publish --verbose --token $CRATES_IO_TOKEN cache: {} when: manual # docs docs: stage: build image: rustlang/rust:nightly variables: RUSTDOC_OPTS: >- -Z unstable-options --extern-html-root-url glib_sys=https://gtk-rs.org/docs --extern-html-root-url gobject_sys=https://gtk-rs.org/docs --extern-html-root-url gio_sys=https://gtk-rs.org/docs --extern-html-root-url glib=https://gtk-rs.org/docs --extern-html-root-url gio=https://gtk-rs.org/docs script: - make merge-lgpl-docs - cargo rustdoc --verbose --package ostree-sys --features dox -- ${RUSTDOC_OPTS} - cargo rustdoc --verbose --package ostree --features dox -- ${RUSTDOC_OPTS} artifacts: paths: - target/doc pages: stage: publish image: alpine before_script: [] script: - cp -r target/doc public cache: {} artifacts: paths: - public only: - master