-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
114 lines (114 loc) · 6.04 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia
os:
- linux
- osx
julia:
- 1.0
- 1.3
- nightly
matrix:
allow_failures:
- julia: nightly
- julia: 1.0
stage: "Verify Packages"
branches:
only:
- master
- staging
- trying
- /^v[0-9]+\.[0-9]+\.[0-9]+$/ # version tags
notifications:
email: false
env:
# arn:aws:iam::134847318362:user/AWSCoreJL
global:
- secure: I7/rE1u2w6kNlRiKsHGRonjC2Jsi/qlbHKNaLb5dH+K+YtDZo91J3WN4DRypKueWZAAFjYhgpHVm5Drt3TeKhQe9EF836DK7Mr6KBitXHp8S1xloCdnDl+w94j4wUxc5U48pCE3K0MncA7xIucbuHYyDigCzltQ7QRt32/6QmNOfe/FLLrxIs/kSuaugrt+XUfARrNbizaUtZfenJd3gC9VxFstjqKR+J5s4VWsrkS8xahlmME73pxuJW5e3unsBbWFs2oqRAxk9WG43wE96dIxD65MtHS+vO6C3157QDy/l67up2UtMNzboMoflPor7ZewOnslHXp1gl/3pEn50WJOQ3/jFA7Eb/sdQVl5Fd+9EO/vSwhOX4redtXPTwnzBTTxC4do6QTNRKJtyfRo6uKr1t48IYZZdBweGC7iHY911qtpxdUyqNRz/Lldrw/bV319TQWtyJYM+NBSzQ2ZJc33KlzzseBTO+YAXKyNTMAk5qyxjXnzKhZRT7RkyzPlKmngH2lfsU6eMsCCTB2sTF1dffz9uqVZ9bQYVd/yw/+IeVu/XZlT4T6vWfbp29CIhjHXOpprXGwQPhm8DKpiXtuGKYnmlpaR7wB1Gr3a9O0qgwEbYhj3x9BwvP9mrp6/D87jwDKG5aPv6N4U06KPf0sbfrziJx4Ooz8TEPPI8BjA=
- secure: Lrh6AxUp1yFdsB1XlvNHFk+5pOMGQR8bJadUtnqXsuk97ieINI5w/da6wBPIH4WkZBGpQr+uJLe10PTxDcaNeZOC1LcuSK+v5J88pSiFYi10BggYWC2Kb2XEVBjd9BHi/RxAkiHXziBEaqpuX2WcwY2hgAOU+rpt3M9U9SxDITXNG68PpVVqDJ7GSZvZeJZnLrjTPKLlFR8EkqrE23bTaGvzqn50fwk7U3n0F04slkmg2ORScWkgBSFmaATBbiSU9Pz7bB4KuGarNC0Q0eTeoZcThRVYVwse3oLnYLMXkUuIDF5QwDfA5HCC4ad5yXdVenwHZSPS/sSnRM+fVAwkU8CL7hFC9zX2X/fBExWet0LufaCh4L6pax3dKV2m6q3Uq9M1z8X33ry2xqS96rpdD4bo+FxYrzjyAotn46w4fPE7yb3YZgf+dbHTDfVjiPH70hIKUhKiyzyKMTwdT63WNIy1/qbREge4jPVXgnIM3/jAu0THf74cT+RwN4xQnt7a50Yn2c/I+37kO2B+4qkyh4p75eIfPXqak1vdDc9tUqxZa7lPdIkofT3jp7TaJ+4/OLf2OrpA2XFjx20el4/TdB9TiJtGv0qTrujY4wh5BALxGVoSEihj3ahkqV/FQ6RyWJsMggd3yoaING61nCkDXUvLk/44yzeYavNrUaMzWpc=
jobs:
include:
- stage: "Verify Packages"
name: AWSS3
julia: 1.0
os: linux
script:
- julia --project=tmps3 -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.add("AWSS3"); Pkg.test("AWSS3")'
- stage: "Verify Packages"
name: AWSSQS
julia: 1.0
os: linux
script:
- julia --project=tmpsqs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.add("AWSSQS"); Pkg.test("AWSSQS")'
- stage: "Online tests"
name: "EC2"
julia: 1.0
os: linux
before_install:
- pip install --user awscli
script:
- aws ssm get-parameter --region us-east-1 --name /public_ci/AWSCore/ec2_keyfile --query 'Parameter.Value' --output text --with-decryption > ec2.pem
- chmod 600 ec2.pem
- export KEYFILE=ec2.pem
# Tag with commit to be able to terminate later
- INSTANCE_ID=$(aws ec2 run-instances --region us-east-1 --launch-template LaunchTemplateName=AWSCoreEC2Template --tag-specifications "ResourceType=instance,Tags=[{Key=AWSCoreCommit,Value=$TRAVIS_COMMIT}]" --query 'Instances[0].InstanceId' --output text)
# Wait until UserData installs Julia
- aws ec2 wait instance-status-ok --region us-east-1 --instance-ids $INSTANCE_ID
- export EC2Ip=$(aws ec2 describe-instances --region us-east-1 --instance-ids $INSTANCE_ID --query 'Reservations[0].Instances[0].PublicIpAddress' --output text)
- |
julia -e '
using Distributed
addprocs(
["ec2-user@$(ENV["EC2Ip"])"],
sshflags=`-i $(ENV["KEYFILE"]) -o "StrictHostKeyChecking=no"`,
exename="/julia/bin/julia",
dir="/home/ec2-user",
tunnel=true,
)
@fetch @eval using Pkg
rev=ENV["TRAVIS_COMMIT"]
@fetch Pkg.add(PackageSpec(url="https://github.com/JuliaCloud/AWSCore.jl", rev=rev))
@fetch ENV["AWSCORE_INSTANCE_TYPE"]="EC2"
@fetch Pkg.build("AWSCore")
@fetch @eval using AWSCore
@fetch Pkg.test("AWSCore")
'
after_script:
- INSTANCE_ID=$(aws ec2 describe-instances --region us-east-1 --filter Name=tag:AWSCoreCommit,Values=$TRAVIS_COMMIT Name=instance-state-name,Values=running,pending --query 'Reservations[*].Instances[0].InstanceId' --output text)
- |
if [ "$INSTANCE_ID" ]; then
aws ec2 terminate-instances --region us-east-1 --instance-ids $INSTANCE_ID
aws ec2 wait instance-terminated --region us-east-1 --instance-ids $INSTANCE_ID
fi
after_success: skip
- stage: "Online tests"
name: "ECS"
julia: 1.0
os: linux
before_install:
- pip install --user awscli
script:
- id=$(aws batch submit-job --region us-east-1 --job-name $TRAVIS_COMMIT --job-definition AWSCore-ECS-00001-Job:2 --job-queue AWSCore-ECS-00001-JobQueue --container-overrides "environment=[{name=AWSCORE_BRANCH,value=$TRAVIS_COMMIT}]" --query jobId --output text)
- |
status=$(aws batch describe-jobs --region us-east-1 --jobs $id --query jobs[0].status --output text)
# If the query fails it will either return "None" or status won't be set
while [ "$status" ] && [ "$status" != "None" ] && [ "$status" != "FAILED" ] && [ "$status" != "SUCCEEDED" ]; do
echo "Waiting for job $id, status: $status..."
sleep 30
status=$(aws batch describe-jobs --region us-east-1 --jobs $id --query jobs[0].status --output text)
done
echo "Job $id finished, status: $status"
- |
# Get test output
logstream=$(aws batch describe-jobs --region us-east-1 --jobs $id --query jobs[0].container.logStreamName --output text)
if [ "$logstream" ]; then
aws logs get-log-events --region us-east-1 --log-group-name /aws/batch/job --log-stream-name $logstream --query events[*].message --output text | tr '\t' '\n'
fi
- test "$status" == "SUCCEEDED"
after_success: skip
- stage: "Documentation"
julia: 1.0
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- julia --project=docs/ docs/make.jl
after_success: skip