ci: Speed up build with cache
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Glenn Y. Rolland 2022-08-19 11:36:24 +02:00
parent 679529b5b5
commit 758a535320

View file

@ -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: {}