From 3723f0c8ab6af2d13709196af8b883d31348a9f2 Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Thu, 3 Nov 2022 07:55:01 +0100 Subject: [PATCH 1/2] ci: Call make for analyze Call make analyze in CI, so you can easily run analyze locally with the same config as in CU. --- .github/workflows/lint.yml | 3 +-- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 95429f1707b..c724faee5d4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,8 +37,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: ./scripts/ci-select-xcode.sh - - name: Run analyze - run: xcodebuild analyze -workspace Sentry.xcworkspace -scheme Sentry -configuration Release CLANG_ANALYZER_OUTPUT=html CLANG_ANALYZER_OUTPUT_DIR=analyzer | xcpretty -t && [[ -z `find analyzer -name "*.html"` ]] + - run: make analyze validate-podspec: name: Validate Podspec diff --git a/Makefile b/Makefile index 11c6df993a4..cf1fd389f6d 100644 --- a/Makefile +++ b/Makefile @@ -42,8 +42,8 @@ run-test-server: .PHONY: run-test-server analyze: - rm -r analyzer - xcodebuild analyze -workspace Sentry.xcworkspace -scheme Sentry -configuration Release CLANG_ANALYZER_OUTPUT=html CLANG_ANALYZER_OUTPUT_DIR=analyzer | rbenv exec bundle exec xcpretty -t + rm -rf analyzer + xcodebuild analyze -workspace Sentry.xcworkspace -scheme Sentry -configuration Release CLANG_ANALYZER_OUTPUT=html CLANG_ANALYZER_OUTPUT_DIR=analyzer -destination "platform=iOS Simulator,OS=latest,name=iPhone 11" CODE_SIGNING_ALLOWED="NO" | rbenv exec bundle exec xcpretty -t && [[ -z `find analyzer -name "*.html"` ]] # Since Carthage 0.38.0 we need to create separate .framework.zip and .xcframework.zip archives. # After creating the zips we create a JSON to be able to test Carthage locally. From 14b681e2205ecb5ec3f510323ac5f435e13ff9c7 Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Thu, 3 Nov 2022 08:24:03 +0100 Subject: [PATCH 2/2] fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cf1fd389f6d..bb9ac2682cf 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ run-test-server: analyze: rm -rf analyzer - xcodebuild analyze -workspace Sentry.xcworkspace -scheme Sentry -configuration Release CLANG_ANALYZER_OUTPUT=html CLANG_ANALYZER_OUTPUT_DIR=analyzer -destination "platform=iOS Simulator,OS=latest,name=iPhone 11" CODE_SIGNING_ALLOWED="NO" | rbenv exec bundle exec xcpretty -t && [[ -z `find analyzer -name "*.html"` ]] + xcodebuild analyze -workspace Sentry.xcworkspace -scheme Sentry -configuration Release CLANG_ANALYZER_OUTPUT=html CLANG_ANALYZER_OUTPUT_DIR=analyzer -destination "platform=iOS Simulator,OS=latest,name=iPhone 11" CODE_SIGNING_ALLOWED="NO" | xcpretty -t && [[ -z `find analyzer -name "*.html"` ]] # Since Carthage 0.38.0 we need to create separate .framework.zip and .xcframework.zip archives. # After creating the zips we create a JSON to be able to test Carthage locally.