Compare commits

...

2 commits

Author SHA1 Message Date
394bcf1897
do a build with default features before all the customised builds, should help speed things up more
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2021-05-07 02:49:17 +10:00
0b1abcd659
cleanup doesn't need the feature matrix thingy 0uo 2021-05-07 02:28:01 +10:00

View file

@ -16,20 +16,22 @@ default:
stages:
- lint
- cache-cleanup
- build-base
- build
- version
- test
# TEMPLATE
.cargo-build:
stage: build
parallel:
matrix:
- FEATURES:
- xdg-mime-backend
- infer-backend
- multi-threaded xdg-mime-backend
- multi-threaded infer-backend
# TEMPLATES
.cargo-cleanup:
stage: cache-cleanup
allow_failure: true
script:
- cargo install cargo-sweep
- cargo sweep -i
.cargo-build-base:
stage: build-base
only:
refs:
@ -40,15 +42,21 @@ stages:
- .gitlab-ci.yml
script:
cargo build --no-default-features --locked --features="json $FEATURES"
cargo build --locked
.cargo-build:
extends: .cargo-build-base
stage: build
parallel:
matrix:
- FEATURES:
- xdg-mime-backend
- infer-backend
- multi-threaded xdg-mime-backend
- multi-threaded infer-backend
.cargo-cleanup:
extends: .cargo-build
stage: cache-cleanup
allow_failure: true
script:
- cargo install cargo-sweep
- cargo sweep -i
cargo build --no-default-features --locked --features="json $FEATURES"
.cargo-test:
extends: .cargo-build
@ -87,15 +95,40 @@ cleanup-nightly:
- target
- .cargo
# BUILD BASE
build-base-stable:
extends: .cargo-build-base
needs: ["cleanup-stable"]
build-base-msrv:
extends: build-base-stable
needs: ["cleanup-msrv"]
image: "rust:1.43.0"
cache:
key: msrv
paths:
- target
- .cargo
build-base-nightly:
extends: build-base-stable
needs: ["cleanup-nightly"]
image: "rustlang/rust:nightly"
cache:
key: nightly
paths:
- target
- .cargo
# BUILD
build-stable:
extends: .cargo-build
needs: ["cleanup-stable"]
needs: ["build-base-stable"]
build-msrv:
extends: build-stable
needs: ["cleanup-msrv"]
needs: ["build-base-msrv"]
image: "rust:1.43.0"
cache:
key: msrv
@ -105,7 +138,7 @@ build-msrv:
build-nightly:
extends: build-stable
needs: ["cleanup-nightly"]
needs: ["build-base-nightly"]
image: "rustlang/rust:nightly"
cache:
key: nightly