image: rust:latest variables: CARGO_TARGET_DIR: target # --all-features CURRENT_FEATURES: --features v2018_9 CARGO_HOME: ${CI_PROJECT_DIR}/cargo 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 stages: - build - publish # ostree-sys ostree-sys: stage: build script: - cargo test --verbose --manifest-path sys/Cargo.toml ${CURRENT_FEATURES} cache: paths: - cargo/ - target/ publish_ostree-sys: stage: publish script: - cargo publish --verbose --manifest-path sys/Cargo.toml --token $CRATES_IO_TOKEN when: manual # ostree ostree: stage: build script: - cargo test --verbose ${CURRENT_FEATURES} cache: paths: - cargo/ - target/ ostree_default_features: stage: build script: - cargo test --verbose cache: paths: - cargo/ - target/ # canary until Debian Backports gets updated libostree ostree_all_features: stage: build script: - cargo test --verbose --all-features cache: paths: - cargo/ - target/ allow_failure: true ostree_nightly: stage: build image: rustlang/rust:nightly script: - cargo test --verbose ${CURRENT_FEATURES} cache: paths: - cargo/ - target/ publish_ostree: stage: publish script: - cargo publish --verbose --token $CRATES_IO_TOKEN 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} cache: paths: - cargo/ - target/ artifacts: paths: - target/doc pages: stage: publish image: alpine script: - cp -r target/doc public artifacts: paths: - public only: - master