Skip to content

Commit 6bb2c9c

Browse files
committed
added build script
1 parent 8693af2 commit 6bb2c9c

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

build.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/sh
2+
3+
4+
NAME=InstanceHelper
5+
PROJECT=$NAME.xcodeproj
6+
SCHEME=$NAME
7+
SIMULATOR_NAME="iPhone 16 Pro"
8+
9+
carthage bootstrap --platform iOS --use-xcframeworks --cache-builds
10+
11+
build() {
12+
13+
xcodebuild build-for-testing -scheme $SCHEME -configuration Debug \
14+
-UseNewBuildSystem=YES \
15+
-derivedDataPath ./build -disable-concurrent-destination-testing \
16+
-destination platform="iOS Simulator,name=$SIMULATOR_NAME" \
17+
-parallel-testing-enabled NO \
18+
-enableAddressSanitizer NO -enableThreadSanitizer NO -enableUndefinedBehaviorSanitizer NO \
19+
-enableCodeCoverage NO COMPILER_INDEX_STORE_ENABLE=NO \
20+
-skipMacroValidation \
21+
ARCH=arm64 \
22+
CODE_SIGN_IDENTITY= \
23+
CODE_SIGNING_REQUIRED=NO \
24+
CODE_SIGNING_ALLOWED=NO | xcbeautify -qq --disable-colored-output
25+
}
26+
27+
28+
unitTest() {
29+
xcodebuild test-without-building -scheme $SCHEME -configuration Debug \
30+
-UseNewBuildSystem=YES \
31+
-derivedDataPath ./build -disable-concurrent-destination-testing \
32+
-destination platform="iOS Simulator,name=$SIMULATOR_NAME" \
33+
-parallel-testing-enabled NO \
34+
-enableAddressSanitizer NO -enableThreadSanitizer NO -enableUndefinedBehaviorSanitizer NO \
35+
-enableCodeCoverage NO COMPILER_INDEX_STORE_ENABLE=NO \
36+
-collect-test-diagnostics never \
37+
-skipMacroValidation \
38+
ARCH=arm64 \
39+
$ONLY_TEST | xcbeautify --disable-colored-output
40+
41+
}
42+
43+
build
44+
45+
if [ $? != 0 ]; then
46+
echo "Build failed"
47+
exit 1
48+
fi
49+
50+
unitTest

0 commit comments

Comments
 (0)