-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from velocidi/makefile
Add Makefile
- Loading branch information
Showing
6 changed files
with
102 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env sh | ||
|
||
FAILED=false | ||
|
||
if ! which xcodebuild >/dev/null; then | ||
echo "xcodebuild does not seem to be installed. You can install it by installing Xcode from the App Store." | ||
FAILED=true | ||
fi | ||
|
||
if ! which pod >/dev/null; then | ||
echo "Cocoapods does not seem to be installed. You may need to run 'gem install cocoapods'." | ||
FAILED=true | ||
fi | ||
|
||
if ! which xcpretty >/dev/null; then | ||
echo "xcpretty does not seem to be installed. You may need to run 'gem install xcpretty'." | ||
FAILED=true | ||
fi | ||
|
||
if ! command -v Pods/SwiftLint/swiftlint &> /dev/null; then | ||
echo "Swiftlint does not seem to be installed. You may need to run 'pod install'." | ||
FAILED=true | ||
fi | ||
|
||
if ! which oclint >/dev/null; then | ||
echo "oclint does not seem to be installed. You may need to run 'brew tap oclint/formulae && brew install oclint'." | ||
FAILED=true | ||
fi | ||
|
||
if $FAILED; then | ||
exit 1 | ||
fi | ||
|
||
echo "All required dependencies are installed!" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
WORKSPACE ?= VelocidiSDK.xcworkspace | ||
TEST_SDK ?= 14.4 | ||
TEST_DEVICE ?= iPhone 11 Pro Max | ||
|
||
XCARGS := -workspace $(WORKSPACE) \ | ||
-sdk "iphonesimulator$(TEST_SDK)" \ | ||
-destination "platform=iOS Simulator,OS=$(TEST_SDK),name=$(TEST_DEVICE)" \ | ||
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | ||
|
||
build: | ||
set -o pipefail && xcodebuild $(XCARGS) -scheme VelocidiSDK build | xcpretty | ||
|
||
# we have to clean schemas independently because xcode does not allow to clean all schemes in a workspace | ||
clean: | ||
xcodebuild $(XCARGS) -scheme VelocidiSDK clean | xcpretty && \ | ||
xcodebuild $(XCARGS) -scheme ObjcExample clean | xcpretty && \ | ||
xcodebuild $(XCARGS) -scheme SwiftExample clean | xcpretty | ||
|
||
test: build | ||
set -o pipefail && xcodebuild $(XCARGS) -scheme VelocidiSDK test | xcpretty | ||
|
||
examples: install-examples build-objc-example build-swift-example | ||
|
||
install-examples: build | ||
pod install --project-directory=Examples/ | ||
|
||
build-objc-example: install-examples | ||
set -o pipefail && xcodebuild $(XCARGS) -scheme ObjcExample clean build | xcpretty | ||
|
||
build-swift-example: install-examples | ||
set -o pipefail && xcodebuild $(XCARGS) -scheme SwiftExample clean build | xcpretty | ||
|
||
install: | ||
pod install | ||
|
||
prerequisites: | ||
.scripts/prerequisites.sh | ||
|
||
oclint-examples: | ||
set -o pipefail && \ | ||
xcodebuild -scheme ObjcExample -sdk iphonesimulator -workspace VelocidiSDK.xcworkspace COMPILER_INDEX_STORE_ENABLE=NO clean build | xcpretty -r json-compilation-database --output compile_commands.json && \ | ||
oclint-json-compilation-database -exclude Pods -exclude build -- -report-type xcode -max-priority-3=15000 | ||
|
||
oclint: | ||
set -o pipefail && \ | ||
xcodebuild -scheme VelocidiSDK -sdk iphonesimulator -workspace VelocidiSDK.xcworkspace COMPILER_INDEX_STORE_ENABLE=NO clean build | xcpretty -r json-compilation-database --output compile_commands.json && \ | ||
oclint-json-compilation-database -exclude Pods -exclude build -- -report-type xcode -max-priority-3=15000 | ||
|
||
swiftlint: | ||
Pods/SwiftLint/swiftlint lint --fix && Pods/SwiftLint/swiftlint lint --strict | ||
|
||
podlint: | ||
pod lib lint --verbose |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.