-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path.travis.yml
60 lines (54 loc) · 1.51 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
language: shell
services: docker
os:
- linux-ppc64le
- linux
sudo: false
env:
global:
- REPO="tesseractshadow/tesseract4cmp"
matrix:
- RELEASE=16.04
- RELEASE=18.04
- RELEASE=latest
# DOCKER_USERNAME and DOCKER_PASSWORD need to be secure environment variables either above
# or in the settings within travis.
script:
- ./dockerfile.build.sh
- ./scripts/3-run-new-container.sh
- ./scripts/4-update-src.sh
- ./scripts/5-compile-src.sh
- ./scripts/6-test-ocr.sh
- ./scripts/7-build-pkg.sh
- ./scripts/2-remove-container.sh
- docker tag tesseractshadow/tesseract4cmp:latest "${REPO}:${RELEASE}_$(uname -m)"
after_success:
- |
if [ "$TRAVIS_EVENT_TYPE" != "pull_request" ] &&
[ "$TRAVIS_BRANCH" = "master" ]; then
docker images
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push "${REPO}:${RELEASE}_$(uname -m)"
fi
jobs:
include:
- stage: build_multi_arch_docker_image_1604
env: RELEASE=16.04
# minimise things that the stage doesn't require.
before_install: true
install: true
after_success: true
script: ./.travis-manifest.sh
- stage: build_multi_arch_docker_image_1804
env: RELEASE=18.04
before_install: true
install: true
after_success: true
script: ./.travis-manifest.sh
- stage: build_multi_arch_docker_image_latest
env: RELEASE=latest
before_install: true
install: true
after_success: true
script: ./.travis-manifest.sh
# vim:set et ts=2 sw=2: