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