Created
May 10, 2019 09:09
-
-
Save dhruvsbhatt/263a7739db9160c2c328660c9d959ec1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- Test | |
- Build | |
Test Project: | |
stage: Test | |
script: | |
- rm -rf ~/Library/Developer/Xcode/DerivedData | |
- export LC_ALL=en_US.UTF-8 | |
- xcodebuild -version | |
- pod install | |
- xcodebuild clean test -workspace SampleFramework.xcworkspace -scheme SampleFrameworkApp -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 8,OS=12.1' -enableCodeCoverage YES -derivedDataPath build/DerivedDataDirectory | xcpretty -c "--report" "html" "--output" "build/Project_report.html" | |
- slather | |
artifacts: | |
paths: | |
- build/Project_report.html | |
- build/Coverage | |
tags: | |
- SampleFramework | |
- iOS | |
Build Framework: | |
stage: Build | |
script: | |
- mkdir -p build/UniversalFramework | |
- xcodebuild clean build -workspace SampleFramework.xcworkspace -scheme SampleFramework ONLY_ACTIVE_ARCH=NO -sdk iphoneos -configuration Release -derivedDataPath build/DerivedDataDirectory | xcpretty | |
- cp -R "build/DerivedDataDirectory/Build/Products/Release-iphoneos" "build/UniversalFramework/" | |
- xcodebuild clean build -workspace SampleFramework.xcworkspace -scheme SampleFramework ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Release -derivedDataPath build/DerivedDataDirectory | xcpretty | |
- cp -R "build/DerivedDataDirectory/Build/Products/Release-iphonesimulator" "build/UniversalFramework/" | |
- mkdir -p build/UniversalFramework/Release-universal | |
- cp -R "build/UniversalFramework/Release-iphoneos/SampleFramework.framework" "build/UniversalFramework/Release-universal" | |
- SIMULATOR_SWIFT_MODULES_DIR="build/UniversalFramework/Release-iphonesimulator/SampleFramework.framework/Modules/SampleFramework.swiftmodule/." | |
- | | |
if [ -d "${SIMULATOR_SWIFT_MODULES_DIR}" ]; then | |
cp -R "${SIMULATOR_SWIFT_MODULES_DIR}" "build/UniversalFramework/Release-iphoneos/SampleFramework.framework/Modules/SampleFramework.swiftmodule" | |
fi | |
- lipo -create -output "build/UniversalFramework/Release-universal/SampleFramework.framework/SampleFramework" "build/UniversalFramework/Release-iphonesimulator/SampleFramework.framework/SampleFramework" "build/UniversalFramework/Release-iphoneos/SampleFramework.framework/SampleFramework" | |
artifacts: | |
paths: | |
- build/UniversalFramework | |
tags: | |
- SampleFramework | |
- iOS | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment