-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
65 lines (60 loc) · 2.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
# use Java and non-root
language: Java
jdk: oraclejdk8
# define a global variable for integrating with CodeCov.io
env:
global:
- CODECOV_TOKEN="fb57b005-b6e1-4c5a-ae4c-5e30d6fdcac4"
# install the Markdown linting program called mdl
# ignore the virtualenv that Travis creates
before_install:
- gem install mdl
# download gradle as a zip file
# gradle-5.3.1
- wget https://services.gradle.org/distributions/gradle-5.3.1-bin.zip
- unzip -d $HOME gradle-5.3.1-bin.zip
# delete the downloaded file
- rm -rf gradle-5.3.1-bin.zip
# add gradle bin to path at the beginning to ensure it overwrites old gradle
- export PATH="$HOME/gradle-5.3.1/bin:$PATH"
# switch to Python 3.6.3 globally, install python dependencies
- pyenv global 3.6.3
- pip install --upgrade pip
- pip install proselint
- pip install pipenv
# do not allow Travis to use standard error for debugging purposes
- unset _JAVA_OPTIONS
# cache to improve build speed
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.pip-cache/
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# run checks on the README file with mdl and proselint
# "gradle build" will build the tool
# "gradle check": run checkstyle to assess code quality
# "gradle clean": clean the project of all derived files
# "gradle build": create the bytecode from the source code
# "gradle runSPECIFICTASK": run the program and produce output
# "gradle cleanTest": clean the JUnit test suite of derived files
# "gradle test": run the JUnit test suite and produce report
script:
# lint the assignment's documentation
- mdl README.md
- proselint README.md
- gradle --version
- gradle clean
- gradle check
- gradle build
- gradle runQuadratic
- gradle runAllZeros
- gradle runOneMax
- gradle runStringOptimization
- gradle runQuadratic --args='GeometricSearch'
- gradle runQuadratic --args='LatticeSearch'
- gradle jacocoTestReport
after_success:
- bash <(curl -s https://codecov.io/bash)