diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1040dda1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -dist: trusty - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - wget - - pkg-config - -before_install: - - wget https://github.com/bazelbuild/bazel/releases/download/0.22.0/bazel_0.22.0-linux-x86_64.deb - - sha256sum -c tools/bazel_0.22.0-linux-x86_64.deb.sha256 - - sudo dpkg -i bazel_0.22.0-linux-x86_64.deb - -script: - - jdk_switcher use oraclejdk9 - - bazel test //... - -language: java - -jdk: - - oraclejdk9 - -branches: - except: - - gh-pages - -notifications: - email: make-open-easy+CI@googlegroups.com diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 446f73e1..46dd51dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,6 +23,8 @@ note that a Google, Inc. copyright line must appear in every copyright notice. All files are released with the Apache 2.0 license and any new files may only be accepted under the terms of that license. + + Before your code can be accepted into the project you must sign the [Individual Contributor License Agreement (CLA)][1]. diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 00000000..dbe9cb88 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,9 @@ +# Contributors + +These authors have supplied code or other contributions to this repository. + +- Google, Inc. + - various employees +- Christian Gruber + +> Note: If your contribution is not accounted for here, please submit a pull request with an update. \ No newline at end of file diff --git a/README.md b/README.md index b3d63a45..15396e73 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,11 @@ *Make Open Easy* [![LICENSE](https://img.shields.io/badge/license-Apache-blue.svg)](https://github.com/google/MOE/blob/master/LICENSE) -[![Travis CI](https://img.shields.io/travis/google/MOE.svg)](https://travis-ci.org/google/MOE) -[![GitHub Issues](https://img.shields.io/github/issues/google/MOE.svg)](https://github.com/google/MOE/issues) -[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/google/MOE.svg)](https://github.com/google/MOE/pulls) +[![CI](https://github.com/cgruber/MOE/workflows/CI/badge.svg)](https://github.com/cgruber/MOE/actions?query=workflow%3ACI) +[![GitHub Issues](https://img.shields.io/github/issues/cgruber/MOE.svg)](https://github.com/cgruber/MOE/issues) +[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/cgruber/MOE.svg)](https://github.com/cgruber/MOE/pulls) + +> Note: This is a personal fork by [cgruber](http://github.com/cgruber) ## Introduction @@ -37,13 +39,12 @@ documentation update, which is forthcoming. ### Building MOE -1. Install Apache Maven 3.1 if you don't already have it + 1. Install [Bazelisk](http://github.com/bazelbuild/bazelisk) 2. Checkout the Java-MOE source `git clone git@github.com:google/MOE.git` - 3. In the top-level directory that contains the build.xml file, run: - - `mvn install` - - `util/make-binary.sh` - 4. The moe client binary should be created at `client/target/moe` - + 3. In the top level directory that contains the WORKSPACE file, run: + - `bazel build //client:moe` + 4. The moe client binary should be created at `bazel-bin/client/moe` + 5. (optionally) install the client somewhere in your `$PATH` ### Running MOE @@ -52,16 +53,12 @@ Once you have the `moe` binary, you should be able to simply run: ## Contributing -Contributing to MOE is subject to the guidelines in the CONTRIBUTING.md file, -which, in brief, requires that contributors sign the [Individual Contributor -License Agreement (CLA)][CLA]. - -[CLA]: https://cla.developers.google.com/ - +Contributing to MOE is subject to the guidelines in the CONTRIBUTING.md file ## License ``` + Copyright 2011 The Moe Authors. All Rights Reserved. Copyright 2011 Google, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/client/BUILD.bazel b/client/BUILD.bazel index ec6fa51b..2a74ae7f 100644 --- a/client/BUILD.bazel +++ b/client/BUILD.bazel @@ -1 +1,17 @@ load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library", "kt_jvm_binary") + +java_binary( + name = "client-bin", + main_class = "com.google.devtools.moe.client.Moe", + runtime_deps = ["//client/src/main/java/com/google/devtools/moe/client"], +) + +genrule( + name = "moe", + outs = ["moe"], + srcs = [ + "//util:java-exec-prefix", + ":client-bin_deploy.jar" + ], + cmd_bash = "cat $(location //util:java-exec-prefix) $(location :client-bin_deploy.jar) > $@", +) \ No newline at end of file diff --git a/tools/bazel_0.22.0-linux-x86_64.deb.sha256 b/tools/bazel_0.22.0-linux-x86_64.deb.sha256 deleted file mode 100644 index 286ac74f..00000000 --- a/tools/bazel_0.22.0-linux-x86_64.deb.sha256 +++ /dev/null @@ -1 +0,0 @@ -0799bfff7959a9e4ee1a5028e5a80260e55f9526bbdd4268ea867f4e7f7c122d bazel_0.22.0-linux-x86_64.deb diff --git a/util/BUILD.bazel b/util/BUILD.bazel new file mode 100644 index 00000000..1adc8a9d --- /dev/null +++ b/util/BUILD.bazel @@ -0,0 +1 @@ +exports_files(["java-exec-prefix"]) \ No newline at end of file diff --git a/util/generate-latest-docs.sh b/util/generate-latest-docs.sh deleted file mode 100755 index 7e120569..00000000 --- a/util/generate-latest-docs.sh +++ /dev/null @@ -1,25 +0,0 @@ -# - -if [ "$TRAVIS_REPO_SLUG" == "google/MOE" ] && \ - [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && \ - [ "$TRAVIS_PULL_REQUEST" == "false" ] && \ - [ "$TRAVIS_BRANCH" == "master" ]; then - echo -e "Publishing javadoc...\n" - - mvn javadoc:aggregate - TARGET="$(pwd)/target" - - cd $HOME - git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/google/MOE gh-pages > /dev/null - - cd gh-pages - git config --global user.email "travis@travis-ci.org" - git config --global user.name "travis-ci" - git rm -rf api/latest - mv ${TARGET}/site/apidocs api/latest - git add -A -f api/latest - git commit -m "Latest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages" - git push -fq origin gh-pages > /dev/null - - echo -e "Published Javadoc to gh-pages.\n" -fi diff --git a/util/java-exec-prefix b/util/java-exec-prefix index 96cc5465..8efda6db 100644 --- a/util/java-exec-prefix +++ b/util/java-exec-prefix @@ -14,26 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -JAR_FILE=`which "$0" 2>/dev/null` - -if [[ -n "$JAVA_HOME" ]]; then - JAVA_CMD="$JAVA_HOME/bin/java" - if [[ ! -f $JAVA_CMD ]]; then - echo "Cannot find java binary at $JAVA_CMD" - exit 1 - fi -else - if [[ ! `which java` ]]; then - echo "Cannot find java binary on the executable PATH" - exit 1 - fi - JAVA_CMD=`which java` -fi - -if [[ ! -x $JAVA_CMD ]]; then - echo "Java command is not executable: $JAVA_CMD" - exit 1 -fi - -"$JAVA_CMD" $JVM_ARGS -jar $0 "$@" -exit 1 +MYSELF=$(which "$0" 2>/dev/null) +[ $? -gt 0 ] && [ -f "$0" ] && MYSELF="./$0" +JAVA_CMD=java +[ -n "$JAVA_HOME" ] && JAVA_CMD="$JAVA_HOME/bin/java" +exec "$JAVA_CMD" $JAVA_ARGS -jar "$MYSELF" "$@" +exit 1 diff --git a/util/make-binary.sh b/util/make-binary.sh deleted file mode 100755 index 09702419..00000000 --- a/util/make-binary.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -cmd_dir=$(cd `dirname "$0"` && pwd) -target_dir="$(dirname $cmd_dir)/client/target" -jar_file=${target_dir}/moe-*-executable.jar -if [ ! -f ${jar_file} ]; then - echo "Monolithic executable jar not found in ${target_dir}" - exit 1 -fi -cat ${cmd_dir}/java-exec-prefix ${jar_file} > ${target_dir}/moe -chmod a+x ${target_dir}/moe -echo "MOE Mac/Unix excecutable created at ${target_dir}/moe"