diff options
author | zmiao <miao.zhao@mapbox.com> | 2019-11-08 16:31:08 +0200 |
---|---|---|
committer | zmiao <miao.zhao@mapbox.com> | 2019-11-08 16:31:08 +0200 |
commit | dcdd9bfa1afb4e60a9cbb2c6902868f298064483 (patch) | |
tree | 899727c07b369030d245f37593e8d22de5bbe7a5 | |
parent | 6fd5d6d118c4bf50f323edc99d8a5fa87e5d7767 (diff) | |
download | qtlocation-mapboxgl-dcdd9bfa1afb4e60a9cbb2c6902868f298064483.tar.gz |
config circleci
-rw-r--r-- | circle.yml | 387 | ||||
-rw-r--r-- | render-test/android/app/build.gradle | 12 | ||||
-rw-r--r-- | render-test/render_test.cpp | 6 |
3 files changed, 234 insertions, 171 deletions
diff --git a/circle.yml b/circle.yml index ad4dc8bfd0..3c9e49c372 100644 --- a/circle.yml +++ b/circle.yml @@ -4,123 +4,126 @@ workflows: version: 2 mbgl-next: jobs: - - next-sanity-checks - - next-build-template: - name: next-android-armeabi-v7a-release - executor_name: ubuntu-disco - target_is_android: true - config_params: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=/opt/android/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_CCACHE=/usr/bin/ccache -DANDROID_ABI=armeabi-v7a' - - next-build-template: - name: next-android-arm64-v8a-release - executor_name: ubuntu-disco - target_is_android: true - requires: - - next-android-armeabi-v7a-release - config_params: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=/opt/android/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_CCACHE=/usr/bin/ccache -DANDROID_ABI=arm64-v8a' - - next-build-template: - name: next-android-x86-release - executor_name: ubuntu-disco - target_is_android: true - requires: - - next-android-armeabi-v7a-release - config_params: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=/opt/android/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_CCACHE=/usr/bin/ccache -DANDROID_ABI=x86' - - next-build-template: - name: next-android-x86_64-release - executor_name: ubuntu-disco - target_is_android: true - requires: - - next-android-armeabi-v7a-release - config_params: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=/opt/android/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_CCACHE=/usr/bin/ccache -DANDROID_ABI=x86_64' - - next-build-template: - name: next-linux-gcc8-release - executor_name: ubuntu-disco - target_is_linux: true - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8' - - next-build-template: - name: next-linux-gcc4.9-release - executor_name: ubuntu-disco - target_is_linux: true - requires: - - next-linux-gcc8-release - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-4.9 -DCMAKE_CXX_COMPILER=g++-4.9' - build_params: '--target mbgl-glfw' - test_params: '-N -Q' - - next-build-template: - name: next-linux-gcc8-debug-coverage - executor_name: ubuntu-disco - target_is_linux: true - requires: - - next-linux-gcc8-release - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 -DCMAKE_BUILD_TYPE=DebugCoverage' - - next-build-template: - name: next-linux-clang8-release - executor_name: ubuntu-disco - target_is_linux: true - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8' - - next-build-template: - name: next-FIXME-linux-asan - executor_name: ubuntu-disco - target_is_linux: true - requires: - - next-sanity-checks - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=address' - test_params: '|| true' - - next-build-template: - name: next-linux-tsan - executor_name: ubuntu-disco - target_is_linux: true - requires: - - next-sanity-checks - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=thread' - - next-build-template: - name: next-FIXME-linux-memsan - executor_name: ubuntu-disco - target_is_linux: true - requires: - - next-sanity-checks - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=memory' - test_params: '|| true' - - next-build-template: - name: next-FIXME-linux-ubsan - executor_name: ubuntu-disco - target_is_linux: true - requires: - - next-sanity-checks - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=undefined' - test_params: '|| true' - - next-build-template: - name: next-qt5-linux-gcc5-release - executor_name: ubuntu-disco - target_is_linux: true - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5 -DMBGL_WITH_QT=ON' - - next-build-template: - name: next-qt5-macos-gcc5-release - executor_name: macos-11_0_0 - target_is_macos: true - requires: - - next-qt5-linux-gcc5-release - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DMBGL_WITH_QT=ON -DCMAKE_PREFIX_PATH=$(echo /usr/local/Cellar/qt/5.*/lib/cmake)' - test_params: '-N -Q' - - next-build-template: - name: next-macos-xcode11-release - executor_name: macos-11_0_0 - target_is_macos: true - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' - - next-build-template: - name: next-macos-xcode11-debug - executor_name: macos-11_0_0 - target_is_macos: true - requires: - - next-macos-xcode11-release - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug' - - next-build-template: - name: next-ios-xcode11-release - executor_name: macos-11_0_0 - target_is_macos: true - config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_SYSROOT=iphonesimulator' - test_params: '-Q -N' - mbgl-legacy: - jobs: + - next-android-armeabi-v7a-render-test + # - next-sanity-checks: + # requires: + # - next-android-armeabi-v7a-render-test + # - next-build-template: + # name: next-android-armeabi-v7a-release + # executor_name: ubuntu-disco + # target_is_android: true + # config_params: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=/opt/android/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_CCACHE=/usr/bin/ccache -DANDROID_ABI=armeabi-v7a' + # - next-build-template: + # name: next-android-arm64-v8a-release + # executor_name: ubuntu-disco + # target_is_android: true + # requires: + # - next-android-armeabi-v7a-release + # config_params: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=/opt/android/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_CCACHE=/usr/bin/ccache -DANDROID_ABI=arm64-v8a' + # - next-build-template: + # name: next-android-x86-release + # executor_name: ubuntu-disco + # target_is_android: true + # requires: + # - next-android-armeabi-v7a-release + # config_params: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=/opt/android/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_CCACHE=/usr/bin/ccache -DANDROID_ABI=x86' + # - next-build-template: + # name: next-android-x86_64-release + # executor_name: ubuntu-disco + # target_is_android: true + # requires: + # - next-android-armeabi-v7a-release + # config_params: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=/opt/android/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_CCACHE=/usr/bin/ccache -DANDROID_ABI=x86_64' + # - next-build-template: + # name: next-linux-gcc8-release + # executor_name: ubuntu-disco + # target_is_linux: true + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8' + # - next-build-template: + # name: next-linux-gcc4.9-release + # executor_name: ubuntu-disco + # target_is_linux: true + # requires: + # - next-linux-gcc8-release + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-4.9 -DCMAKE_CXX_COMPILER=g++-4.9' + # build_params: '--target mbgl-glfw' + # test_params: '-N -Q' + # - next-build-template: + # name: next-linux-gcc8-debug-coverage + # executor_name: ubuntu-disco + # target_is_linux: true + # requires: + # - next-linux-gcc8-release + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 -DCMAKE_BUILD_TYPE=DebugCoverage' + # - next-build-template: + # name: next-linux-clang8-release + # executor_name: ubuntu-disco + # target_is_linux: true + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8' + # - next-build-template: + # name: next-FIXME-linux-asan + # executor_name: ubuntu-disco + # target_is_linux: true + # requires: + # - next-sanity-checks + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=address' + # test_params: '|| true' + # - next-build-template: + # name: next-linux-tsan + # executor_name: ubuntu-disco + # target_is_linux: true + # requires: + # - next-sanity-checks + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=thread' + # - next-build-template: + # name: next-FIXME-linux-memsan + # executor_name: ubuntu-disco + # target_is_linux: true + # requires: + # - next-sanity-checks + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=memory' + # test_params: '|| true' + # - next-build-template: + # name: next-FIXME-linux-ubsan + # executor_name: ubuntu-disco + # target_is_linux: true + # requires: + # - next-sanity-checks + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=undefined' + # test_params: '|| true' + # - next-build-template: + # name: next-qt5-linux-gcc5-release + # executor_name: ubuntu-disco + # target_is_linux: true + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5 -DMBGL_WITH_QT=ON' + # - next-build-template: + # name: next-qt5-macos-gcc5-release + # executor_name: macos-11_0_0 + # target_is_macos: true + # requires: + # - next-qt5-linux-gcc5-release + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DMBGL_WITH_QT=ON -DCMAKE_PREFIX_PATH=$(echo /usr/local/Cellar/qt/5.*/lib/cmake)' + # test_params: '-N -Q' + # - next-build-template: + # name: next-macos-xcode11-release + # executor_name: macos-11_0_0 + # target_is_macos: true + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' + # - next-build-template: + # name: next-macos-xcode11-debug + # executor_name: macos-11_0_0 + # target_is_macos: true + # requires: + # - next-macos-xcode11-release + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug' + # - next-build-template: + # name: next-ios-xcode11-release + # executor_name: macos-11_0_0 + # target_is_macos: true + # config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_SYSROOT=iphonesimulator' + # test_params: '-Q -N' + # mbgl-legacy: + # jobs: # # Naming convention: {platform}-{additional description}-{build type} # - {platform} is the client platform/framework, which may differ from @@ -129,59 +132,59 @@ workflows: # unique aspect of the build environment. # - {build type} is typically "debug" or "release". # - - android-debug-arm-v7-buck - - android-arm-template: - name: android-debug-arm-v8 - - android-arm-template: - name: android-gnustl-arm-v7 - stl: gnustl_shared - firebase_device_id: "flo" - firebase_device_os: "21" - image: android-ndk-r17c:1d5db0eb34 - abi: arm-v7 - - android-release: - filters: - tags: - only: /android-v.*/ - - node-linux-release: - filters: - tags: - only: /node-.*/ - - node-macos-release: - filters: - tags: - only: /node-.*/ - - linux-clang-7-sanitize-address-undefined - - linux-clang-7-sanitize-thread - - linux-gcc5-debug-coverage - - linux-doxygen - - ios-debug - - ios-debug-xcode10 - - ios-release-template: - name: ios-release - - ios-release-tag: - filters: - tags: - only: /ios-.*/ - branches: - ignore: /.*/ - - macos-debug - nightly: - triggers: - - schedule: - cron: "0 5 * * *" - filters: - branches: - only: - - master - jobs: - - metrics-nightly - - ios-release-template: - name: ios-release-nightly - - ios-sanitize-nightly - - ios-sanitize-address-nightly - - ios-static-analyzer-nightly - - ios-static-analyzer-nightly-xcode10 + # - android-debug-arm-v7-buck + # - android-arm-template: + # name: android-debug-arm-v8 + # - android-arm-template: + # name: android-gnustl-arm-v7 + # stl: gnustl_shared + # firebase_device_id: "flo" + # firebase_device_os: "21" + # image: android-ndk-r17c:1d5db0eb34 + # abi: arm-v7 + # - android-release: + # filters: + # tags: + # only: /android-v.*/ + # - node-linux-release: + # filters: + # tags: + # only: /node-.*/ + # - node-macos-release: + # filters: + # tags: + # only: /node-.*/ + # - linux-clang-7-sanitize-address-undefined + # - linux-clang-7-sanitize-thread + # - linux-gcc5-debug-coverage + # - linux-doxygen + # - ios-debug + # - ios-debug-xcode10 + # - ios-release-template: + # name: ios-release + # - ios-release-tag: + # filters: + # tags: + # only: /ios-.*/ + # branches: + # ignore: /.*/ + # - macos-debug + # nightly: + # triggers: + # - schedule: + # cron: "0 5 * * *" + # filters: + # branches: + # only: + # - master + # jobs: + # - metrics-nightly + # - ios-release-template: + # name: ios-release-nightly + # - ios-sanitize-nightly + # - ios-sanitize-address-nightly + # - ios-static-analyzer-nightly + # - ios-static-analyzer-nightly-xcode10 executors: ubuntu-disco: @@ -215,7 +218,7 @@ commands: - run: name: Prepare command: | - git submodule sync + git submodule git submodule update --init --recursive npm install --ignore-scripts ulimit -c unlimited @@ -240,6 +243,19 @@ commands: name: Configure command: | cmake next -B build << parameters.config_params >> + next-gradle: + steps: + - run: + name: GradleBuild + commond: | + cd render-test/android && ./gradlew --parallel --max-workers=8 -Pmapbox.abis=armeabi-v7a assembleRelease + - run: + name: Run gcloud tests on Firebase + no_output_timeout: 20m + command: | + if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" && -z "${SKIP_FIREBASE:-}" ]]; then + gcloud firebase test android models list + fi next-build: parameters: build_params: @@ -650,6 +666,31 @@ commands: fi jobs: + next-android-armeabi-v7a-render-test: + executor: ubuntu-disco + steps: + - checkout + - next-prepare + - run: + name: Build RenderTestRunner APK + command: | + cd render-test/android + ./gradlew --parallel --max-workers=8 -Pmapbox.abis=armeabi-v7a assembleDebug + - login-google-cloud-platform + - run: + name: Run render test runner on Firebase + no_output_timeout: 20m + command: | + mkdir abc + cp -r mapbox-gl-js/test/integration/query-tests/fill/default/ abc/ + if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" && -z "${SKIP_FIREBASE:-}" ]]; then + gcloud alpha firebase test android models list + gcloud alpha firebase test android run --app render-test/android/app/build/outputs/apk/debug/app-debug.apk \ + --device-ids flo --os-version-ids 21 --locales en \ + --other-files abc/default/expected.json=/sdcard/render-test/mapbox-gl-js/test/integration/query-tests/default/ \ + --other-files abc/default/style.json=/sdcard/render-test/mapbox-gl-js/test/integration/query-tests/default/ + fi + - next-save next-sanity-checks: executor: ubuntu-disco steps: @@ -706,6 +747,9 @@ jobs: target_is_macos: type: boolean default: false + gradle_params: + type: string + default: '' executor: << parameters.executor_name >> steps: - checkout @@ -717,6 +761,7 @@ jobs: config_params: << parameters.config_params >> - next-build: build_params: << parameters.build_params >> + - when: condition: << parameters.target_is_linux >> steps: diff --git a/render-test/android/app/build.gradle b/render-test/android/app/build.gradle index 682af85dcf..12b640ecd6 100644 --- a/render-test/android/app/build.gradle +++ b/render-test/android/app/build.gradle @@ -7,6 +7,18 @@ android { applicationId = 'com.mapbox.mapboxsdk.maps.render_test_runner' minSdkVersion 14 targetSdkVersion 28 + def abi = 'all' + if (project.hasProperty('mapbox.abis')) { + // Errors when the user invokes Gradle from the command line and didn't set mapbox.abis + abi = project.getProperty("mapbox.abis") + } + ndk { + if (abi != 'all') { + abiFilters abi.split(' ') + } else { + abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" + } + } externalNativeBuild { cmake { arguments '-DANDROID_CCACHE=ccache' diff --git a/render-test/render_test.cpp b/render-test/render_test.cpp index e89cab1c1b..3cdd4304c3 100644 --- a/render-test/render_test.cpp +++ b/render-test/render_test.cpp @@ -11,6 +11,7 @@ #include "metadata.hpp" #include "parser.hpp" #include "runner.hpp" +#include <mbgl/util/logging.hpp> #define ANSI_COLOR_RED "\x1b[31m" #define ANSI_COLOR_GREEN "\x1b[32m" @@ -182,17 +183,20 @@ int runRenderTests(int argc, char** argv) { status = "passed"; color = "green"; stats.passedTests++; + mbgl::Log::Warning(mbgl::Event::General,ANSI_COLOR_RED "* passed %s" ANSI_COLOR_RESET "\n", id.c_str()); printf(ANSI_COLOR_GREEN "* passed %s" ANSI_COLOR_RESET "\n", id.c_str()); } else if (errored) { status = "errored"; color = "red"; stats.erroredTests++; + mbgl::Log::Warning(mbgl::Event::General, ANSI_COLOR_RED "* errored %s" ANSI_COLOR_RESET "\n", id.c_str()); printf(ANSI_COLOR_RED "* errored %s" ANSI_COLOR_RESET "\n", id.c_str()); printf(ANSI_COLOR_RED "* error: %s" ANSI_COLOR_RESET "\n", metadata.errorMessage.c_str()); } else { status = "failed"; color = "red"; stats.failedTests++; + mbgl::Log::Warning(mbgl::Event::General,ANSI_COLOR_RED "* failed %s" ANSI_COLOR_RESET "\n", id.c_str()); printf(ANSI_COLOR_RED "* failed %s" ANSI_COLOR_RESET "\n", id.c_str()); } } @@ -208,9 +212,11 @@ int runRenderTests(int argc, char** argv) { stats.erroredTests + stats.failedTests + stats.ignoreFailedTests + stats.ignorePassedTests + stats.passedTests; if (stats.passedTests) { + mbgl::Log::Warning(mbgl::Event::General, ANSI_COLOR_RED "%u passed (%.1lf%%)" ANSI_COLOR_RESET "\n", stats.passedTests, 100.0 * stats.passedTests / count); printf(ANSI_COLOR_GREEN "%u passed (%.1lf%%)" ANSI_COLOR_RESET "\n", stats.passedTests, 100.0 * stats.passedTests / count); } if (stats.ignorePassedTests) { + mbgl::Log::Warning(mbgl::Event::General, ANSI_COLOR_RED "%u passed but were ignored (%.1lf%%)" ANSI_COLOR_RESET "\n", stats.ignorePassedTests, 100.0 * stats.ignorePassedTests / count); printf(ANSI_COLOR_YELLOW "%u passed but were ignored (%.1lf%%)" ANSI_COLOR_RESET "\n", stats.ignorePassedTests, 100.0 * stats.ignorePassedTests / count); } if (stats.ignoreFailedTests) { |