Skip to content

Commit

Permalink
- Added iOS targets to Travis scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
iarwain committed Oct 26, 2019
1 parent de734a6 commit 6c24b82
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Expand Up @@ -17,3 +17,8 @@ end_of_line = lf
[*.sh]
indent_size = 4
end_of_line = lf

[*.pbxproj]
indent_style = tab
indent_size = 4
end_of_line = lf
20 changes: 20 additions & 0 deletions .travis.yml
Expand Up @@ -32,6 +32,26 @@ matrix:
osx_image: xcode11.2
script: ./code/build/travis/desktop.sh

- os: osx
compiler: clang
osx_image: xcode8.3
script: ./code/build/travis/ios.sh

- os: osx
compiler: clang
osx_image: xcode9.4
script: ./code/build/travis/ios.sh

- os: osx
compiler: clang
osx_image: xcode10.3
script: ./code/build/travis/ios.sh

- os: osx
compiler: clang
osx_image: xcode11.2
script: ./code/build/travis/ios.sh

- language: android
jdk: openjdk8
android:
Expand Down
33 changes: 27 additions & 6 deletions code/build/ios/xcode/orx-ios.xcodeproj/project.pbxproj
Expand Up @@ -1124,6 +1124,7 @@
OTHER_CFLAGS = (
"-Wno-write-strings",
"-ffast-math",
"-stdlib=libc++",
);
OTHER_LDFLAGS = "-lorxd";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
Expand Down Expand Up @@ -1177,6 +1178,7 @@
OTHER_CFLAGS = (
"-Wno-write-strings",
"-ffast-math",
"-stdlib=libc++",
);
OTHER_LDFLAGS = "-lorx";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
Expand Down Expand Up @@ -1206,7 +1208,10 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-ffast-math";
OTHER_CFLAGS = (
"-ffast-math",
"-stdlib=libc++",
);
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -1224,7 +1229,10 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
OTHER_CFLAGS = "-ffast-math";
OTHER_CFLAGS = (
"-ffast-math",
"-stdlib=libc++",
);
SDKROOT = iphoneos;
};
name = Release;
Expand Down Expand Up @@ -1266,7 +1274,10 @@
"../../../../extern/LiquidFun-1.1.0/lib/ios",
);
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-ffast-math";
OTHER_CFLAGS = (
"-ffast-math",
"-stdlib=libc++",
);
OTHER_LDFLAGS = "-ObjC";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
PRODUCT_NAME = orxd;
Expand Down Expand Up @@ -1317,7 +1328,10 @@
../../../../extern/libwebp/lib/ios,
"../../../../extern/LiquidFun-1.1.0/lib/ios",
);
OTHER_CFLAGS = "-ffast-math";
OTHER_CFLAGS = (
"-ffast-math",
"-stdlib=libc++",
);
OTHER_LDFLAGS = "-ObjC";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
PRODUCT_NAME = orx;
Expand Down Expand Up @@ -1349,7 +1363,10 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
OTHER_CFLAGS = "-ffast-math";
OTHER_CFLAGS = (
"-ffast-math",
"-stdlib=libc++",
);
SDKROOT = iphoneos;
};
name = Profile;
Expand Down Expand Up @@ -1392,6 +1409,7 @@
OTHER_CFLAGS = (
"-Wno-write-strings",
"-ffast-math",
"-stdlib=libc++",
);
OTHER_LDFLAGS = "-lorxp";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
Expand Down Expand Up @@ -1443,7 +1461,10 @@
../../../../extern/libwebp/lib/ios,
"../../../../extern/LiquidFun-1.1.0/lib/ios",
);
OTHER_CFLAGS = "-ffast-math";
OTHER_CFLAGS = (
"-ffast-math",
"-stdlib=libc++",
);
OTHER_LDFLAGS = "-ObjC";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES;
PRODUCT_NAME = orxp;
Expand Down
23 changes: 23 additions & 0 deletions code/build/travis/ios.sh
@@ -0,0 +1,23 @@
#!/bin/bash
set -ev
cd $TRAVIS_BUILD_DIR/code/build/ios/xcode/orx-ios.xcodeproj
xcodebuild -workspace project.xcworkspace -scheme orxLIB -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPad Air'
xcodebuild -workspace project.xcworkspace -scheme orxLIB -configuration Profile -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPad Air'
xcodebuild -workspace project.xcworkspace -scheme orxLIB -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPad Air'
cd $TRAVIS_BUILD_DIR/code/lib/static/ios
mkdir i386
mv liborx.a liborxp.a liborxd.a i386
cd $TRAVIS_BUILD_DIR/code/build/ios/xcode/orx-ios.xcodeproj
xcodebuild -workspace project.xcworkspace -scheme orxLIB -configuration Debug -sdk iphoneos
xcodebuild -workspace project.xcworkspace -scheme orxLIB -configuration Profile -sdk iphoneos
xcodebuild -workspace project.xcworkspace -scheme orxLIB -configuration Release -sdk iphoneos
cd $TRAVIS_BUILD_DIR/code/lib/static/ios
mkdir arm
mv liborx.a liborxp.a liborxd.a arm
lipo -create i386/liborxd.a arm/liborxd.a -output liborxd.a
lipo -create i386/liborxd.a arm/liborxp.a -output liborxp.a
lipo -create i386/liborxd.a arm/liborx.a -output liborx.a
cd $TRAVIS_BUILD_DIR/code/build/mac/gmake
make config=core_release64
cd $TRAVIS_BUILD_DIR/code/build/python
python package.py -p ios

0 comments on commit 6c24b82

Please sign in to comment.