-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
61 lines (55 loc) · 2.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
#language: java
#jdk:
# - openjdk11
jobs:
include:
- os: linux
env: JAVA_HOME="$HOME/.sdkman/candidates/java/current"
- os: osx
env: JAVA_HOME="$HOME/.sdkman/candidates/java/current"
- os: windows
language: shell
env: JAVA_HOME="$HOME/.sdkman/candidates/java/current"
before_install:
- if [ $TRAVIS_OS_NAME = windows ]; then choco install zip unzip ; fi
# adding $HOME/.sdkman to cache would create an empty directory, which interferes with the initial installation
- "[[ -d $HOME/.sdkman/ ]] && [[ -d $HOME/.sdkman/bin/ ]] || rm -rf $HOME/.sdkman/"
- curl -sL https://get.sdkman.io | bash
- mkdir -p "$HOME/.sdkman/etc/"
- echo sdkman_auto_answer=true > "$HOME/.sdkman/etc/config"
- echo sdkman_auto_selfupdate=true >> "$HOME/.sdkman/etc/config"
- ls "$HOME/.sdkman"
- "source $HOME/.sdkman/bin/sdkman-init.sh"
install:
# - if [ $TRAVIS_OS_NAME = windows ]; then choco install windows-sdk-7.1 kb2519277 zip unzip; fi
- sdk current java
- echo $JAVA_HOME
- sdk current java | grep '19.3.0.2.r11-grl' || sdk install java 19.3.0.2.r11-grl
- env
- echo $JAVA_HOME
- ls $JAVA_HOME/bin/
- if [ $TRAVIS_OS_NAME != windows ]; then gu install native-image ; fi
- if [ $TRAVIS_OS_NAME != windows ]; then native-image --version ; fi
before_script:
- chmod +x mvnw
script:
- java -version
- ./mvnw --version; ./mvnw -DbuildArgs=${BUILD_ARGS} clean verify
- if [ $TRAVIS_OS_NAME = windows ]; then "$JAVA_HOME/bin/jar.exe" -cMvf target/checksum-$TRAVIS_OS_NAME.zip target/picocli-native-image-maven-demo.exe ; fi
- if [ $TRAVIS_OS_NAME != windows ]; then zip -v target/picocli-native-image-maven-demo-$TRAVIS_OS_NAME.zip target/picocli-native-image-maven-demo ; fi
# Deploy the resulting artifact to GitHub Releases
#deploy:
# provider: releases
# api_key: "GITHUB OAUTH TOKEN"
# file: build/graal/checksum-$TRAVIS_OS_NAME.zip
# skip_cleanup: true
# on:
# tags: true
# avoid uploading the cache after every build
#before_cache:
# - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
# - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
#cache:
# directories:
# - $HOME/.gradle/caches/
# - $HOME/.gradle/wrapper/