forked from opencast/opencast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
153 lines (141 loc) · 5.16 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
sudo: true
language: java
jdk: oraclejdk8
# Cache maven artifacts, pip downloads and the node modules for markdownlint
cache:
directories:
- ~/.m2
- ~/.cache/pip
- docs/guides/node_modules/
# Do not cache the opencast artifacts to detect dependency problems
before_cache:
- rm -rf ~/.m2/repository/org/opencastproject
- sudo chown -R travis:travis ~/.m2 ~/.cache/pip docs/guides/node_modules/
# Shorten some commands
# - A simple download command for synfig packages
# - A maven command with logging settings and multithreading.
#
# The number of threads are intentionally set to two times the number of CPU cores since Opencast spends a lot of time
# waiting with no CPU usage.
before_install:
- shopt -s expand_aliases
- alias get_synfig='wget -q -O ~/.m2/synfigstudio-1.0.2.deb'
- alias mvn='mvn --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
# Default dependency installation
install:
- sudo apt-get -qq update
- >
sudo apt-get install -y
bzip2
gzip
hunspell
hunspell-de-de
procps
sox
tar
tesseract-ocr
tesseract-ocr-deu
unzip
- mkdir -p ~/.m2 ~/bin
- wget -q https://pkg.opencast.org/bin/ffmpeg-release-64bit-static.tar.xz
- tar xf ffmpeg-release-64bit-static.tar.xz
- mv ffmpeg-*/ff* ~/bin/
- >
test -f ~/.m2/synfigstudio-1.0.2.deb ||
get_synfig https://mvncache.opencast.org/nexus/content/repositories/thirdparty/org/synfig/synfigstudio/1.0.2/synfigstudio-1.0.2.deb ||
get_synfig https://nexus.opencast.org/nexus/content/repositories/thirdparty/org/synfig/synfigstudio/1.0.2/synfigstudio-1.0.2.deb ||
get_synfig https://netix.dl.sourceforge.net/project/synfig/releases/1.0.2/linux/synfigstudio_1.0.2_amd64.deb
- sudo dpkg -i ~/.m2/synfigstudio-1.0.2.deb
jobs:
include:
# Test documentation in Python environment (Travis docker container)
# - Ensure no tabs are used
# - Ensure there are no trailing spaces
# - Run markdownlint
- stage: quick tests
env: name=documentation
sudo: false
language: python
python: "3.6"
install:
- pip install mkdocs
- (cd docs/guides && npm install)
script:
- (! grep -rn ' ' modules assemblies pom.xml --include=pom.xml)
- (! grep -rn ' $' modules assemblies pom.xml --include=pom.xml)
- (! grep -rn ' ' etc)
- (! grep -rn ' $' etc)
- >
( cd docs/guides/admin &&
mkdocs build > mkdocs.log 2>&1 &&
! grep 'WARNING.*Documentation file' mkdocs.log &&
! grep 'pages exist in the docs directory' mkdocs.log &&
cat mkdocs.log )
- >
( cd docs/guides/user &&
mkdocs build > mkdocs.log 2>&1 &&
! grep 'WARNING.*Documentation file' mkdocs.log &&
! grep 'pages exist in the docs directory' mkdocs.log &&
cat mkdocs.log )
- >
( cd docs/guides/developer &&
mkdocs build > mkdocs.log 2>&1 &&
! grep 'WARNING.*Documentation file' mkdocs.log &&
! grep 'pages exist in the docs directory' mkdocs.log &&
cat mkdocs.log )
- (cd docs/guides && grunt)
# Test database scripts with MariaDB 10.x
- stage: quick tests
env: name=mariadb10
sudo: false
addons:
mariadb: '10.3'
install:
- echo "select version()" | mysql -u root
- echo 'create database opencast;' | mysql -u root
script:
- mysql -u root opencast < docs/scripts/ddl/mysql5.sql
- sh docs/upgrade/.test.sh
# Test database scripts with MySQL
- stage: quick tests
env: name=mysql
sudo: false
services:
- mysql
install:
- echo "select version()" | mysql -u root
- echo 'create database opencast;' | mysql -u root
script:
- mysql -u root opencast < docs/scripts/ddl/mysql5.sql
- ./docs/upgrade/.test.sh
# Make a build excluding the assembly steps
- stage: build
env: name=build
script:
- mvn clean install -Pnone
# Make a simple build to generate all Opencast artifacts while excluding as many checks as possible since we do a
# proper test in parallel anyway. Then run `mvn site` to generate Javadocs. We exclude checkstyle and tests since
# they are run separately. For now, we also exclude pmd and cpd since we are not doing anything with their report.
- stage: build
env: name=site
before_script:
- mvn install -DskipTests=true -Dcheckstyle.skip=true -P "none,!frontend"
script:
- >
mvn site -Daggregate=true site:stage "-DstagingDirectory=$(pwd)/site" \
-P "none,!frontend" \
-DskipTests=true \
-Dcheckstyle.skip=true \
-Dpmd.skip=true \
-Dcpd.skip=true
# Deploy translation keys to Crowdin if we are on develop or one of the release branches
- stage: deployment
env: name=crowdin
install: skip
script: skip
deploy:
provider: script
script: bash .upload-crowdin.sh
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^develop|r/