forked from sql-machine-learning/sqlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (48 loc) · 2.95 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
language: go
branches:
only:
- gh-pages
- "/.*/"
service:
- docker
# Update to newer version of Docker to allow
# Dockerfile being outside of the context directory
# https://github.com/docker/compose/issues/4926#issuecomment-370501452
addons:
apt:
packages:
- docker-ce
install:
# Note(tony): TravisCI's native `go get ${gobuild_args} ./...` failed with
# `/usr/bin/ld: final link failed: Bad value`, the cause is the system linker
# being not up to date: https://github.com/golang/go/issues/15038
# So I decided to skip install, and go get inside sqlflow:latest image
# Ref build: https://travis-ci.com/sql-machine-learning/sqlflow/builds/107870583
- echo "skip install"
# NOTE: mount all $GOPATH into container, then after build and test,
# $GOPATH/bin will have expected binaries.
# NOTE: When doing tests for hive, we must expose all ports that gohive client
# may need, like thrift ports, namenode ports, datanode ports etc:
# 10000,10002,8040,8042,9864,9866,9867,9870,8020. Then we start a simple http
# server on port 8899 using python, so that the docker container running SQLFlow
# test can know when the hive server becomes ready.
script:
- set -e
- df -h
- ls -lah
- docker build -t sqlflow:latest -f Dockerfile .
- docker run --rm -v $GOPATH/src:/go/src -w /go/src/github.com/sql-machine-learning/sqlflow sqlflow:latest pre-commit run -a
- docker run --rm -v $GOPATH:/go -w /go/src/github.com/sql-machine-learning/sqlflow sqlflow:latest bash scripts/test.sh
- docker run -d --name=hive -p 10000:10000 -p 10002:10002 -p 8040:8040 -p 8042:8042 -p 9864:9864 -p 9866:9866 -p 9867:9867 -p 9870:9870 -p 8020:8020 -p 8899:8899 sqlflow/gohive:dev python3 -m http.server 8899
- docker run --rm -v $GOPATH:/go --net=host --entrypoint bash -w /go/src/github.com/sql-machine-learning/sqlflow sqlflow:latest scripts/test_hive.sh
- docker run --rm -v $GOPATH:/go -w /go/src/github.com/sql-machine-learning/sqlflow sqlflow:latest bash scripts/test_e2e.sh
- docker run -e MAXCOMPUTE_AK=$MAXCOMPUTE_AK -e MAXCOMPUTE_SK=$MAXCOMPUTE_SK --rm -v $GOPATH:/go -w /go/src/github.com/sql-machine-learning/sqlflow sqlflow:latest bash scripts/test_maxcompute.sh
deploy:
skip_cleanup: true
provider: script
script: bash scripts/deploy.sh
on:
branch: develop
env:
global:
secure: f03CHRo2Afl9PD6jLuKtY/6b/MgJkytcfeIhSrAYZFLzUCQTa4MI5yih4pG/VJtTpKVpoQD7NJikj/x0eO/6NOGxegJwaruY8EDg/4LVLeuVqRipmw0V9l3LcZ7AofxPAeJ6RZLpHALR9cYegXEEtvyfjNRw2BhQZsZBvTE8sbbvfzLJOY1UC9CeQnHxDGZYXG3WSMr7b+44ifg4OBweATmEsdIVPD7kgexunJvHw0vzQ25vsf+huYwLorVc7uRghoYY8SoaLMEcmP50Jsl2Mn7AUoFUyM3tl/kOub11BV4/yGrGJC1BysT7l48frSKYqSU1yeT+0xiJjgkOwpV8BcxOmXrgm2s6PDzWDmiXtBRhE6n79iG2IuuTuYLk4n/Rm7uwKYu6EdnooKSnhGV6DW7mLVJ5Rcb655xCB+AoXb79Ilp60YxsMFTqzdhMkf3QpQV/OsEHFrzNhab6+pWcrwOeCq/CXU0MDO0rQuX4YIBwdEyAlDrj2JDvJ868lpdTJTxUUgUovH2j8rFrtCf5Bx0gqg0Cj81s/7cMdhtoV+wbTtHoQ7TLTZkvqYyFAMCkl2d5g00UhZpq+HTjzcPOL5xKc0mZhsuYq03nTVMQWzIJiKkaWbDPoY3eZcLga0cO8VD2HgzsQ5lg300ZTF73AxonZheyzJVWtLQvrpT8dPI=