diff options
author | Jason Wray <friedbunny@users.noreply.github.com> | 2019-08-08 15:35:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 15:35:56 -0700 |
commit | a3a661e84649b78575237a2ab935a2d2584970c4 (patch) | |
tree | becd992b40ff5d164dfbc8caac39f60d063c1b15 /circle.yml | |
parent | 56e7bbc0b74840701a513c709cac94b4d4d34e26 (diff) | |
download | qtlocation-mapboxgl-a3a661e84649b78575237a2ab935a2d2584970c4.tar.gz |
[build] Skip CI jobs if there are no relevant changed files
Diffstat (limited to 'circle.yml')
-rw-r--r-- | circle.yml | 97 |
1 files changed, 74 insertions, 23 deletions
diff --git a/circle.yml b/circle.yml index 464237b0b2..68c49dd3f6 100644 --- a/circle.yml +++ b/circle.yml @@ -4,6 +4,14 @@ workflows: version: 2 default: jobs: + # + # Naming convention: {platform}-{additional description}-{build type} + # - {platform} is the client platform/framework, which may differ from + # the build platform. Specify both if applicable, e.g., "qt5-macos". + # - {additional description} optionally describes the compiler or other + # unique aspect of the build environment. + # - {build type} is typically "debug" or "release". + # - nitpick - clang-tidy: filters: @@ -467,6 +475,28 @@ commands: scripts/notify-slack.sh fi + # + # Add this step to all regular jobs to enable skipping of certain non-code-related changes. + # + # Do not include this step in nightly or release deployment jobs. + # + # To make a job potentially skippable on changes unrelated to its platform, it must: + # - Target one of the skippable platforms: Android, iOS, or macOS. + # - Have a job name that begins with a supported platform name. + # - Not be related to core functionality or rendering tests. Job names that + # contain "render-tests" cannot be skipped by platform changes. + # + # See the script in the following step for how to implement support for other platforms. + # + check-if-this-job-can-be-skipped: + steps: + - run: + name: Check if this job can be skipped + command: | + if [[ $CIRCLE_BRANCH != master ]] && [[ $CIRCLE_BRANCH != release-* ]]; then + scripts/check-ci-job-skippability.js + fi + jobs: nitpick: docker: @@ -557,6 +587,7 @@ jobs: MBGL_ANDROID_STL: << parameters.stl >> steps: - install-dependencies: { gradle: true } + - check-if-this-job-can-be-skipped - run: name: Initialize vendor submodules command: git submodule update --init platform/android/vendor @@ -633,6 +664,7 @@ jobs: IS_LOCAL_DEVELOPMENT: false steps: - install-dependencies: { gradle: true } + - check-if-this-job-can-be-skipped - run: name: Initialize vendor submodules command: git submodule update --init platform/android/vendor @@ -723,6 +755,9 @@ jobs: ANDROID_NDK: /android/sdk/ndk-bundle steps: - checkout + - npm-install + - prepare-environment + - check-if-this-job-can-be-skipped - run: name: Checkout submodules command: | @@ -766,6 +801,7 @@ jobs: WITH_EGL: 1 steps: - install-dependencies + - check-if-this-job-can-be-skipped - build-node - save-dependencies - publish-node-package @@ -782,6 +818,7 @@ jobs: - install-macos-dependencies - install-node-macos-dependencies - install-dependencies + - check-if-this-job-can-be-skipped - build-node - save-dependencies - run-node-macos-tests @@ -803,6 +840,7 @@ jobs: WITH_CXX11ABI: 1 steps: - install-dependencies + - check-if-this-job-can-be-skipped - build-linux - save-dependencies @@ -824,6 +862,7 @@ jobs: UBSAN_OPTIONS: print_stacktrace=1:color=always:print_summary=1 steps: - install-dependencies + - check-if-this-job-can-be-skipped - setup-llvm-symbolizer - build-test - save-dependencies @@ -846,6 +885,7 @@ jobs: TSAN_OPTIONS: color=always:print_summary=1 steps: - install-dependencies + - check-if-this-job-can-be-skipped - setup-llvm-symbolizer - build-test - save-dependencies @@ -866,6 +906,7 @@ jobs: DISPLAY: :0 steps: - install-dependencies + - check-if-this-job-can-be-skipped - build-linux - build-benchmark - build-test @@ -889,6 +930,7 @@ jobs: WITH_COVERAGE: 1 steps: - install-dependencies + - check-if-this-job-can-be-skipped - build-linux - build-benchmark - build-test @@ -919,6 +961,7 @@ jobs: WITH_COVERAGE: 1 steps: - install-dependencies + - check-if-this-job-can-be-skipped - run: name: Install doxygen command: apt update && apt install -y doxygen @@ -943,6 +986,7 @@ jobs: WITH_EGL: 1 steps: - install-dependencies + - check-if-this-job-can-be-skipped - configure-cmake - build-mbgl-render-test - run-linux-render-tests @@ -960,14 +1004,15 @@ jobs: steps: - install-macos-dependencies - install-dependencies - - build-ios-test - check-public-symbols - run: - name: Check symbol namespacing for mapbox-events-ios - command: make ios-check-events-symbols - - run: name: Lint podspecs and plist files command: make ios-lint + - check-if-this-job-can-be-skipped + - build-ios-test + - run: + name: Check symbol namespacing for mapbox-events-ios + command: make ios-check-events-symbols - run: name: Nitpick Darwin code generation command: scripts/nitpick/generated-code.js darwin @@ -986,14 +1031,15 @@ jobs: steps: - install-macos-dependencies - install-dependencies - - build-ios-test - check-public-symbols - run: - name: Check symbol namespacing for mapbox-events-ios - command: make ios-check-events-symbols - - run: name: Lint podspecs and plist files command: make ios-lint + - check-if-this-job-can-be-skipped + - build-ios-test + - run: + name: Check symbol namespacing for mapbox-events-ios + command: make ios-check-events-symbols - run: name: Nitpick Darwin code generation command: scripts/nitpick/generated-code.js darwin @@ -1002,21 +1048,6 @@ jobs: - upload-xcode-build-logs # ------------------------------------------------------------------------------ - metrics-nightly: - docker: - - image: mbgl/linux-gcc-5:54f59e3ac5 - working_directory: /src - environment: - LIBSYSCONFCPUS: 2 - JOBS: 2 - steps: - - install-dependencies - - run: - name: Collect GitHub statistics - command: | - scripts/publish_github_stats.js - -# ------------------------------------------------------------------------------ ios-sanitize-nightly: macos: xcode: "10.3.0" @@ -1112,6 +1143,7 @@ jobs: steps: - install-macos-dependencies - install-dependencies + - check-if-this-job-can-be-skipped - install-ios-packaging-dependencies - run: name: Build dynamic framework for device and simulator @@ -1210,6 +1242,7 @@ jobs: steps: - install-macos-dependencies - install-dependencies + - check-if-this-job-can-be-skipped - build-macos-test - check-public-symbols - run: @@ -1237,6 +1270,7 @@ jobs: steps: - install-macos-dependencies - install-dependencies + - check-if-this-job-can-be-skipped - configure-cmake - build-mbgl-render-test - save-dependencies @@ -1244,6 +1278,21 @@ jobs: - upload-render-tests # ------------------------------------------------------------------------------ + metrics-nightly: + docker: + - image: mbgl/linux-gcc-5:54f59e3ac5 + working_directory: /src + environment: + LIBSYSCONFCPUS: 2 + JOBS: 2 + steps: + - install-dependencies + - run: + name: Collect GitHub statistics + command: | + scripts/publish_github_stats.js + +# ------------------------------------------------------------------------------ qt5-linux-gcc5-release: docker: - image: mbgl/linux-gcc-5-qt-5.9:5132cfd29f @@ -1256,6 +1305,7 @@ jobs: WITH_QT_I18N: 1 steps: - install-dependencies + - check-if-this-job-can-be-skipped - build-qt-app - build-qt-test - run: @@ -1282,6 +1332,7 @@ jobs: - install-macos-dependencies - install-qt-macos-dependencies - install-dependencies + - check-if-this-job-can-be-skipped - build-qt-app - build-qt-test - run: |