forked from pointfreeco/swift-custom-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (60 loc) · 1.83 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
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 4K (at 1080p)
PLATFORM_WATCHOS = watchOS Simulator,name=Apple Watch Series 4 - 44mm
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 'make test-swift SWIFT_VERSION=$(SWIFT_VERSION)'
test-swift:
swift test $(SWIFT_BUILD_ARGS) $(SWIFT_TEST_ARGS)
swift build --configuration release $(SWIFT_BUILD_ARGS)
test-platforms:
xcodebuild test \
-scheme swift-custom-dump \
-destination platform="$(PLATFORM_IOS)"
xcodebuild \
-scheme swift-custom-dump \
-configuration Release \
-destination platform="$(PLATFORM_IOS)"
xcodebuild test \
-scheme swift-custom-dump \
-destination platform="$(PLATFORM_MACOS)"
xcodebuild \
-scheme swift-custom-dump \
-configuration Release \
-destination platform="$(PLATFORM_MACOS)"
xcodebuild test \
-scheme swift-custom-dump \
-destination platform="$(PLATFORM_MAC_CATALYST)"
xcodebuild \
-scheme swift-custom-dump \
-configuration Release \
-destination platform="$(PLATFORM_MAC_CATALYST)"
xcodebuild test \
-scheme swift-custom-dump \
-destination platform="$(PLATFORM_TVOS)"
xcodebuild \
-scheme swift-custom-dump \
-configuration Release \
-destination platform="$(PLATFORM_TVOS)"
xcodebuild \
-scheme CustomDump_watchOS \
-destination platform="$(PLATFORM_WATCHOS)"
xcodebuild \
-scheme CustomDump_watchOS \
-configuration Release \
-destination platform="$(PLATFORM_WATCHOS)"
format:
swift format --in-place --recursive .
.PHONY: format test-all test-linux test-swift