Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b895022ca293
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3449da254389
Choose a head ref
  • 3 commits
  • 7 files changed
  • 1 contributor

Commits on May 27, 2016

  1. 1
    Copy the full SHA
    f9d5356 View commit details
  2. Copy the full SHA
    56e4a85 View commit details
  3. Copy the full SHA
    3449da2 View commit details
Showing with 108 additions and 50 deletions.
  1. +6 −7 .travis.yml
  2. +12 −7 ci.hocon
  3. +29 −25 core/pom.rb
  4. +1 −0 maven/BUILD-PACK
  5. +32 −9 tool/jt.rb
  6. +20 −0 tool/travis-install.sh
  7. +8 −2 tool/{travis_runner.sh → travis-script.sh}
13 changes: 6 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -90,6 +90,10 @@ matrix:
jdk: oraclejdk8
- env: JT=check_ambiguous_arguments SKIP_BUILD=true
jdk: oraclejdk8
- env:
- USE_BUILD_PACK=yes
- JT='test fast'
jdk: oraclejdk8
allow_failures:
- env: PHASE='-Prake -Dtask=test:mri:fullint'
- env: JT='test mri'
@@ -110,13 +114,8 @@ branches:
- /^ha-feature/
- ruby-2.4

script: tool/travis_runner.sh
install: |
if [[ -n "$PHASE" && $JAVA_HOME == *"java-8"* ]]; then
travis_retry ./mvnw package -B --projects '!truffle' -Dinvoker.skip -Dmaven.test.skip;
else
if [ -z "$SKIP_BUILD" ]; then travis_retry ./mvnw package -B -Dinvoker.skip -Dmaven.test.skip; fi
fi
install: travis_retry tool/travis-install.sh
script: tool/travis-script.sh

notifications:
irc:
19 changes: 12 additions & 7 deletions ci.hocon
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
jt: [ruby, tool/jt.rb]

common-setup: [
[rm, -rf, mx.jruby],
[mx, sclone, --kind, git, "https://github.com/jruby/jruby-build-pack.git", jruby-build-pack],
[cp, bin/jruby.bash, bin/jruby],
[chmod, +x, bin/jruby],
${jt} [build, --offline]
]

common: {
packages: {
git: ">=1.8.3"
@@ -10,20 +18,17 @@ common: {
}

environment: {
CI: "true"
CI: "true",
JRUBY_NO_ANT: "true"
}

setup: [
${jt} [build]
]
setup: ${common-setup}

timelimit: "30:00"
}

graal-core: {
setup: [
${jt} [bootstrap],
[rm, -rf, mx.jruby],
setup: ${common-setup} [
[mkdir, graal-workspace],
[cd, graal-workspace],
[mx, sclone, --kind, git, "https://github.com/graalvm/graal-core.git", graal-core],
54 changes: 29 additions & 25 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -287,39 +287,43 @@
end
end

jruby_bin_config = [ 'run', { :id => 'copy',
'tasks' => {
'exec' => {
'@executable' => '/bin/sh',
'@osfamily' => 'unix',
'arg' => {
'@line' => '-c \'cp "${jruby.basedir}/bin/jruby.bash" "${jruby.basedir}/bin/jruby"\''
unless ENV['JRUBY_NO_ANT']

jruby_bin_config = [ 'run', { :id => 'copy',
'tasks' => {
'exec' => {
'@executable' => '/bin/sh',
'@osfamily' => 'unix',
'arg' => {
'@line' => '-c \'cp "${jruby.basedir}/bin/jruby.bash" "${jruby.basedir}/bin/jruby"\''
}
},
'chmod' => {
'@file' => '${jruby.basedir}/bin/jruby',
'@perm' => '755'
}
},
'chmod' => {
'@file' => '${jruby.basedir}/bin/jruby',
'@perm' => '755'
}
} } ]
} } ]

phase :clean do
plugin :antrun do
execute_goals( *jruby_bin_config )
phase :clean do
plugin :antrun do
execute_goals( *jruby_bin_config )
end
end
end

profile 'jruby.bash' do
profile 'jruby.bash' do

activation do
file( :missing => '../bin/jruby' )
end
activation do
file( :missing => '../bin/jruby' )
end

phase :initialize do
plugin :antrun do
execute_goals( *jruby_bin_config )
phase :initialize do
plugin :antrun do
execute_goals( *jruby_bin_config )
end
end
end

end

end

jni_config = [ 'unpack', { :id => 'unzip native',
1 change: 1 addition & 0 deletions maven/BUILD-PACK
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
738b3e9638783e87c34e564c9f78d65cd06a886b
41 changes: 32 additions & 9 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -135,6 +135,14 @@ def self.find_jruby_bin_dir
end
end

def self.find_repo(name)
[JRUBY_DIR, "#{JRUBY_DIR}/.."].each do |dir|
found = Dir.glob("#{dir}/#{name}*").first
return found if found
end
raise "Can't find the #{name} repo - clone it into the repository directory or its parent"
end

def self.find_gem(name)
["#{JRUBY_DIR}/lib/ruby/gems/shared/gems", JRUBY_DIR, "#{JRUBY_DIR}/.."].each do |dir|
found = Dir.glob("#{dir}/#{name}*").first
@@ -267,6 +275,16 @@ def sh(*args)
def mvn(*args)
sh './mvnw', *(['-q'] + args)
end

def maven_options(*options)
maven_options = %w[-DskipTests]
offline = options.delete('--offline')
if offline
maven_options.push "-Dmaven.repo.local=#{Utilities.find_repo('jruby-build-pack')}/maven"
maven_options.push '--offline'
end
return [maven_options, options]
end

def mspec(command, *args)
env_vars = {}
@@ -288,10 +306,11 @@ module Commands

def help
puts 'jt checkout name checkout a different Git branch and rebuild'
puts 'jt bootstrap run the build system\'s bootstrap phase'
puts 'jt bootstrap [options] run the build system\'s bootstrap phase'
puts 'jt build [options] build'
puts 'jt build truffle [options] build only the Truffle part, assumes the rest is up-to-date'
puts 'jt rebuild [options] clean and build'
puts ' --offline use the build pack to build offline'
puts 'jt clean clean'
puts 'jt irb irb'
puts 'jt rebuild clean and build'
@@ -355,17 +374,19 @@ def checkout(branch)
rebuild
end

def bootstrap
mvn '-DskipTests', '-Pbootstrap-no-launcher'
def bootstrap(*options)
maven_options, other_options = maven_options(*options)
mvn *maven_options, '-DskipTests', '-Pbootstrap-no-launcher'
end

def build(project = nil)
opts = %w[-DskipTests]
def build(*options)
maven_options, other_options = maven_options(*options)
project = other_options.first
case project
when 'truffle'
mvn *opts, '-pl', 'truffle', 'package'
mvn *maven_options, '-pl', 'truffle', 'package'
when nil
mvn *opts, 'package'
mvn *maven_options, 'package'
else
raise ArgumentError, project
end
@@ -818,8 +839,9 @@ def human_size(bytes)
end
end

def tarball
mvn '-Pdist'
def tarball(*options)
maven_options, other_options = maven_options(*options)
mvn *maven_options, '-Pdist'
generated_file = "#{JRUBY_DIR}/maven/jruby-dist/target/jruby-dist-#{Utilities.jruby_version}-bin.tar.gz"
final_file = "#{JRUBY_DIR}/jruby-bin-#{Utilities.jruby_version}.tar.gz"
FileUtils.copy generated_file, final_file
@@ -897,6 +919,7 @@ def main(args)
when "build"
command = [args.shift]
command << args.shift if args.first == "truffle"
command << args.shift if args.first == "--offline"
send(*command)
end

20 changes: 20 additions & 0 deletions tool/travis-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -e
set -x

if [[ -v USE_BUILD_PACK ]]
then
git clone --depth 1 https://github.com/jruby/jruby-build-pack.git
MAVEN_CLI_OPTS="-Dmaven.repo.local=jruby-build-pack/maven --offline"
cp bin/jruby.bash bin/jruby
chmod +x bin/jruby
export JRUBY_NO_ANT=yes
fi

if [[ -n "$PHASE" && $JAVA_HOME == *"java-8"* ]]
then
./mvnw $MAVEN_CLI_OPTS package -B --projects '!truffle' -Dinvoker.skip -Dmaven.test.skip;
else
if [ -z "$SKIP_BUILD" ]; then ./mvnw $MAVEN_CLI_OPTS package -B -Dinvoker.skip -Dmaven.test.skip; fi
fi
10 changes: 8 additions & 2 deletions tool/travis_runner.sh → tool/travis-script.sh
Original file line number Diff line number Diff line change
@@ -3,14 +3,20 @@
set -e
set -x

if [[ -v USE_BUILD_PACK ]]
then
git clone --depth 1 https://github.com/jruby/jruby-build-pack.git
MAVEN_CLI_OPTS="-Dmaven.repo.local=jruby-build-pack/maven --offline"
fi

if [[ -v PHASE ]]
then
DOWNLOAD_OUTPUT_FILTER='Download|\\[exec\\] [[:digit:]]+/[[:digit:]]+|^[[:space:]]*\\[exec\\][[:space:]]*$'
if [[ $JAVA_HOME == *"java-8"* ]]
then
./mvnw package -B --projects '!truffle' -Dinvoker.skip=false $PHASE | egrep -v "$DOWNLOAD_OUTPUT_FILTER"
./mvnw $MAVEN_CLI_OPTS package -B --projects '!truffle' -Dinvoker.skip=false $PHASE | egrep -v "$DOWNLOAD_OUTPUT_FILTER"
else
./mvnw package -B -Dinvoker.skip=false $PHASE | egrep -v "$DOWNLOAD_OUTPUT_FILTER"
./mvnw $MAVEN_CLI_OPTS package -B -Dinvoker.skip=false $PHASE | egrep -v "$DOWNLOAD_OUTPUT_FILTER"
fi

MVN_STATUS=${PIPESTATUS[0]}