-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (27 loc) · 1.1 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
project:=IOStreams
comma:=,
default: clean build-test-all
clean:
rm -rf TestResults
rm -rf .derived-data
rm -rf .build
make-test-results-dir:
mkdir -p TestResults
define buildtest
set -o pipefail && xcodebuild -scheme $(project) -derivedDataPath .derived-data/$(1) -resultBundleVersion 3 -resultBundlePath ./TestResults/$(1) -destination '$(2)' -enableCodeCoverage=YES -enableAddressSanitizer=YES -enableThreadSanitizer=YES -enableUndefinedBehaviorSanitizer=YES test | xcbeautify --is-ci
endef
build-test-macos:
$(call buildtest,macOS,platform=macOS)
build-test-ios:
$(call buildtest,iOS,platform=iOS Simulator$(comma)name=iPhone 13)
build-test-tvos:
$(call buildtest,tvOS,platform=tvOS Simulator$(comma)name=Apple TV)
build-test-watchos:
$(call buildtest,watchOS,platform=watchOS Simulator$(comma)name=Apple Watch Series 7 (45mm))
build-test-all: build-test-macos build-test-ios build-test-tvos build-test-watchos
format:
swiftformat --config .swiftformat Sources/ Tests/
lint: make-test-results-dir
swiftlint lint --reporter html > TestResults/lint.html
view_lint: lint
open TestResults/lint.html