[Lua] Add LuaJIT support (#6584)
[platform/upstream/flatbuffers.git] / .travis.yml
index 5c128f6..3ca86de 100644 (file)
@@ -104,6 +104,7 @@ matrix:
       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
 
       script:
+      - pip install cmake
       - bash .travis/check-sources.sh
       - bash grpc/build_grpc.sh
       - cmake .
@@ -112,9 +113,9 @@ matrix:
         -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install
         -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf
         -DFLATBUFFERS_CODE_SANITIZE=ON
-      - cmake --build . -- -j${JOBS}
+      - cmake --build . --target all --clean-first -- -j${JOBS}
       - LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure
-      - bash .travis/check-generate-code.sh
+      - bash scripts/check-generate-code.sh
 
     - language: cpp
       os: osx
@@ -125,6 +126,11 @@ matrix:
           - BUILD_TYPE=Release
 
       script:
+      - pip install --user cmake
+      - mkdir ~/cmake_path
+      - ln -s $(find ~/Library/Python -name cmake -type f | head -n 1) ~/cmake_path/cmake
+      - ln -s $(find ~/Library/Python -name ctest -type f | head -n 1) ~/cmake_path/ctest
+      - export PATH=~/cmake_path:${PATH}
       - bash grpc/build_grpc.sh
       - cmake .
         -DCMAKE_BUILD_TYPE=$BUILD_TYPE
@@ -134,7 +140,7 @@ matrix:
         -DFLATBUFFERS_CODE_SANITIZE=ON
       - cmake --build . -- -j${JOBS}
       - DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure
-      - bash .travis/check-generate-code.sh
+      - bash scripts/check-generate-code.sh
 
     - <<: *conan-linux-master
       env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8
@@ -180,29 +186,32 @@ matrix:
 
     - language: android
       sudo: true
+      dist: trusty
       android:
         components:
           - tools
           - platform-tools
-          - build-tools-25.0.2
-          - android-25
           - extra-android-m2repository
+        licenses:
+          - 'android-sdk-preview-license-52d11cd2'
+          - 'android-sdk-license-.+'
+          - 'google-gdk-license-.+'
       compiler:
         - gcc
-
       before_install:
-        # Output something every 10 minutes or Travis kills the job
-        - while sleep 540; do echo "=====[ $SECONDS seconds still running ]====="; done &
-        - git clone https://github.com/urho3d/android-ndk.git $HOME/android-ndk-root
-        - export ANDROID_NDK_HOME=$HOME/android-ndk-root
-        # Setup environment for Linux build which is required to build the sample.
-        - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
-        - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
-        - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi
-        - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi
-        - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi
-        - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
+        - echo y | sdkmanager "platforms;android-30"
+        - echo y | sdkmanager "build-tools;30.0.2"
+        - echo y | sdkmanager "ndk-bundle"
+        - echo y | sdkmanager "cmake;3.6.4111459"
+      script:
+        - cmake -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF .; make; export PATH="$PATH:${PWD}"
+        - cd android; ./gradlew clean build
+
+    - language: generic
+      if: type IN (pull_request)
+      os: linux
+      install:
+        - bash .travis/format_install.sh
+
       script:
-        - failed=0; for build_gradle in $(git ls-files | grep build.gradle); do ( cd "$(dirname "${build_gradle}")" && ./gradlew build ) || failed=1; done; exit $((failed))
-        # Kill the sleep loop
-        - kill %1
+        - bash .travis/format_check.sh