-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (26 loc) · 844 Bytes
/
.travis.yml
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
language: swift
osx_image: xcode10
env:
global:
- SDK=iphoneos
- TARGET=armv7-apple-ios10
matrix:
- PLAYGROUND_DIR="creational/Singleton.playground"
- PLAYGROUND_DIR="creational/Factory.playground"
- PLAYGROUND_DIR="creational/AbstractFactory.playground"
script:
xcrun swift --version &&
cd "${PLAYGROUND_DIR}" &&
xcrun -sdk "${SDK}"
swiftc -target "${TARGET}"
-emit-library -emit-module -module-name AuxiliarySources
Sources/*.swift &&
if ! xcrun swiftc -emit-imported-modules Contents.swift |
grep -q "PlaygroundSupport";
then
cat <(echo "import AuxiliarySources") Contents.swift > main.swift &&
xcrun -sdk "${SDK}"
swiftc -target "${TARGET}"
-I "." -L "." -lAuxiliarySources -module-link-name AuxiliarySources
-o Playground main.swift;
fi