ostree/rust-bindings/rust/.gitlab-ci.yml

78 lines
1.5 KiB
YAML

image: rust:latest
variables:
CARGO_TARGET_DIR: target
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
- docs
- publish
libostree-sys:
stage: build
script:
- cargo build --verbose --manifest-path libostree-sys/Cargo.toml
- cargo test --verbose --manifest-path libostree-sys/Cargo.toml
libostree:
stage: build
script:
- cargo build --verbose
- cargo test --verbose
libostree-sys_nightly:
stage: build
image: rustlang/rust:nightly
script:
- cargo build --verbose --manifest-path libostree-sys/Cargo.toml
- cargo test --verbose --manifest-path libostree-sys/Cargo.toml
allow_failure: true
libostree_nightly:
stage: build
image: rustlang/rust:nightly
script:
- cargo build --verbose
- cargo test --verbose
allow_failure: true
# docs
docs:
stage: docs
script:
- make merge-lgpl-docs
- cargo doc --verbose --features dox
artifacts:
paths:
- target/doc
# publish
pages:
stage: publish
script:
- cp -r target/doc public
artifacts:
paths:
- public
only:
- master
publish_libostree-sys:
stage: publish
script:
- make pre-package
- cargo publish --verbose --manifest-path libostree-sys/Cargo.toml --token $CRATES_IO_TOKEN
when: manual
publish_libostree:
stage: publish
script:
- make pre-package
- cargo publish --verbose --token $CRATES_IO_TOKEN
when: manual