forked from pointfreeco/swift-custom-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (69 loc) · 2.12 KB
/
Makefile
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
PLATFORM_IOS = iOS Simulator,name=iPhone 11 Pro Max
PLATFORM_MACOS = macOS
PLATFORM_MAC_CATALYST = macOS,variant=Mac Catalyst
PLATFORM_TVOS = tvOS Simulator,name=Apple TV
SWIFT_VERSION = 5.5
ifeq ($(SWIFT_VERSION),5.3)
SWIFT_BUILD_ARGS = --enable-test-discovery
endif
SWIFT_TEST_ARGS = --parallel
test-all: test-linux test-swift test-platforms
test-linux:
docker run \
--rm \
-v "$(PWD):$(PWD)" \
-w "$(PWD)" \
swift:$(SWIFT_VERSION) \
bash -c 'apt-get update && apt-get -y install make && make test-swift SWIFT_VERSION=$(SWIFT_VERSION)'
test-swift:
swift test $(SWIFT_BUILD_ARGS) $(SWIFT_TEST_ARGS)
swift test --configuration release $(SWIFT_BUILD_ARGS) $(SWIFT_TEST_ARGS)
test-platforms:
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-destination platform="$(PLATFORM_IOS)"
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-configuration Release \
-destination platform="$(PLATFORM_IOS)"
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-destination platform="$(PLATFORM_MACOS)"
xcodebuild \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-configuration Release \
-destination platform="$(PLATFORM_MACOS)"
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-destination platform="$(PLATFORM_MAC_CATALYST)"
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-configuration Release \
-destination platform="$(PLATFORM_MAC_CATALYST)"
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-destination platform="$(PLATFORM_TVOS)"
xcodebuild test \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-configuration Release \
-destination platform="$(PLATFORM_TVOS)"
xcodebuild \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-destination generic/platform=watchOS
xcodebuild \
-workspace CustomDump.xcworkspace \
-scheme CustomDump \
-configuration Release \
-destination generic/platform=watchOS
format:
swift format --in-place --recursive .
.PHONY: format test-all test-linux test-swift