-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (37 loc) · 941 Bytes
/
Makefile
File metadata and controls
51 lines (37 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Rules
# =====
#
# make test - Run all tests but performance tests
# make distclean - Restore repository to a pristine state
default: test
# Configuration
# =============
GIT := $(shell command -v git)
POD := $(shell command -v pod)
XCRUN := $(shell command -v xcrun)
SWIFT = $(shell $(XCRUN) --find swift 2> /dev/null)
# Used to determine if xcpretty is available
XCPRETTY_PATH := $(shell command -v xcpretty 2> /dev/null)
# Tests
# =====
# If xcpretty is available, use it for xcodebuild output
XCPRETTY =
ifdef XCPRETTY_PATH
XCPRETTY = | xcpretty -c
# On Travis-CI, use xcpretty-travis-formatter
ifeq ($(TRAVIS),true)
XCPRETTY += -f `xcpretty-travis-formatter`
endif
endif
test: test_SPM
test_SPM:
$(SWIFT) package clean
$(SWIFT) build
$(SWIFT) build -c release
set -o pipefail && $(SWIFT) test $(XCPRETTY)
# Cleanup
# =======
distclean:
$(GIT) reset --hard
$(GIT) clean -dffx .
.PHONY: distclean test