Utilize caching for builds (#44)

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
next
Sayan 4 years ago committed by GitHub
parent b257b7286d
commit 9c7f4f04af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,11 +1,25 @@
kind: pipeline
name: Build and Test
environment:
CARGO_TARGET_DIR: /drone/src/target
CARGO_BUILD_TARGET_DIR: /drone/src/target
steps:
- name: restore-cache
image: plugins/s3-cache
settings:
path: /tdbcache/linux64
pull: true
endpoint:
from_secret: MIO_WWW
access_key:
from_secret: MIO_ACCESS
secret_key:
from_secret: MIO_KEY
restore: true
- name: run-tests
image: rust
commands:
- cargo build --verbose
- cargo test --verbose
- name: build-docker-binary
@ -36,3 +50,32 @@ steps:
event:
- tag
- push
- name: rebuild-cache
image: plugins/s3-cache
settings:
path: /tdbcache/linux64
pull: true
endpoint:
from_secret: MIO_WWW
access_key:
from_secret: MIO_ACCESS
secret_key:
from_secret: MIO_KEY
rebuild: true
mount:
- target
- name: flush-cache
image: plugins/s3-cache
settings:
path: /tdbcache/linux64
flush_path: /tdbcache/linux64
pull: true
endpoint:
from_secret: MIO_WWW
access_key:
from_secret: MIO_ACCESS
secret_key:
from_secret: MIO_KEY
flush: true
flush_age: 30

Loading…
Cancel
Save