-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
90 lines (76 loc) · 2.25 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
80
81
82
83
84
85
86
87
88
89
90
BIN_PATH = $(shell swift build --show-bin-path)
XCTEST_PATH = $(shell find "$(BIN_PATH)" -name '*.xctest')
COV_BIN = "$(XCTEST_PATH)"/Contents/MacOs/$(shell basename "$(XCTEST_PATH)" .xctest)
PLATFORM_IOS = iOS Simulator,name=iPhone 14 Pro
PLATFORM_MACOS = macOS
PLATFORM_MAC_CATALYST = macOS,variant=Mac Catalyst
PLATFORM_TVOS = tvOS Simulator,name=Apple TV
PLATFORM_WATCHOS = watchOS Simulator,name=Apple Watch Series 8 (45mm)
CONFIG := debug
clean:
rm -rf .build
test-macos: clean
set -o pipefail && \
xcodebuild test \
-skipMacroValidation \
-scheme swift-tca-loadable-Package \
-configuration "$(CONFIG)" \
-destination platform="$(PLATFORM_MACOS)"
test-ios: clean
set -o pipefail && \
xcodebuild test \
-skipMacroValidation \
-scheme swift-tca-loadable-Package \
-configuration "$(CONFIG)" \
-destination platform="$(PLATFORM_IOS)"
test-mac-catalyst: clean
set -o pipefail && \
xcodebuild test \
-skipMacroValidation \
-scheme swift-tca-loadable-Package \
-configuration "$(CONFIG)" \
-destination platform="$(PLATFORM_MAC_CATALYST)"
test-tvos: clean
set -o pipefail && \
xcodebuild test \
-skipMacroValidation \
-scheme swift-tca-loadable-Package \
-configuration "$(CONFIG)" \
-destination platform="$(PLATFORM_TVOS)"
test-watchos: clean
set -o pipefail && \
xcodebuild test \
-skipMacroValidation \
-scheme swift-tca-loadable-Package \
-configuration "$(CONFIG)" \
-destination platform="$(PLATFORM_WATCHOS)"
test-swift:
swift test --enable-code-coverage
test-library: test-macos test-ios test-mac-catalyst test-tvos test-watchos
code-cov-report:
@xcrun llvm-cov report \
$(COV_BIN) \
-instr-profile=.build/debug/codecov/default.profdata \
-ignore-filename-regex=".build|Tests" \
-use-color
format:
swift format \
--ignore-unparsable-files \
--in-place \
--recursive \
./Package.swift \
./Sources
build-documentation:
swift package \
--allow-writing-to-directory ./docs \
generate-documentation \
--target Loadable \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path swift-tca-loadable \
--output-path ./docs
preview-documentation:
swift package \
--disable-sandbox \
preview-documentation \
--target Loadable