ci: Speed up build with cache
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
679529b5b5
commit
758a535320
1 changed files with 12 additions and 6 deletions
18
.drone.yml
18
.drone.yml
|
@ -17,13 +17,13 @@ steps:
|
|||
commands:
|
||||
# Debug
|
||||
- pwd
|
||||
- mkdir -p _artifacts
|
||||
- mkdir -p _artifacts _cache
|
||||
|
||||
- name: "build:executable"
|
||||
image: crystallang/crystal:1.5.0
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /stupid
|
||||
- name: crystal_cache
|
||||
path: /drone/src/_cache
|
||||
commands:
|
||||
# Debug
|
||||
- pwd
|
||||
|
@ -37,15 +37,21 @@ steps:
|
|||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: cache
|
||||
path: /stupid
|
||||
- name: docker_cache
|
||||
path: /drone/src/_cache
|
||||
commands:
|
||||
# Prepare
|
||||
- apk add make
|
||||
- test -f _cache/docker-image.tar && docker load < _cache/docker-image.tar
|
||||
# Build
|
||||
- make docker-build
|
||||
- make docker-save > _artifacts/docker-image.tar
|
||||
- make docker-save > _cache/docker-image.tar
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
- name: crystal_cache
|
||||
temp: {}
|
||||
- name: docker_cache
|
||||
temp: {}
|
||||
- name: dockersock
|
||||
temp: {}
|
||||
|
|
Loading…
Reference in a new issue