ci: simplify pipeline a bit maybe

This commit is contained in:
Felix Krull 2020-04-01 00:06:38 +02:00 committed by Colin Walters
parent 175649141e
commit 935cbf4162
1 changed files with 10 additions and 29 deletions

View File

@ -8,7 +8,7 @@ variables:
RUSTC_WRAPPER: sccache RUSTC_WRAPPER: sccache
before_script: before_script:
- dnf install -y cargo rust rustfmt clippy ostree-devel - dnf install -y cargo rust ostree-devel
- curl -L "${SCCACHE_URL}" | tar -C /usr/bin/ -xz --wildcards --strip-components=1 '*/sccache' - curl -L "${SCCACHE_URL}" | tar -C /usr/bin/ -xz --wildcards --strip-components=1 '*/sccache'
cache: cache:
@ -17,35 +17,26 @@ cache:
- sccache/ - sccache/
stages: stages:
- check
- build - build
- publish - publish
# format and freshness checks check:
fmt: stage: build
stage: check
script: script:
- dnf install -y make git clippy rustfmt
# fmt
- cargo fmt --package ostree -- --check - cargo fmt --package ostree -- --check
# check generated code
gir:
stage: check
script:
- dnf install -y make
- rm -rf src/auto/ - rm -rf src/auto/
- make gir - make gir
- git checkout -- sys/src/auto/versions.txt src/auto/versions.txt - git checkout -- sys/src/auto/versions.txt src/auto/versions.txt
- git diff -R --exit-code - git diff -R --exit-code
# clippy
clippy:
stage: check
script:
- cargo clippy --all --all-features - cargo clippy --all --all-features
# build
build_default-features: build_default-features:
stage: build stage: build
script: script: cargo test --verbose --all
- cargo test --verbose --all
# all feature levels # all feature levels
build_v2014_9: build_v2014_9:
@ -147,8 +138,8 @@ build_v2020_1:
# all feature levels # all feature levels
# docs # docs
docs: pages:
stage: build stage: publish
image: rustlang/rust:nightly image: rustlang/rust:nightly
variables: variables:
RUSTDOC_OPTS: >- RUSTDOC_OPTS: >-
@ -164,17 +155,7 @@ docs:
- make merge-lgpl-docs - make merge-lgpl-docs
- cargo rustdoc --verbose --package ostree-sys --features dox -- ${RUSTDOC_OPTS} - cargo rustdoc --verbose --package ostree-sys --features dox -- ${RUSTDOC_OPTS}
- cargo rustdoc --verbose --package ostree --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 - cp -r target/doc public
cache: {}
artifacts: artifacts:
paths: paths:
- public - public