Skip to content

Commit

Permalink
'build' is default target for make command. 'test' target depends on …
Browse files Browse the repository at this point in the history
…'build'. 'build-...-examples' targets depend on 'install-examples'.
  • Loading branch information
duartepinto committed Mar 30, 2021
1 parent 9160da5 commit 173f363
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ jobs:
xcode-version: "latest-stable"
- name: "Install Dependencies"
run: make install
- name: "Update Velocidi SDK Pod for example applications"
run: make install-examples
- name: "Build example Objective-C application"
run: make build-objc-example
- name: "Build example Swift application"
Expand Down
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,27 @@ XCARGS := -workspace $(WORKSPACE) \
-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

all: clean build
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

build:
set -o pipefail && xcodebuild $(XCARGS) -scheme VelocidiSDK build | xcpretty

test:
test: build
set -o pipefail && xcodebuild $(XCARGS) -scheme VelocidiSDK test | xcpretty

examples: install-examples build-objc-example build-swift-example

install-examples: all
install-examples: build
pod install --project-directory=Examples/

build-objc-example:
build-objc-example: install-examples
set -o pipefail && xcodebuild $(XCARGS) -scheme ObjcExample clean build | xcpretty

build-swift-example:
build-swift-example: install-examples
set -o pipefail && xcodebuild $(XCARGS) -scheme SwiftExample clean build | xcpretty

install:
Expand Down

0 comments on commit 173f363

Please sign in to comment.