forked from scalapb/ScalaPB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (74 loc) · 2.47 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
language: scala
dist: xenial
jdk: oraclejdk11
stages:
- name: test
- name: release
if: (branch = master AND type = push AND repo = "scalapb/ScalaPB") OR (tag IS present)
scala:
- 2.11.12
- 2.12.9
- 2.13.0
env:
- TEST_SCRIPT=e2e.sh E2E_SHADED=0
- TEST_SCRIPT=e2e.sh E2E_SHADED=1
- TEST_SCRIPT=mima.sh
- TEST_SCRIPT=proptest.sh
jobs:
include:
#- env: SCALA_NATIVE
# scala: 2.11.12
# before_install:
# - sudo apt-get update
# - curl https://raw.githubusercontent.com/scala-native/scala-native/master/scripts/travis_setup.sh | bash -x
# script:
# - sbt ++2.11.12 runtimeNative/test lensesNative/test
- env: EXAMPLES_AND_FORMATTING
scala: 2.11.12
script:
- for d in examples/*; do cd "$d" && sbt test && cd ../..; done
- sbt -J-Xmx4500M ++2.11.12 scalafmtCheck test:scalafmtCheck
- ./test_generated_code_checked_in.sh
- stage: release
env: UPDATE_DOCS
scala: 2.11.12
script: skip # we use a scripted deploy to have before_deploy run first.
deploy:
- provider: script
script: .travis/push_website.sh
- stage: release
if: tag IS present
scala: 2.11.12
env: DEPLOY_SCALAPBC
script: sbt -J-Xmx4500M ++2.11.12 scalafmtCheck test:scalafmtCheck universal:packageBin
deploy:
- provider: releases
on:
tags: true
repo: scalapb/ScalaPB
api_key:
secure: ZHv5KXgAHNvO6ZS2cv5SdQ43UMjcc1Bm7p9Q66z4NJoLNq5SY/Ln9ZFeUgoBMv+1SPvzL0GRWLxBxa4UYuFgFwRywlU8hQ1GF0ztZ35bvZUrFvTWp4sM62sdmSogHFDmgpG58IPNeQSPcZ+sYFhlWzvAz9hUCXzPPu6jeZSanew=
file: scalapbc/target/universal/scalapbc-${TRAVIS_TAG:1}.zip
skip_cleanup: true
# These directories are cached to S3 at the end of the build
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/1.0
- $HOME/.sbt/boot
script:
- ./$TEST_SCRIPT
after_failure:
- test $TEST_SCRIPT = "proptest.sh" && cat /tmp/protos.tgz | openssl enc -base64
- echo Use base64 -d to get a tgz with the failing protos.
before_cache:
# Tricks to avoid unnecessary cache updates
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete
before_deploy:
- git config --global user.name "$USER"
- git config --global user.email "$TRAVIS_BUILD_NUMBER@$TRAVIS_COMMIT"
- openssl aes-256-cbc -K $encrypted_b42a4ae1e9e5_key -iv $encrypted_b42a4ae1e9e5_iv -in .travis/travis-deploy-key.enc -out .travis/travis-deploy-key -d
- chmod 600 .travis/travis-deploy-key
- eval "$(ssh-agent -s)"
- ssh-add .travis/travis-deploy-key