forked from pocketsvg/PocketSVG
-
Notifications
You must be signed in to change notification settings - Fork 3
/
ci.sh
54 lines (47 loc) · 1.49 KB
/
ci.sh
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
## This file is part of the PocketSVG package.
# Copyright (c) Ponderwell, Ariel Elkin, Fjölnir Ásgeirsson, and Contributors
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
## This script builds the iOS and macOS frameworks and demos, and
# runs the tests on iOS. Our CI system requires that this script
# run successfully. It is called via .travis.yml and you can see
# the results over at https://travis-ci.org/pocketsvg/PocketSVG
#
# You can run this script locally before pushing your changes to
# check the build and tests run as they should.
# print every command:
set -x
# stop execution if an error occurs:
set -eo pipefail
IPHONE6SIM="platform=iOS Simulator,name=iPhone 6,OS=11.2"
## build iOS framework:
xcodebuild \
-project PocketSVG.xcodeproj \
-scheme "PocketSVG (iOS)" \
-destination "$IPHONE6SIM" \
clean build | xcpretty
## build macOS framework:
xcodebuild \
-project PocketSVG.xcodeproj \
-scheme "PocketSVG (Mac)" \
-destination "arch=x86_64" \
clean build | xcpretty
## build iOS demo:
xcodebuild \
-workspace Demos/Demos.xcworkspace \
-destination "$IPHONE6SIM" \
-scheme Demo-iOS \
clean build | xcpretty
## build macOS demo:
xcodebuild \
-workspace Demos/Demos.xcworkspace \
-destination "arch=x86_64" \
-scheme Demo-macOS \
clean build | xcpretty
## run tests:
xcodebuild \
-project PocketSVG.xcodeproj \
-scheme PocketSVGTests \
-destination "$IPHONE6SIM" \
test | xcpretty