From e018b01c428464a173e6440cdbbaf5baf6a16943 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Mon, 18 Dec 2017 17:02:09 -0800 Subject: [PATCH] [ios, build] Run static analyzer on CircleCI --- Makefile | 4 ++++ circle.yml | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Makefile b/Makefile index 8ba07366a2e..79eeb6f9100 100644 --- a/Makefile +++ b/Makefile @@ -243,6 +243,10 @@ ios-sanitize: $(IOS_PROJ_PATH) ios-sanitize-address: $(IOS_PROJ_PATH) set -o pipefail && $(IOS_XCODEBUILD_SIM) -scheme 'CI' -enableAddressSanitizer YES test $(XCPRETTY) +.PHONY: ios-static-analyzer +ios-static-analyzer: $(IOS_PROJ_PATH) + set -o pipefail && $(IOS_XCODEBUILD_SIM) analyze -scheme 'CI' test $(XCPRETTY) + .PHONY: ipackage ipackage: $(IOS_PROJ_PATH) FORMAT=$(FORMAT) BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=$(SYMBOLS) \ diff --git a/circle.yml b/circle.yml index 3b85eaaf31e..90cf825586e 100644 --- a/circle.yml +++ b/circle.yml @@ -34,6 +34,7 @@ workflows: - ios-debug - ios-sanitize #- ios-sanitize-address + - ios-static-analyzer - ios-release: filters: tags: @@ -769,6 +770,25 @@ jobs: - *show-ccache-stats - *save-cache +# ------------------------------------------------------------------------------ + ios-static-analyzer: + macos: + xcode: "9.2.0" + environment: + BUILDTYPE: Debug + HOMEBREW_NO_AUTO_UPDATE: 1 + steps: + - checkout + - *install-macos-dependencies + - *generate-cache-key + - *restore-cache + - *reset-ccache-stats + - run: + name: Build and run SDK unit tests with the static analyzer + command: make ios-static-analyzer + - *show-ccache-stats + - *save-cache + # ------------------------------------------------------------------------------ ios-release: macos: