53 lines
770 B
YAML
53 lines
770 B
YAML
stages:
|
|
- lint
|
|
- build
|
|
- test
|
|
|
|
variables:
|
|
FEATURES: ""
|
|
RUST_BACKTRACE: "full"
|
|
|
|
.stable:
|
|
image: rust:latest
|
|
|
|
.nightly:
|
|
image: rustlang/rust:nightly
|
|
allow_failure: true # It's not often, but it happens nightly breaks, surprisingly.
|
|
|
|
.build:
|
|
stage: build
|
|
script:
|
|
- cargo build --verbose
|
|
|
|
.test:
|
|
stage: test
|
|
script:
|
|
- cargo test --verbose
|
|
|
|
rustfmt:
|
|
stage: lint
|
|
script:
|
|
- rustup component add rustfmt
|
|
- find -type f -iname '*.rs' -not -path './target/*' | xargs rustfmt --check --edition 2018
|
|
extends:
|
|
- .stable
|
|
|
|
stable-build:
|
|
extends:
|
|
- .build
|
|
- .stable
|
|
|
|
nightly-build:
|
|
extends:
|
|
- .build
|
|
- .nightly
|
|
|
|
stable-test:
|
|
extends:
|
|
- .test
|
|
- .stable
|
|
|
|
nightly-test:
|
|
extends:
|
|
- .test
|
|
- .nightly
|