forked from tgrapperon/swift-dependencies-additions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (44 loc) · 1.18 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
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
PLATFORM_WATCHOS = watchOS Simulator,name=Apple Watch Series 7 (45mm)
CONFIG = debug
default: test
build-all-platforms:
for platform in \
"$(PLATFORM_IOS)" \
"$(PLATFORM_MACOS)" \
"$(PLATFORM_MAC_CATALYST)" \
"$(PLATFORM_TVOS)" \
"$(PLATFORM_WATCHOS)"; \
do \
xcodebuild build \
-workspace DependenciesAdditions.xcworkspace \
-scheme DependenciesAdditions \
-configuration $(CONFIG) \
-destination platform="$$platform" || exit 1; \
done;
test-swift:
swift test
swift test -c release
test-linux:
docker run \
--rm \
-v "$(PWD):$(PWD)" \
-w "$(PWD)" \
swift:5.7-focal \
bash -c 'apt-get update && apt-get -y install make && make test-swift'
build-for-library-evolution:
swift build \
-c release \
--target Dependencies \
-Xswiftc -emit-module-interface \
-Xswiftc -enable-library-evolution
format:
swift format \
--ignore-unparsable-files \
--in-place \
--recursive \
./Package.swift ./Sources ./Tests
.PHONY: test test-swift test-linux build-for-library-evolution format