-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
49 lines (49 loc) · 1.32 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
sudo: false
dist: trusty
language: rust
rust:
- stable
- beta
- nightly
env:
matrix:
- JDK=oraclejdk8
- JDK=openjdk8
before_script:
- ./ci/install-java.sh
- jdk_switcher use $JDK
# jdk_switcher doesn't set JAVA_HOMe correctly for manually installed openjdk8.
- if [[ "$JDK" == "openjdk8" ]]; then export JAVA_HOME="$JAVA_HOME-amd64"; fi
- echo $JAVA_HOME
# TODO(https://github.com/rust-lang/cargo/issues/4895): remove this.
- export LD_LIBRARY_PATH="$JAVA_HOME/jre/lib/amd64/server"
- echo $LD_LIBRARY_PATH
install:
- rustup component add rustfmt
script:
- find /usr/lib -name "libjvm.so"
- echo $JAVA_HOME
- echo $LD_LIBRARY_PATH
- ls $LD_LIBRARY_PATH/libjvm.so
- ci/check-format.sh
- ci/test.sh
jobs:
include:
- stage: "Test release versions of all crates"
if: fork = false AND branch = master AND commit_message ~= /!sudo publish (rust-jni)/
rust: nightly
jdk: java-1.8.0-openjdk-amd64
before_script:
- jdk_switcher use $JDK
script:
- ci/test.sh
- cargo package
- stage: "Publish rust-jni"
if: fork = false AND branch = master AND commit_message ~= /!sudo publish rust-jni/
rust: stable
jdk: java-1.8.0-openjdk-amd64
script:
- cargo login $CARGO_TOKEN
- cargo publish
notifications:
email: false