1 | # For some special functionality you'll need to set some environment variables in Travis (https://docs.travis-ci.com/user/environment-variables#Defining-Variables-in-Repository-Settings).
|
---|
2 | #
|
---|
3 | # If you want to deploy to GitHub releases (when a git-tag is built):
|
---|
4 | # - set `DEPLOY_GITHUB_RELEASES` to true
|
---|
5 | # - set `GH_TOKEN` to one of your personal access tokens from GitHub (https://help.github.com/articles/creating-an-access-token-for-command-line-use/), disable displaying the value in the build log!
|
---|
6 | #
|
---|
7 | # If you want to send build information to sonarqube.com (when on master):
|
---|
8 | # - set `SUBMIT_TO_SONARQUBE` to true
|
---|
9 | # - set `SONAR_TOKEN` to one of your user tokens from sonarqube.com (http://docs.sonarqube.org/display/SONAR/User+Token), disable displaying the value in the build log!
|
---|
10 | #
|
---|
11 | # If you want to publish the build results onto the gh-pages branch (when on master):
|
---|
12 | # - set `PUBLISH_GH_PAGES` to true
|
---|
13 | # - set `GH_TOKEN` to one of your personal access tokens from GitHub (https://help.github.com/articles/creating-an-access-token-for-command-line-use/), disable displaying the value in the build log!
|
---|
14 | # - set `GH_USERNAME` to the GitHub username to which the personal access token belongs
|
---|
15 |
|
---|
16 | sudo: false
|
---|
17 | dist: trusty
|
---|
18 |
|
---|
19 | cache:
|
---|
20 | directories:
|
---|
21 | - $HOME/.gradle/caches
|
---|
22 |
|
---|
23 | language: java
|
---|
24 | jdk:
|
---|
25 | - openjdk8
|
---|
26 | - oraclejdk8
|
---|
27 | - oraclejdk9
|
---|
28 |
|
---|
29 | install: ./gradlew --build-cache assemble
|
---|
30 | before_script: # init GUI for tests that can't run headless (https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI)
|
---|
31 | - "export DISPLAY=:99.0"
|
---|
32 | - "sh -e /etc/init.d/xvfb start"
|
---|
33 | - sleep 3
|
---|
34 | script: ./.travis/script
|
---|
35 | # Deploy to GitHub pages
|
---|
36 | after_script: ./.travis/after_script
|
---|
37 | # Upload code coverage data
|
---|
38 | after_success: ./.travis/after_success
|
---|
39 | # Release the plugin via GitHub releases when pushing a tag
|
---|
40 |
|
---|
41 | deploy:
|
---|
42 | provider: releases
|
---|
43 | file_glob: true
|
---|
44 | api_key: "${GH_TOKEN}"
|
---|
45 | file:
|
---|
46 | - "build/dist/Mapillary.jar"
|
---|
47 | - "build/tmp/jar/MANIFEST.MF"
|
---|
48 | skip_cleanup: true
|
---|
49 | on:
|
---|
50 | condition: "$DEPLOY_GITHUB_RELEASES = true"
|
---|
51 | tags: true
|
---|
52 | jdk: openjdk8
|
---|
53 |
|
---|
54 | jobs:
|
---|
55 | include:
|
---|
56 | - stage: i18n
|
---|
57 | language: python
|
---|
58 | python: "3.6"
|
---|
59 | install: pip install git+https://github.com/transifex/transifex-client.git@08deb1255de7217d2574e3c49dcb578f03b195e0#egg=transifex-client
|
---|
60 | script: ./gradlew generatePot
|
---|
61 | after_success: |
|
---|
62 | if [ ! -z "$TRANSIFEX_TOKEN" ]; then
|
---|
63 | tx --token="$TRANSIFEX_TOKEN" --force-save --no-interactive init
|
---|
64 | git checkout HEAD .tx/config
|
---|
65 | tx push -s --no-interactive
|
---|
66 | fi
|
---|
67 |
|
---|
68 | stages:
|
---|
69 | - test
|
---|
70 | - name: i18n
|
---|
71 | if: branch = master
|
---|
72 |
|
---|
73 | matrix:
|
---|
74 | fast_finish: true
|
---|
75 | allow_failures:
|
---|
76 | - jdk: oraclejdk9
|
---|
77 | - language: python
|
---|
78 |
|
---|