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:
|
commands:
|
||||||
# Debug
|
# Debug
|
||||||
- pwd
|
- pwd
|
||||||
- mkdir -p _artifacts
|
- mkdir -p _artifacts _cache
|
||||||
|
|
||||||
- name: "build:executable"
|
- name: "build:executable"
|
||||||
image: crystallang/crystal:1.5.0
|
image: crystallang/crystal:1.5.0
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache
|
- name: crystal_cache
|
||||||
path: /stupid
|
path: /drone/src/_cache
|
||||||
commands:
|
commands:
|
||||||
# Debug
|
# Debug
|
||||||
- pwd
|
- pwd
|
||||||
|
@ -37,15 +37,21 @@ steps:
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
- name: cache
|
- name: docker_cache
|
||||||
path: /stupid
|
path: /drone/src/_cache
|
||||||
commands:
|
commands:
|
||||||
|
# Prepare
|
||||||
- apk add make
|
- apk add make
|
||||||
|
- test -f _cache/docker-image.tar && docker load < _cache/docker-image.tar
|
||||||
|
# Build
|
||||||
- make docker-build
|
- make docker-build
|
||||||
- make docker-save > _artifacts/docker-image.tar
|
- make docker-save > _artifacts/docker-image.tar
|
||||||
|
- make docker-save > _cache/docker-image.tar
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache
|
- name: crystal_cache
|
||||||
|
temp: {}
|
||||||
|
- name: docker_cache
|
||||||
temp: {}
|
temp: {}
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
temp: {}
|
temp: {}
|
||||||
|
|
Loading…
Reference in a new issue