forked from PhoenicisOrg/phoenicis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
98 lines (91 loc) · 4 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
language: java
# avoid double builds on pull requests
branches:
only:
- master
jobs:
include:
# Check format
- stage: Basics
name: Check format
# do not use default install (runs formatter)
install: true
script: mvn -Pcheck-formatted validate formatter:validate
# Update translations
- stage: Basics
name: Update translations
install: true
script: mvn -Pupdate-translations validate
after_success:
# push translation updates only for master (PR changes must be committed to master before they are taken into account)
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./i18n/push_translations.sh; fi
# build + test
- stage: Build + test
name: Linux OpenJDK 11
os: linux
dist: trusty
jdk: openjdk11
- stage: Build + test
name: Linux OpenJDK 12
os: linux
dist: trusty
jdk: openjdk12
# packages
- stage: Packages
name: Flatpak
os: linux
dist: xenial
jdk: openjdk11
before_install:
- sudo add-apt-repository ppa:alexlarsson/flatpak -y
- sudo apt-get update -q
- sudo apt-get install -y flatpak flatpak-builder elfutils
script:
- mvn clean package -DskipTests # no need to run tests again
- flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- flatpak --user -y install flathub org.freedesktop.Platform/x86_64/18.08
- flatpak --user -y install flathub org.freedesktop.Sdk/x86_64/18.08
- flatpak --user -y install flathub org.freedesktop.Sdk.Extension.openjdk11/x86_64/18.08
- flatpak --user -y install flathub org.freedesktop.Platform.Compat.i386/x86_64/18.08
- flatpak --user -y install flathub org.freedesktop.Platform.GL32.nvidia-410-73/x86_64/1.4
- cd phoenicis-dist/src/flatpak/
- flatpak-builder build-dir org.phoenicis.playonlinux.yml --force-clean
- stage: Packages
name: deb
os: linux
dist: xenial
jdk: openjdk11
before_install:
- sudo apt-get update -q
- sudo apt-get install -y fakeroot
script:
- mvn clean package -DskipTests # no need to run tests again
- cd phoenicis-dist/src/scripts
- bash phoenicis-create-package.sh
- stage: Packages
name: dmg
os: osx
osx_image: xcode10.1
script:
- mvn clean package # run tests for OSX (doesn't run in 'build + test')
- cd phoenicis-dist/src/scripts
- bash phoenicis-create-package.sh
# Check GitHub Pages
- stage: Check GitHub Pages
env: NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
language: ruby
rvm:
- 2.5
before_install: cd docs
script:
- bundle exec jekyll build
- bundle exec htmlproofer ./_site --only-4xx --check-favicon --check-html --assume-extension
env:
global:
# to create secure for travis-ci.com
# 1. create personal access token with public_repo permissions
# 2. clone this repo (not a fork)
# 3. install travis gem (https://github.com/travis-ci/travis.rb)
# 4. run in the clone: travis encrypt GH_TOKEN="<access_token>" --pro (GH_TOKEN is the variable which is used e.g. in push_translations.sh)
# 5. set output below
- secure: "NNFWW2gm1hzMI2vLr8b7EuRz8u+eSk5FGoXDq0UZbdnmcnb/8Isx2sd8j73VSRN4LvRAnqFnZUuouFjVBeX+T8eUv4qL1z8QBz4nqS1ZrbYEwVFKEv/87RB7FfpvA+nqEzJv0Nq9jFLmkgBw2pji5xNkL23RABxm4kFO9zJRrlrWNJCAFxNI2Tzrw8RWuFuG49eH16BPOZfECcMzP16rBcpr0YZjcZ/p+yjUaz+IaOinQyHs/p45oPVF3XxSVLOODVsaVw7kxZxXZRCDz60ssCefTt6XlgR5J5blo6QGX1Y3bks25A2Jeivax+Lv2J5zrOBV8TgDDyj6+XP2HyxM91A7LFnOvA/iXjDZUgh8jGGmBnCpESq8b+Llymhy1i9nfGAAQYedq2/zNaiETOr+vakcgbITk1sPb9YxydB0RIyjnRnlwjxAjWTckxZCWQbFieODYBsGBZN8X9k/4iHsMkIHpEJ41BPGapOxjolIHD8sAqA3XlT0hR1nKjTUM08c/9JHyCZ1BAyiFvbsD/gT9oYFwhe/Im57N/WBBiXzkiElmJ3RogUyFuapKYuwOvCQvgpSP2weDgO0k9Q+Y1g4VH5I5aViR+G44kf4P7Dn2RvvI1n6mLDs9bki94WYWNBMwhRM+cmcrYCtW/dszSIr5W5ZzH0jHd/9VxiLV44mL7k="