-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from rive-app/maybeFramework
Maybe framework
- Loading branch information
Showing
8 changed files
with
338 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Build Rive framework | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
build_frameworks: | ||
name: Create RiveRuntime.xcframework | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.RIVE_REPO_PAT }} | ||
submodules: recursive | ||
- name: Init submodule | ||
run: git submodule update --init | ||
- id: build_iphoneos | ||
name: Build release iphoneos framework | ||
run: sh ./scripts/buildFramework.sh -t iphoneos -c Release | ||
- id: build_iphonesimulator | ||
name: Build release iphonesimulator framework | ||
run: sh ./scripts/buildFramework.sh -t iphonesimulator -c Release | ||
- id: merge_frameworks | ||
if: steps.build_iphoneos.conclusion == 'success' && steps.build_iphonesimulator.conclusion == 'success' | ||
name: Merge created frameworks | ||
run: sh ./scripts/mergeFrameworks.sh -c Release | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: RiveRuntime.xcframework | ||
path: build/RiveRuntime.xcframework | ||
|
||
create_podspec_file: | ||
name: Create RiveRuntime.podspec | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.RIVE_REPO_PAT }} | ||
submodules: recursive | ||
- name: Read podspec.txt file | ||
uses: pCYSl5EDgo/cat@master | ||
id: podspec | ||
with: | ||
path: .github/workflows/podspec.txt | ||
- name: Create *.podspec | ||
run: | | ||
cat > RiveRuntime.podspec <<-EOF | ||
${{ steps.podspec.outputs.text }} | ||
EOF | ||
env: | ||
GITHUB_AUTHOR: ${{ github.actor }} | ||
RELEASE_VERSION: ${{ github.event.release.tag_name }} | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: RiveRuntime.podspec | ||
path: RiveRuntime.podspec | ||
|
||
upload_cocoapods: | ||
name: Update podspec repository | ||
runs-on: macos-latest | ||
timeout-minutes: 10 | ||
needs: [create_podspec_file, build_frameworks] | ||
steps: | ||
- name: Checkout podspec repo | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: rive-app/test-ios | ||
token: ${{ secrets.RIVE_REPO_PAT }} | ||
- name: Clean | ||
run: | | ||
rm -rf RiveRuntime.podspec | ||
rm -rf RiveRuntime.xcframework | ||
- name: Download framework artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: RiveRuntime.xcframework | ||
path: RiveRuntime.xcframework | ||
- name: Download podspec artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: RiveRuntime.podspec | ||
- name: Lint pod | ||
run: pod lib lint --allow-warnings | ||
- name: Push pod to test-ios repo | ||
run: | | ||
git status | ||
git config --local user.email '[email protected]' | ||
git config --local user.name ${{ github.actor }} | ||
git add . | ||
git commit -m "Update podspec repo tag:${{ github.event.release.tag_name }}" | ||
git push | ||
env: | ||
API_TOKEN_GITHUB: ${{ secrets.RIVE_REPO_PAT }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Pod::Spec.new do |spec| | ||
spec.name = "RiveRuntime" | ||
spec.version = "$RELEASE_VERSION" | ||
spec.summary = "iOS SDK for Rive" | ||
spec.description = "Rive iOS framework" | ||
spec.homepage = "https://rive.app" | ||
spec.license = { :type => "MIT", :text => <<-LICENSE | ||
Copyright (c) 2020-2021 Rive | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
LICENSE | ||
} | ||
spec.authors = { "$GITHUB_AUTHOR" => "$(git config user.email)" } | ||
spec.platform = :ios, '11.3' | ||
spec.ios.deployment_target = '11.3' | ||
spec.swift_version = '5.0' | ||
spec.source = { | ||
:git => "https://github.com/rive-app/ios-test.git", | ||
:tag => "v#{spec.version}" | ||
} | ||
spec.ios.vendored_frameworks = 'RiveRuntime.xcframework' | ||
spec.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' } | ||
spec.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' } | ||
end |
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
81 changes: 81 additions & 0 deletions
81
RiveRuntime.xcodeproj/xcshareddata/xcschemes/RiveRuntime.xcscheme
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1250" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C9C73ED024FC478800EF9516" | ||
BuildableName = "RiveRuntime.framework" | ||
BlueprintName = "RiveRuntime" | ||
ReferencedContainer = "container:RiveRuntime.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "NO" | ||
buildForProfiling = "NO" | ||
buildForArchiving = "NO" | ||
buildForAnalyzing = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C9C73ED924FC478900EF9516" | ||
BuildableName = "RiveRuntimeTests.xctest" | ||
BlueprintName = "RiveRuntimeTests" | ||
ReferencedContainer = "container:RiveRuntime.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C9C73ED024FC478800EF9516" | ||
BuildableName = "RiveRuntime.framework" | ||
BlueprintName = "RiveRuntime" | ||
ReferencedContainer = "container:RiveRuntime.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
52 changes: 52 additions & 0 deletions
52
RiveRuntime.xcodeproj/xcshareddata/xcschemes/RiveRuntimeTests.xcscheme
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1250" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C9C73ED924FC478900EF9516" | ||
BuildableName = "RiveRuntimeTests.xctest" | ||
BlueprintName = "RiveRuntimeTests" | ||
ReferencedContainer = "container:RiveRuntime.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
CLEAR='\033[0m' | ||
RED='\033[0;31m' | ||
|
||
function usage() { | ||
if [ -n "$1" ]; then | ||
echo -e "${RED}👉 $1${CLEAR}\n"; | ||
fi | ||
echo "Usage: $0 [-t target] [-c configuration]" | ||
echo " -t, --target Target (iphoneos / iphonesimulator)" | ||
echo " -c, --configuration Configuration (Debug / Release)" | ||
echo "" | ||
echo "Example: $0 --target iphoneos --configuration Debug" | ||
exit 1 | ||
} | ||
|
||
# parse params | ||
while [[ "$#" > 0 ]]; do case $1 in | ||
-t|--target) TARGET="$2"; shift;shift;; | ||
-c|--configuration) CONFIGURATION="$2";shift;shift;; | ||
*) usage "Unknown parameter passed: $1"; shift; shift;; | ||
esac; done | ||
|
||
# verify params | ||
if [ -z "$TARGET" ]; then usage "Target is not set"; fi; | ||
if [ -z "$CONFIGURATION" ]; then usage "Configuration is not set."; fi; | ||
|
||
echo -e "Build Rive Framework" | ||
echo -e "Configuration -> ${CONFIGURATION}, target -> ${TARGET}" | ||
|
||
xcodebuild -project RiveRuntime.xcodeproj -scheme RiveRuntime -sdk ${TARGET} -derivedDataPath build -configuration ${CONFIGURATION} | xcpretty |
Oops, something went wrong.