Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ci/build/build_ios.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ def doPublish(buildVariables) {
sh "rm -rf *.zip *.ipa || true"
}

pipelineLoad(this, "ApiExample", "build", "ios", "apiexample_mac")
pipelineLoad(this, "ApiExample", "build", "ios", "RTC-Sample")
37 changes: 37 additions & 0 deletions .github/ci/build/build_ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
# pr: output test.zip to workspace dir
# others: Rename the zip package name yourself, But need copy it to workspace dir
##################################
export PATH=$PATH:/opt/homebrew/bin

xcode_version=$(xcodebuild -version | grep Xcode | awk '{print $2}')
echo "Xcode Version: $xcode_version"
echo ios_direction: $ios_direction
Expand All @@ -61,6 +63,12 @@ export LANG=en_US.UTF-8
unzip_name=Agora_Native_SDK_for_iOS_FULL
zip_name=output.zip
sdk_url_flag=false
apiexample_cn_name=Shengwang_Native_SDK_for_iOS
apiexample_global_name=Agora_Native_SDK_for_iOS
cn_dir=CN
global_dir=Global


if [ -z "$sdk_url" ]; then
sdk_url_flag=false
echo "sdk_url is empty"
Expand Down Expand Up @@ -99,6 +107,35 @@ echo "start move to"
echo $WORKSPACE/with${ios_direction}_${BUILD_NUMBER}_$zip_name
mv result.zip $WORKSPACE/with${ios_direction}_${BUILD_NUMBER}_$zip_name

if [ $compress_apiexample = true ]; then
sdk_version=$(grep "pod 'AgoraRtcEngine_iOS'" ./iOS/${ios_direction}/Podfile | sed -n "s/.*'\([0-9.]*\)'.*/\1/p")
echo "sdk_version: $sdk_version"

mkdir -p $cn_dir $global_dir
cp -rf ./iOS/${ios_direction} $cn_dir/
cp -rf ./iOS/${ios_direction} $global_dir/
cd $cn_dir/${ios_direction}
./cloud_project.sh || exit 1
cd -
echo "start compress api example"
7za a -tzip cn_result.zip $cn_dir
7za a -tzip global_result.zip $global_dir
echo "complete compress api example"
echo "current path: `pwd`"
ls -al
cn_des_path=$WORKSPACE/${apiexample_cn_name}_${sdk_version}_${BUILD_NUMBER}_APIExample.zip
global_des_path=$WORKSPACE/${apiexample_global_name}_${sdk_version}_${BUILD_NUMBER}_APIExample.zip
echo "cn_des_path: $cn_des_path"
echo "Moving cn_result.zip to $cn_des_path"
mv cn_result.zip $cn_des_path

echo "global_des_path: $global_des_path"
echo "Moving global_result.zip to $global_des_path"
mv global_result.zip $global_des_path

ls -al $WORKSPACE/
fi

if [ $compile_project = true ]; then
cd ./$unzip_name/samples/${ios_direction}
./cloud_build.sh || exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/ci/build/build_mac.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ def doPublish(buildVariables) {
sh "rm -rf *.zip || true"
}

pipelineLoad(this, "ApiExample", "build", "mac", "apiexample_mac")
pipelineLoad(this, "ApiExample", "build", "mac", "RTC-Sample")
33 changes: 29 additions & 4 deletions .github/ci/build/build_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
# pr: output test.zip to workspace dir
# others: Rename the zip package name yourself, But need copy it to workspace dir
##################################
export PATH=$PATH:/opt/homebrew/bin

echo compile_project:$compile_project
echo Package_Publish: $Package_Publish
Expand All @@ -59,6 +60,10 @@ export LANG=en_US.UTF-8
unzip_name=Agora_Native_SDK_for_iOS_FULL
zip_name=output.zip
sdk_url_flag=false
apiexample_cn_name=Shengwang_Native_SDK_for_Mac
apiexample_global_name=Agora_Native_SDK_for_Mac
cn_dir=CN
global_dir=Global

echo zip_name: $zip_name
if [ -z "$sdk_url" ]; then
Expand Down Expand Up @@ -92,13 +97,33 @@ else
fi

python3 ./.github/ci/build/modify_podfile.py ./$unzip_name/samples/APIExample/Podfile $sdk_url_flag

echo "start compress"
7za a -tzip result.zip -r $unzip_name
cp result.zip $WORKSPACE/withAPIExample_${BUILD_NUMBER}_$zip_name

if [ $compile_project = true ]; then
cd ./$unzip_name/samples/APIExample
./cloud_build.sh || exit 1
if [ $compress_apiexample = true ]; then
sdk_version=$(grep "pod 'AgoraRtcEngine_iOS'" ./iOS/${ios_direction}/Podfile | sed -n "s/.*'\([0-9.]*\)'.*/\1/p")
echo "sdk_version: $sdk_version"

mkdir -p $cn_dir $global_dir
cp -rf ./iOS/${ios_direction} $cn_dir/
cp -rf ./iOS/${ios_direction} $global_dir/
cd $cn_dir/${ios_direction}
./cloud_project.sh || exit 1
cd -
fi
echo "start compress api example"
7za a -tzip cn_result.zip $cn_dir > log.txt
7za a -tzip global_result.zip $global_dir > log.txt

mv cn_result.zip $WORKSPACE/${apiexample_cn_name}_${sdk_version}_${BUILD_NUMBER}_APIExample.zip
mv global_result.zip $WORKSPACE/${apiexample_global_name}_${sdk_version}${BUILD_NUMBER}_APIExample.zip
fi

#if [ $compile_project = true ]; then
# cd ./$unzip_name/samples/APIExample
# ./cloud_build.sh || exit 1
# cd -
#fi


1 change: 0 additions & 1 deletion iOS/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*.xcscmblueprint
*.framework
*.xcworkspacedata
xcshareddata

*.zip
agora_sdk
Expand Down
2 changes: 2 additions & 0 deletions iOS/APIExample-Audio/cloud_build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env sh
export LANG=en_US.UTF-8
export PATH=$PATH:/opt/homebrew/bin

PROJECT_PATH=$PWD

Expand Down
14 changes: 14 additions & 0 deletions iOS/APIExample-Audio/cloud_project.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env sh

PROJECT_PATH=$PWD

if [ "$WORKSPACE" = "" ]; then
WORKSPACE=$PWD
fi
if [ "$BUILD_NUMBER" = "" ]; then
BUILD_NUMBER=888
fi


cd ${PROJECT_PATH} && pod install || exit 1

2 changes: 2 additions & 0 deletions iOS/APIExample-OC/cloud_build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env sh
export LANG=en_US.UTF-8
export PATH=$PATH:/opt/homebrew/bin

PROJECT_PATH=$PWD

Expand Down
14 changes: 14 additions & 0 deletions iOS/APIExample-OC/cloud_project.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env sh

PROJECT_PATH=$PWD

if [ "$WORKSPACE" = "" ]; then
WORKSPACE=$PWD
fi
if [ "$BUILD_NUMBER" = "" ]; then
BUILD_NUMBER=888
fi


cd ${PROJECT_PATH} && pod install || exit 1

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4C9306882CB9607E0085EFF9"
BuildableName = "APIExample-SwiftUI.app"
BlueprintName = "APIExample-SwiftUI"
ReferencedContainer = "container:APIExample-SwiftUI.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</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">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4C9306882CB9607E0085EFF9"
BuildableName = "APIExample-SwiftUI.app"
BlueprintName = "APIExample-SwiftUI"
ReferencedContainer = "container:APIExample-SwiftUI.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4C9306882CB9607E0085EFF9"
BuildableName = "APIExample-SwiftUI.app"
BlueprintName = "APIExample-SwiftUI"
ReferencedContainer = "container:APIExample-SwiftUI.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4C9307D12CB963380085EFF9"
BuildableName = "Agora-ScreenShare-Extension.appex"
BlueprintName = "Agora-ScreenShare-Extension"
ReferencedContainer = "container:APIExample-SwiftUI.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4C9306882CB9607E0085EFF9"
BuildableName = "APIExample-SwiftUI.app"
BlueprintName = "APIExample-SwiftUI"
ReferencedContainer = "container:APIExample-SwiftUI.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
askForAppToLaunch = "Yes"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4C9306882CB9607E0085EFF9"
BuildableName = "APIExample-SwiftUI.app"
BlueprintName = "APIExample-SwiftUI"
ReferencedContainer = "container:APIExample-SwiftUI.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4C9306882CB9607E0085EFF9"
BuildableName = "APIExample-SwiftUI.app"
BlueprintName = "APIExample-SwiftUI"
ReferencedContainer = "container:APIExample-SwiftUI.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 2 additions & 0 deletions iOS/APIExample-SwiftUI/cloud_build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env sh
export LANG=en_US.UTF-8
export PATH=$PATH:/opt/homebrew/bin

PROJECT_PATH=$PWD

Expand Down
14 changes: 14 additions & 0 deletions iOS/APIExample-SwiftUI/cloud_project.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env sh

PROJECT_PATH=$PWD

if [ "$WORKSPACE" = "" ]; then
WORKSPACE=$PWD
fi
if [ "$BUILD_NUMBER" = "" ]; then
BUILD_NUMBER=888
fi


cd ${PROJECT_PATH} && pod install || exit 1

Loading
Loading