Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
2828b7b
Initial travis config
dbd64 Apr 13, 2019
ff1b3cf
Change tar to tar -x. Add before_script git lfs pull
dbd64 Apr 13, 2019
a718b11
Try on OSX
dbd64 Apr 13, 2019
d9dc1ad
Fix indent
dbd64 Apr 13, 2019
3a35b35
Try JDK 9, 8 not supported on OSX
dbd64 Apr 13, 2019
99314ff
Try JDK 10, 8 not supported on OSX
dbd64 Apr 13, 2019
0efc979
Try open JDK 10
dbd64 Apr 13, 2019
3383298
Try different curl command
dbd64 Apr 13, 2019
b5d39b6
Try osx_image 9.4 to use clang 5
dbd64 Apr 13, 2019
b906735
Try to fix tar command
dbd64 Apr 13, 2019
3acc64e
Try to fix tar command
dbd64 Apr 13, 2019
2219d7f
Try to fix tar command
dbd64 Apr 13, 2019
9674bb5
Try to fix tar command
dbd64 Apr 13, 2019
cac70fe
Try to fix gc build
dbd64 Apr 13, 2019
c3559cf
Try to fix gc build by installing libatomic_ops
dbd64 Apr 13, 2019
2be7e54
Try to fix gc build
dbd64 Apr 13, 2019
817919d
Install git lfs
dbd64 Apr 13, 2019
53d40b8
Set jdk 7
dbd64 Apr 13, 2019
33669cd
Set jdk7 env variable
dbd64 Apr 13, 2019
9e248f4
fix jdk
dbd64 Apr 13, 2019
15804a8
fix jdk
dbd64 Apr 13, 2019
7ead65c
install ant
dbd64 Apr 13, 2019
e654f5e
fix install ant
dbd64 Apr 13, 2019
b981523
Install llvm 5
dbd64 Apr 13, 2019
8575c47
Fix Install llvm 5
dbd64 Apr 13, 2019
23b56be
Add llvm5 to path
dbd64 Apr 13, 2019
271a97c
Try JDK 8 again
dbd64 Apr 13, 2019
d0eb23e
Try installing zulu JDK 7
dbd64 Apr 13, 2019
31fb484
Try installing ant 1.9
dbd64 Apr 13, 2019
3a6c282
cache homebrew directory
dbd64 Apr 14, 2019
d2622e3
try sudo make...
dbd64 Apr 14, 2019
647f711
try sudo make...
dbd64 Apr 14, 2019
5a17bc0
try using old version of xcode for jdk 8
dbd64 Apr 14, 2019
6211e18
try using (slightly less) old version of xcode for jdk 8
dbd64 Apr 14, 2019
ea7fc2c
try adding jdk option back...
dbd64 Apr 14, 2019
a08296b
try setting jdk again...
dbd64 Apr 14, 2019
cabf054
try setting jdk in before_script with java_home command (to 1.7)
dbd64 Apr 14, 2019
d2bb54d
[Debug] list installed jdks
dbd64 Apr 14, 2019
0bd288a
change java home to 1.8
dbd64 Apr 14, 2019
620c17a
Try java 1.7
dbd64 Apr 14, 2019
6b6e670
Revert "Try java 1.7"
dbd64 Apr 14, 2019
ed7601e
Try adding _JVM_GetClassTypeAnnotations to stubs
dbd64 Apr 14, 2019
0f751b1
Move JVM_GetClassTypeAnnotations to runtime instead of stubs
dbd64 Apr 14, 2019
ca3fff6
Try adding Java_java_io_FileSystem_getFileSystem to jdk stubs
dbd64 Apr 14, 2019
52337d2
Try adding Java_java_io_FileSystem_getFileSystem to jdk stubs without…
dbd64 Apr 14, 2019
f66f6b7
[DEBUG]Print stack trace for Java_java_io_FileSystem_getFileSystem
dbd64 Apr 14, 2019
9fc2d58
Try to enable linux build...
dbd64 Apr 14, 2019
9058b43
Try to enable linux build...(fix syntax in travis)
dbd64 Apr 14, 2019
496e5c6
Try to narrow down apt-get failure
dbd64 Apr 14, 2019
8fb77ba
Try to install llvm 5 from apt repo
dbd64 Apr 14, 2019
cb8b236
Add if case to try and fix osx build
dbd64 Apr 14, 2019
82058a2
Try to use trusty llvm...
dbd64 Apr 14, 2019
82d3a16
do different things based on linux and osx
dbd64 Apr 14, 2019
308b39b
Try to fix llvm install
dbd64 Apr 14, 2019
84b5092
Try to fix env vars
dbd64 Apr 14, 2019
8b5d4dc
Try to fix llvm
dbd64 Apr 14, 2019
3b2e959
Try to fix llvm
dbd64 Apr 14, 2019
8407b7e
Try to fix llvm sourceline
dbd64 Apr 14, 2019
7231a4a
fix for linux
dbd64 Apr 15, 2019
06010c8
try tar xfvw for linux
dbd64 Apr 15, 2019
d33e6c7
try wget for linux
dbd64 Apr 15, 2019
2588e0e
try xzf again for linux
dbd64 Apr 15, 2019
463c63e
add libatomic_ops to apt
dbd64 Apr 15, 2019
7e6ec66
add libatomic_ops_dev to apt
dbd64 Apr 15, 2019
748d861
add git_lfs to apt
dbd64 Apr 15, 2019
181eac2
add git_lfs sourceline to apt
dbd64 Apr 15, 2019
56a9d13
add git_lfs
dbd64 Apr 15, 2019
e9103ea
add git_lfs amd64
dbd64 Apr 15, 2019
7a30a48
add git_lfs apt-get manual
dbd64 Apr 15, 2019
61e6a5c
Fix java_home call to only osx
dbd64 Apr 15, 2019
8e01a24
Fix java_home call for JDK7
dbd64 Apr 15, 2019
246293b
Try setting clang_version=5.0
dbd64 Apr 15, 2019
dd7443d
Try -s for ant makefile
dbd64 Apr 15, 2019
eb5fdc4
Revert "Try -s for ant makefile"
dbd64 Apr 15, 2019
e481f6d
Try install ant 1.9
dbd64 Apr 15, 2019
3b19eca
Try fix install ant 1.9
dbd64 Apr 15, 2019
ce83e2d
Try fix install ant 1.9
dbd64 Apr 15, 2019
b1c9f5e
Try fix install ant 1.9.14
dbd64 Apr 15, 2019
98f0a83
[DEBUG] ant -version
dbd64 Apr 15, 2019
6a18c52
Remove unneeded getFileSystem stub. Always run make tests
dbd64 May 15, 2019
90f0662
Add export for JDK=jdk. Print environment before running make and mak…
dbd64 May 15, 2019
8a31591
See what JDKs are installed
dbd64 May 15, 2019
afb3817
Try fix for linux ant issue. Only run tests under linux, OSX does not…
dbd64 May 19, 2019
e5f4d76
Add llvm jar for ubuntu 12.04. Update jlangc to pick it up (note this…
dbd64 Jul 14, 2019
aa19203
Merge branch 'travis-ci' of https://github.com/dbd64/JLang into travi…
dbd64 Jul 14, 2019
3ca5bf3
Add compiler class path option to jlangc. Update isolated tests makef…
dbd64 Jul 14, 2019
32fa670
Update makefiles to fix travis build of runtime
dbd64 Jul 14, 2019
b8d6e61
Add fix for additional jlang options
dbd64 Jul 14, 2019
1e41a5b
add some logging
dbd64 Jul 22, 2019
94b7d23
Try using ifdef for travis variable
dbd64 Jul 22, 2019
c3ea616
Remove logging
dbd64 Jul 22, 2019
4a05880
Add travis support to tests makefile
dbd64 Jul 22, 2019
ab89308
Fix Ubuntu jar path for tests
dbd64 Jul 22, 2019
15d4238
Cleanup travis yaml file
dbd64 Jul 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
language: java
jdk:
- oraclejdk8

cache:
directories:
- /usr/local/Homebrew

env: BOEHM_VERSION=7.6.4

addons:
homebrew:
packages:
- llvm@5
- git-lfs
- ant@1.9
- libatomic_ops
update: true
apt:
sources:
- llvm-toolchain-trusty-5.0
- llvm-toolchain-trusty-6.0
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'ppa:git-core/ppa'
packages:
- clang-5.0 llvm-5.0 llvm-5.0-dev libllvm5.0 libstdc++6 libclang-common-5.0-dev libclang1-5.0 llvm-5.0-runtime libllvm5.0 libstdc++6 libllvm5.0
- libatomic-ops-dev

matrix:
include:
- os: osx
compiler: clang
osx_image: xcode9.3

- os: linux
dist: precise

install:
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
# Install git lfs
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs

# Install ant 1.9.14
wget https://www-us.apache.org/dist//ant/binaries/apache-ant-1.9.14-bin.tar.gz
sudo tar -xzf apache-ant-1.9.14-bin.tar.gz
export PATH=$(pwd)/apache-ant-1.9.14/bin:${PATH}

# Download Boehm GC
wget http://www.hboehm.info/gc/gc_source/gc-${BOEHM_VERSION}.tar.gz
sudo tar -xzf gc-${BOEHM_VERSION}.tar.gz
else
# Add llvm 5 to the path
export PATH="/usr/local/opt/llvm@5/bin:$PATH"

#Add ant 1.9 to the path
export PATH="/usr/local/opt/ant@1.9/bin:$PATH"

#Download Boehm GC
curl -OL http://www.hboehm.info/gc/gc_source/gc-${BOEHM_VERSION}.tar.gz
sudo tar -xzf gc-${BOEHM_VERSION}.tar.gz
fi

# Install Boehm GC
- sudo tar -xzf gc-${BOEHM_VERSION}.tar.gz
- cd gc-${BOEHM_VERSION}
- sudo ./configure
- sudo make
- sudo make install

before_script:
- cd ${TRAVIS_BUILD_DIR}
- git lfs pull
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
export JDK7=/usr/lib/jvm/java-7-oracle
export CLANG_VERSION=5.0
else
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
export JDK7=$(/usr/libexec/java_home -v 1.8)
export JDK=jdk
fi

script:
- |
make
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
make tests
fi
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ POLYGLOT := lib/polyglot/
JAVACPP_PRESETS := lib/javacpp-presets/
SUBMODULES := $(addsuffix .git,$(POLYGLOT) $(JAVACPP_PRESETS))

# Setup variables for travis CI
ifdef TRAVIS
ADDITIONAL_JLANGC_OPTIONS:=-compiler-classpath $(realpath lib/llvm-linux-x86_64-Ubuntu12.04.jar)
endif

# JLang
export PLC := $(realpath bin/jlangc)
export PLC := $(realpath bin/jlangc) $(ADDITIONAL_JLANGC_OPTIONS)

# Hack to allow dependency on PolyLLVM source.
export PLC_SRC := $(realpath $(shell find compiler/src -name "*.java"))
Expand Down
8 changes: 7 additions & 1 deletion bin/jlangc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fixpath() {
}

extra_cp=
extra_compiler_cp=
args=
vmargs=
java=java
Expand All @@ -47,6 +48,11 @@ while true; do
extra_cp="$extra_cp:$1"
shift
;;
-compiler-classpath)
shift
extra_compiler_cp="$extra_compiler_cp:$1"
shift
;;
-j)
shift
vmargs="$vmargs '$1'"
Expand All @@ -68,7 +74,7 @@ while true; do
esac
done

compiler_classpath="$dir/compiler/classes:$dir/lib/polyglot/lib/java_cup.jar:$dir/lib/polyglot/lib/polyglot.jar:$dir/lib/llvm.jar:$dir/lib/javacpp.jar:$dir/lib/llvm-macosx-x86_64.jar:$dir/lib/llvm-linux-x86_64.jar"
compiler_classpath="$dir/compiler/classes:$dir/lib/polyglot/lib/java_cup.jar:$dir/lib/polyglot/lib/polyglot.jar:$dir/lib/llvm.jar:$dir/lib/javacpp.jar:$extra_compiler_cp:$dir/lib/llvm-macosx-x86_64.jar:$dir/lib/llvm-linux-x86_64.jar"
runtime_classpath="$dir/runtime/out/classes"
runtime_classpath="$runtime_classpath:$extra_cp"

Expand Down
1 change: 1 addition & 0 deletions jdk/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// missing for various (usually unknown) reasons.
#include <cstdio>
#include <cstdlib>
#include <execinfo.h>
#include "jni.h"

extern "C" {
Expand Down
Binary file added lib/llvm-linux-x86_64-Ubuntu12.04.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions runtime/native/jvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1499,4 +1499,9 @@ JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size) {
// JvmIgnore("JVM_GetVersionInfo");
}

void
JVM_GetClassTypeAnnotations(){
JvmUnimplemented("JVM_GetClassTypeAnnotations");
}

} // extern "C"
3 changes: 3 additions & 0 deletions runtime/native/jvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,4 +646,7 @@ typedef struct {
void
JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size);

void
JVM_GetClassTypeAnnotations();

} // extern "C"
9 changes: 7 additions & 2 deletions tests/isolated/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ JDK_CLASSES := $(realpath $(JDK)/out/classes)
JDK7 ?= /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/
endif

# Setup variables for travis CI
ifdef TRAVIS
ADDITIONAL_JLANGC_OPTIONS:=-compiler-classpath $(realpath $(BASE_DIR)/lib/llvm-linux-x86_64-Ubuntu12.04.jar)
endif

SRC := $(shell find * -name "*.java")

CLASSES := $(SRC:.java=.class)
Expand Down Expand Up @@ -69,12 +74,12 @@ $(SOL): $(SRC)

$(LL): $(SRC)
@echo "Compiling $(words $?) Java file(s) down to LLVM IR"
@$(BASE_DIR)/bin/jlangc -cp $(JDK_CLASSES) -assert $?
@$(BASE_DIR)/bin/jlangc $(ADDITIONAL_JLANGC_OPTIONS) -cp $(JDK_CLASSES) -assert $?
@touch $(LL)

%.ll: %.java
@echo "Compiling file to LLVM IR"
@$(BASE_DIR)/bin/jlangc -cp $(JDK_CLASSES) -assert $?
@$(BASE_DIR)/bin/jlangc $(ADDITIONAL_JLANGC_OPTIONS) -cp $(JDK_CLASSES) -assert $?

%.binary: %.ll
@echo "Creating binary for $<"
Expand Down