-
-
Notifications
You must be signed in to change notification settings - Fork 330
/
Copy path.travis.yml
34 lines (34 loc) · 1.49 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
arch:
- arm64
os: linux
dist: xenial
language: shell
services:
- docker
env:
global:
- DOCKER_CACHE_FILE=/home/travis/docker/cache.tar.gz
before_script:
# Every 30 seconds, look for the build log file. If it exists, then
# start watching its contents and printing them to stdout as they
# change. This has two effects:
# 1. it avoids Travis timing out because the build outputs nothing
# 2. it makes it more obvious what part of the build, if any, gets stuck
- while sleep 30; do tail $TRAVIS_BUILD_DIR/log -f ; done &
script:
#- cd $TRAVIS_BUILD_DIR/docker/build/tensorflow && docker build -f Dockerfile.arm64v8 -t shareai/tensorflow:arm64v8_latest .
#- cd $TRAVIS_BUILD_DIR/docker/build/od && docker build -f Dockerfile.arm64v8 -t shareai/od:arm64v8_latest .
- "travis_wait 50 sleep 3000 &"
- docker-compose -f $TRAVIS_BUILD_DIR/docker/build/docker-compose-arm64v8.yml build > $TRAVIS_BUILD_DIR/log
after_success:
- docker login --username shareai --password $DOCKER_HUB_TOKEN
- docker push shareai/tensorflow:arm64v8_latest
#- docker push shareai/od:arm64v8_latest
- cd $TRAVIS_BUILD_DIR/docker/build && docker-compose -f docker-compose-arm64v8.yml push
cache:
directories:
- /home/travis/docker/
before_install:
- if [ -f ${DOCKER_CACHE_FILE} ]; then gunzip -c ${DOCKER_CACHE_FILE} | docker load; fi
before_cache:
- if [[ ${TRAVIS_BRANCH} == "master" ]] && [[ ${TRAVIS_PULL_REQUEST} == "false" ]]; then docker save $(docker images -a -q) | gzip > ${DOCKER_CACHE_FILE}; fi