From 17d7134e2d94123089a0047e15f7caa8ccdee051 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Sat, 10 Dec 2016 14:03:47 -0500 Subject: [PATCH] bullet: enable upload for linux/mac --- .travis.yml | 10 ++++---- .../src/native/cpp/jmePhysicsSpace.cpp | 1 - private/upload_native.sh | 23 +++++++++++-------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ca4b714c..2dbd6c5a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,11 @@ branches: matrix: include: - # - os: linux - # jdk: oraclejdk8 - # env: UPLOAD=true UPLOAD_NATIVE=true - # - os: linux - # jdk: openjdk7 + - os: linux + jdk: oraclejdk8 + env: UPLOAD=true UPLOAD_NATIVE=true + - os: linux + jdk: openjdk7 - os: osx env: UPLOAD_NATIVE=true diff --git a/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.cpp b/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.cpp index adbd81e03..485dffffe 100644 --- a/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.cpp +++ b/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.cpp @@ -36,7 +36,6 @@ * Author: Normen Hansen */ jmePhysicsSpace::jmePhysicsSpace(JNIEnv* env, jobject javaSpace) { - printf("hello\n"); //TODO: global ref? maybe not -> cleaning, rather callback class? this->javaPhysicsSpace = env->NewWeakGlobalRef(javaSpace); this->env = env; diff --git a/private/upload_native.sh b/private/upload_native.sh index 6357ce1cb..94d5afdc6 100755 --- a/private/upload_native.sh +++ b/private/upload_native.sh @@ -1,17 +1,22 @@ #!/bin/bash set -euo pipefail -echo Running upload native ... -# NATIVE_CHANGES="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-bullet-native/)" -# if [ "$NATIVE_CHANGES" != "" ]; then +echo " - Checking if natives changed in commit $TRAVIS_COMMIT.." +NATIVE_CHANGES="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-bullet-native/)" +if [ "$NATIVE_CHANGES" != "" ]; then + echo " - Configuring GIT user" git config --global user.email "travis-ci" git config --global user.name "travis-ci" - # openssl aes-256-cbc -K $encrypted_f0a0b284e2e8_key -iv $encrypted_f0a0b284e2e8_iv -in private/key.enc -out "$HOME/.ssh/id_rsa" -d - # chmod 600 "$HOME/.ssh/id_rsa" - ls jme3-bullet-native/build/libs/bulletjme/shared/ - md5 -r jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib jme3-bullet-native/build/libs/bulletjme/shared/mac32/libbulletjme.dylib + echo " - Decrypting private key" + openssl aes-256-cbc -K $encrypted_f0a0b284e2e8_key -iv $encrypted_f0a0b284e2e8_iv -in private/key.enc -out "$HOME/.ssh/id_rsa" -d + chmod 600 "$HOME/.ssh/id_rsa" + # ls jme3-bullet-native/build/libs/bulletjme/shared/ + # md5 -r jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib jme3-bullet-native/build/libs/bulletjme/shared/mac32/libbulletjme.dylib + echo " - Pushing natives onto branch $TRAVIS_BRANCH" git checkout "$TRAVIS_BRANCH" git add -v -- jme3-bullet-native/libs/native/ git commit -v -m "[ci skip] bullet: update $TRAVIS_OS_NAME natives" git pull -q --rebase - # git push git@github.com:jMonkeyEngine/jmonkeyengine.git -# fi + git push git@github.com:jMonkeyEngine/jmonkeyengine.git +else + echo No native changes. +fi