mirror of https://github.com/milvus-io/milvus.git
Cache dependencies to speed up GitHub Action workflows (#3501)
* Cache dependencies to speed up workflows Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com> * Cache dependencies to speed up workflows Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>pull/3519/head
parent
8f26e69f46
commit
3f8181060d
|
@ -50,6 +50,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker-compose build ubuntu-core
|
docker-compose build ubuntu-core
|
||||||
docker rmi $(docker images | grep '<none>' | awk '{print $3}') || exit 0
|
docker rmi $(docker images | grep '<none>' | awk '{print $3}') || exit 0
|
||||||
|
- name: Cache Docker Volumes
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: .docker
|
||||||
|
key: ubuntu${{ matrix.ubuntu }}-${{ hashFiles('core/**') }}
|
||||||
|
restore-keys: ubuntu${{ matrix.ubuntu }}-
|
||||||
- name: Docker Run
|
- name: Docker Run
|
||||||
run: |
|
run: |
|
||||||
docker-compose run ubuntu-core
|
docker-compose run ubuntu-core
|
||||||
|
@ -96,6 +102,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker-compose build centos-core
|
docker-compose build centos-core
|
||||||
docker rmi $(docker images | grep '<none>' | awk '{print $3}') || exit 0
|
docker rmi $(docker images | grep '<none>' | awk '{print $3}') || exit 0
|
||||||
|
- name: Cache Docker Volumes
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: .docker
|
||||||
|
key: centos${{ matrix.centos }}-${{ hashFiles('core/**') }}
|
||||||
|
restore-keys: centos${{ matrix.centos }}-
|
||||||
- name: Docker Run
|
- name: Docker Run
|
||||||
run: |
|
run: |
|
||||||
docker-compose run centos-core
|
docker-compose run centos-core
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
version: '3.5'
|
version: '3.5'
|
||||||
|
|
||||||
volumes:
|
|
||||||
amd64-ubuntu-18.04-cache:
|
|
||||||
amd64-centos-7-cache:
|
|
||||||
amd64-ubuntu-18.04-cuda-cache:
|
|
||||||
amd64-centos-7-cuda-cache:
|
|
||||||
|
|
||||||
x-ccache: &ccache
|
x-ccache: &ccache
|
||||||
CCACHE_COMPILERCHECK: content
|
CCACHE_COMPILERCHECK: content
|
||||||
CCACHE_COMPRESS: 1
|
CCACHE_COMPRESS: 1
|
||||||
CCACHE_COMPRESSLEVEL: 5
|
CCACHE_COMPRESSLEVEL: 5
|
||||||
CCACHE_MAXSIZE: 2G
|
CCACHE_MAXSIZE: 2G
|
||||||
CCACHE_DIR: /build/ccache
|
CCACHE_DIR: /ccache
|
||||||
|
|
||||||
services:
|
services:
|
||||||
ubuntu-core:
|
ubuntu-core:
|
||||||
|
@ -26,7 +20,7 @@ services:
|
||||||
<<: *ccache
|
<<: *ccache
|
||||||
volumes: &ubuntu-volumes
|
volumes: &ubuntu-volumes
|
||||||
- .:/milvus:delegated
|
- .:/milvus:delegated
|
||||||
- ${ARCH}-ubuntu-${UBUNTU}-cache:/build:delegated
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${ARCH}-ubuntu-${UBUNTU}-cache:/ccache:delegated
|
||||||
networks:
|
networks:
|
||||||
- milvus
|
- milvus
|
||||||
command: &ubuntu-command
|
command: &ubuntu-command
|
||||||
|
@ -45,7 +39,7 @@ services:
|
||||||
<<: *ccache
|
<<: *ccache
|
||||||
volumes: ¢os-volumes
|
volumes: ¢os-volumes
|
||||||
- .:/milvus:delegated
|
- .:/milvus:delegated
|
||||||
- ${ARCH}-centos-${CENTOS}-cache:/build:delegated
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${ARCH}-centos-${CENTOS}-cache:/ccache:delegated
|
||||||
networks:
|
networks:
|
||||||
- milvus
|
- milvus
|
||||||
command: ¢os-command
|
command: ¢os-command
|
||||||
|
@ -64,7 +58,7 @@ services:
|
||||||
<<: *ccache
|
<<: *ccache
|
||||||
volumes: &ubuntu-cuda-volumes
|
volumes: &ubuntu-cuda-volumes
|
||||||
- .:/milvus:delegated
|
- .:/milvus:delegated
|
||||||
- ${ARCH}-ubuntu-${UBUNTU}-cuda-cache:/build:delegated
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${ARCH}-ubuntu-${UBUNTU}-cuda-cache:/ccache:delegated
|
||||||
networks:
|
networks:
|
||||||
- milvus
|
- milvus
|
||||||
command: &ubuntu-cuda-command
|
command: &ubuntu-cuda-command
|
||||||
|
@ -82,7 +76,7 @@ services:
|
||||||
<<: *ccache
|
<<: *ccache
|
||||||
volumes: ¢os-cuda-volumes
|
volumes: ¢os-cuda-volumes
|
||||||
- .:/milvus:delegated
|
- .:/milvus:delegated
|
||||||
- ${ARCH}-centos-${CENTOS}-cuda-cache:/build:delegated
|
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${ARCH}-centos-${CENTOS}-cuda-cache:/ccache:delegated
|
||||||
networks:
|
networks:
|
||||||
- milvus
|
- milvus
|
||||||
command: ¢os-cuda-command
|
command: ¢os-cuda-command
|
||||||
|
@ -98,7 +92,6 @@ services:
|
||||||
shm_size: 2G
|
shm_size: 2G
|
||||||
volumes:
|
volumes:
|
||||||
- .:/milvus:delegated
|
- .:/milvus:delegated
|
||||||
- ${ARCH}-centos-${CENTOS}-cache:/build:delegated
|
|
||||||
networks:
|
networks:
|
||||||
- milvus
|
- milvus
|
||||||
command:
|
command:
|
||||||
|
@ -114,7 +107,6 @@ services:
|
||||||
shm_size: 2G
|
shm_size: 2G
|
||||||
volumes:
|
volumes:
|
||||||
- .:/milvus:delegated
|
- .:/milvus:delegated
|
||||||
- ${ARCH}-centos-${CENTOS}-cuda-cache:/build:delegated
|
|
||||||
networks:
|
networks:
|
||||||
- milvus
|
- milvus
|
||||||
command:
|
command:
|
||||||
|
|
Loading…
Reference in New Issue