Skip to content
Snippets Groups Projects
Commit 14f3efaa authored by Moul's avatar Moul
Browse files

(ci) Set up cache among jobs of the same pipeline

Among jobs downloading and compiling dependencies as debug type
fmt_and_clippy, build_debug, test_debug

Delete not very used build_debug_with_cache job
Delete lines cleaning cargo artifacts and moving target directory
preventing the cache to work
parent ba2d4ee1
Branches
No related tags found
No related merge requests found
Pipeline #18653 passed
......@@ -56,26 +56,6 @@ fmt_and_clippy:
- cargo fmt -- --check
- cargo clippy -- -V
- cargo clippy --all --tests -- -D warnings
build_debug:
extends: .env
rules:
- if: $CI_COMMIT_TAG
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "master"'
changes:
- Cargo.lock
- when: never
stage: build
script:
- cargo clean -p duniter
- cargo build --locked
- mkdir build
- mv target/debug/duniter build/duniter
artifacts:
paths:
- build/
expire_in: 3 day
cache:
- key:
files:
......@@ -84,22 +64,18 @@ build_debug:
- target/debug
policy: push
build_debug_with_cache:
build_debug:
extends: .env
rules:
- changes:
- Cargo.lock
when: never
- if: $CI_COMMIT_TAG
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "master"'
changes:
- Cargo.lock
- when: never
stage: build
script:
- cargo clean -p duniter
- cargo build --locked
- mkdir build
- mv target/debug/duniter build/duniter
artifacts:
paths:
- build/
......@@ -169,6 +145,13 @@ tests_debug:
- cd target/debug/deps/
- rm cucumber_tests-*.d
- mv cucumber_tests* ../../../build/duniter-cucumber
cache:
- key:
files:
- Cargo.lock
paths:
- target/debug
policy: pull
artifacts:
paths:
- build/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment