forked from kscripting/kscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
72 lines (55 loc) · 2.18 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
language: bash
sudo: required
dist: trusty
#addons:
# apt:
# packages:
# - oracle-java8-installer
#jdk: oraclejdk8
#https://github.com/travis-ci/travis-ci/issues/6371
#before_install:
# - jdk_switcher use oraclejdk8
install:
# - sudo apt-get install oracle-java8-set-default
## see https://askubuntu.com/questions/190582/installing-java-automatically-with-silent-option
- sudo apt-get update
- sudo apt-get install -y python-software-properties
# - sudo add-apt-repository -y ppa:webupd8team/java
# - echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
# - sudo apt-get install -y oracle-java8-installer
- sudo add-apt-repository -y ppa:openjdk-r/ppa
- sudo apt-get update
- sudo apt-get install openjdk-8-jdk
# workaround for missing cacerts in openjdk
- sudo dpkg --purge --force-depends ca-certificates-java
- sudo apt-get install ca-certificates-java
# - sudo apt-get install -y openjdk-8-jdk
- sudo apt-get install -y curl unzip zip wget
## install sdkman (see http://sdkman.io/install.html)
- bash -c "curl -s "https://get.sdkman.io" | bash"
- source "/home/travis/.sdkman/bin/sdkman-init.sh"
## install kotlin and maven
# - bash -c 'source "/home/travis/.sdkman/bin/sdkman-init.sh"; yes | sdk install java 8u144-oracle'
# - bash -c 'source "/home/travis/.sdkman/bin/sdkman-init.sh"; yes | sdk install java 8u144-zulu'
# - sudo apt-get install -y openjdk-8-jdk
- sdk install maven
- sdk install kotlin
- sdk install gradle
## install assert.h
- wget https://raw.github.com/lehmannro/assert.sh/v1.1/assert.sh && chmod +x assert.sh
- export KSCRIPT_HOME="/home/travis/build/holgerbrandl/kscript"
- pwd
- export PATH=$KSCRIPT_HOME::$PATH
# build it
- cd $KSCRIPT_HOME && ./gradlew shadowJar
- which kscript
- which assert.sh
## does it run outside of test-suite?
- kscript --help
- java -version
- mvn --version
- kscript 'println("kotlin rocks")'
- kscript ${KSCRIPT_HOME}/test/resources/multi_line_deps.kts
# - resdeps.kts org.org.docopt:org.docopt:0.6.0-SNAPSHOT log4j:log4j:1.2.14
# - kscript ${KSCRIPT_HOME}/test/resources/multi_line_deps.kts
script: ./test/test_suite.sh