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

This commit is contained in:
Lynne Megido 2021-05-07 02:49:17 +10:00
parent 0b1abcd659
commit 394bcf1897
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90

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,14 +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:
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
@ -86,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
@ -104,7 +138,7 @@ build-msrv:
build-nightly:
extends: build-stable
needs: ["cleanup-nightly"]
needs: ["build-base-nightly"]
image: "rustlang/rust:nightly"
cache:
key: nightly