diff --git a/.travis.yml b/.travis.yml index 331261d09..a736dd8cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,12 @@ language: cpp compiler: clang env: - - TARGET_PLATFORM=Android + - TARGET_PLATFORM=Android_arm + - TARGET_PLATFORM=Android_arm64 + - TARGET_PLATFORM=Android_x86 + - TARGET_PLATFORM=Android_x86_64 + - TARGET_PLATFORM=Android_mips + - TARGET_PLATFORM=Android_mips64 - TARGET_PLATFORM=Linux - TARGET_PLATFORM=NaCl - TARGET_PLATFORM=Mac @@ -49,7 +54,7 @@ before_install: - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install -y clang python pkg-config curl bzip2 unzip make; fi - if [ $TARGET_PLATFORM == Linux ]; then sudo apt-get install -y libibus-1.0-dev libglib2.0-dev libqt4-dev libgtk2.0-dev libxcb-xfixes0-dev; fi - if [ $TARGET_PLATFORM == NaCl ]; then sudo apt-get install -y libc6-i386 lib32stdc++6; fi - - if [ $TARGET_PLATFORM == Android ]; then sudo apt-get install --no-install-recommends openjdk-7-jdk openjdk-7-jre-headless libjsr305-java ant zip libc6-i386 lib32stdc++6 lib32ncurses5 lib32z1; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then sudo apt-get install --no-install-recommends openjdk-7-jdk openjdk-7-jre-headless libjsr305-java ant zip libc6-i386 lib32stdc++6 lib32ncurses5 lib32z1; fi install: - if [ $TRAVIS_OS_NAME == linux ]; then git -C src/third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git; fi @@ -59,20 +64,20 @@ install: - if [ $TARGET_PLATFORM == Mac ]; then git -C src/third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git; fi - if [ $TARGET_PLATFORM == Mac ]; then export PATH="$PATH":`pwd`/src/third_party/depot_tools; fi - if [ $TARGET_PLATFORM == NaCl ]; then cd src/third_party && curl -LO http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip && unzip nacl_sdk.zip && rm nacl_sdk.zip && cd nacl_sdk && ./naclsdk install pepper_45 && cd ../../../; fi - - if [ $TARGET_PLATFORM == Android ]; then jdk_switcher use openjdk7; fi - - if [ $TARGET_PLATFORM == Android ]; then cd src/third_party && curl -L http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin -O && chmod u+x android-ndk-r10e-linux-x86_64.bin && ./android-ndk-r10e-linux-x86_64.bin > /dev/null && rm android-ndk-r10e-linux-x86_64.bin && curl -L http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -zx && cd ../../; fi - - if [ $TARGET_PLATFORM == Android ]; then export ANDROID_NDK_HOME=`pwd`/src/third_party/android-ndk-r10e ; fi - - if [ $TARGET_PLATFORM == Android ]; then export ANDROID_HOME=`pwd`/src/third_party/android-sdk-linux ; fi - - if [ $TARGET_PLATFORM == Android ]; then export PATH="$PATH":${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}; fi - - if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter android-22; fi - - if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter build-tools-22.0.0; fi - - if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter extra-android-support; fi - - if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter platform-tool; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then jdk_switcher use openjdk7; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then cd src/third_party && curl -LO http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip && unzip -q android-ndk-r12b-linux-x86_64.zip && rm android-ndk-r12b-linux-x86_64.zip && curl -L http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -zx && cd ../../; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then export ANDROID_NDK_HOME=`pwd`/src/third_party/android-ndk-r12b ; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then export ANDROID_HOME=`pwd`/src/third_party/android-sdk-linux ; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then export PATH="$PATH":${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then echo y | android update sdk --all --force --no-ui --filter android-22; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then echo y | android update sdk --all --force --no-ui --filter build-tools-22.0.0; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then echo y | android update sdk --all --force --no-ui --filter extra-android-support; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then echo y | android update sdk --all --force --no-ui --filter platform-tool; fi script: - cd ./src - - if [ $TARGET_PLATFORM == Android ]; then python build_mozc.py gyp --target_platform=Android; fi - - if [ $TARGET_PLATFORM == Android ]; then python build_mozc.py build -c Release package; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then python build_mozc.py gyp --target_platform=Android --android_arch=${TARGET_PLATFORM:8:6}; fi + - if [ ${TARGET_PLATFORM:0:7} == Android ]; then python build_mozc.py build -c Release package; fi - if [ $TARGET_PLATFORM == Linux ]; then python build_mozc.py gyp --target_platform=Linux; fi - if [ $TARGET_PLATFORM == Linux ]; then python build_mozc.py build -c Release package; fi - if [ $TARGET_PLATFORM == Linux ]; then python build_mozc.py runtests -c Release; fi @@ -87,7 +92,17 @@ matrix: - os: linux env: TARGET_PLATFORM=Mac - os: osx - env: TARGET_PLATFORM=Android + env: TARGET_PLATFORM=Android_arm + - os: osx + env: TARGET_PLATFORM=Android_arm64 + - os: osx + env: TARGET_PLATFORM=Android_x86 + - os: osx + env: TARGET_PLATFORM=Android_x86_64 + - os: osx + env: TARGET_PLATFORM=Android_mips + - os: osx + env: TARGET_PLATFORM=Android_mips64 - os: osx env: TARGET_PLATFORM=Linux - os: osx diff --git a/docker/ubuntu14.04/Dockerfile b/docker/ubuntu14.04/Dockerfile index 15d13ecdb..7c81dedce 100644 --- a/docker/ubuntu14.04/Dockerfile +++ b/docker/ubuntu14.04/Dockerfile @@ -53,9 +53,9 @@ RUN mkdir -p /home/mozc_builder/work WORKDIR /home/mozc_builder/work ## Android SDK/NDK -RUN curl -L http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin -O && chmod u+x android-ndk-r10e-linux-x86_64.bin && ./android-ndk-r10e-linux-x86_64.bin && rm android-ndk-r10e-linux-x86_64.bin +RUN curl -LO http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip && unzip android-ndk-r12b-linux-x86_64.zip && rm android-ndk-r12b-linux-x86_64.zip RUN curl -L http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -zx -ENV ANDROID_NDK_HOME /home/mozc_builder/work/android-ndk-r10e +ENV ANDROID_NDK_HOME /home/mozc_builder/work/android-ndk-r12b ENV ANDROID_HOME /home/mozc_builder/work/android-sdk-linux ENV PATH $PATH:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME} RUN echo y | android update sdk --all --force --no-ui --filter android-22 diff --git a/src/android/android.gyp b/src/android/android.gyp index 1bf8234fb..80bd8a030 100644 --- a/src/android/android.gyp +++ b/src/android/android.gyp @@ -234,12 +234,13 @@ 'type': 'none', 'variables': { 'make_standalone_toolchain_commands': [ - 'bash', - '<(android_ndk_home)/build/tools/make-standalone-toolchain.sh', - '--toolchain=<(toolchain)', - '--stl=libcxx', + 'python', + '<(android_ndk_home)/build/tools/make_standalone_toolchain.py', + '--force', + '--arch=<(android_arch)', + '--stl=libc++', '--install-dir=<(mozc_build_tools_dir)/ndk-standalone-toolchain/<(android_arch)', - '--platform=<(platform)', + '--api=<(ndk_target_api_level)', ], 'make_standalone_toolchain_result': '