Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add script and GHA configuration to launch local HLS server #233

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
18 changes: 3 additions & 15 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ on:
jobs:
build:
name: Run unit tests and build dynamic SDK binary
runs-on: macos-13
runs-on: self-hosted
steps:
- name: Install xcbeautify
run: brew install xcbeautify
- name: Checkout
uses: actions/checkout@v3
- name: "Switch to Xcode 15.2"
run: sudo xcode-select -switch /Applications/Xcode_15.2.app
- name: "Baseline Unit Test Pass"
run: ./scripts/run-baseline-unit-test-pass.sh
- name: "🔨 Build Dynamic XCFramework"
Expand All @@ -26,14 +22,10 @@ jobs:
tests:
name: Test the SDK with a Demo App
needs: build
runs-on: macos-13
runs-on: self-hosted
steps:
- name: Install xcbeautify
run: brew install xcbeautify
- name: Checkout
uses: actions/checkout@v3
- name: "Switch to Xcode 15.2"
run: sudo xcode-select -switch /Applications/Xcode_15.2.app
- name: Download framework artifact
uses: actions/download-artifact@v3
with:
Expand All @@ -44,14 +36,10 @@ jobs:
run: "scripts/run-tests-swift-package-manager-ventura.sh"
build-static:
name: Build static SDK binary
runs-on: macos-13
runs-on: self-hosted
steps:
- name: Install xcbeautify
run: brew install xcbeautify
- name: Checkout
uses: actions/checkout@v3
- name: "Switch to Xcode 15.2"
run: sudo xcode-select -switch /Applications/Xcode_15.2.app
- name: "🔨 Build Static XCFramework"
run: ".github/workflows/scripts/build-static.sh"
- name: "Upload xcframework artifact"
Expand Down
46 changes: 46 additions & 0 deletions apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM-CI.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"configurations" : [
{
"id" : "C9F5DF09-2B97-41D0-AEFF-9DDFA7BF2B96",
"name" : "Test Scheme Action",
"options" : {

}
}
],
"defaultOptions" : {
"environmentVariableEntries" : [
{
"key" : "ENV_KEY",
"value" : ""
},
{
"key" : "PLAYBACK_ID",
"value" : ""
}
],
"targetForVariableExpansion" : {
"containerPath" : "container:MUXSDKStatsExampleSPM.xcodeproj",
"identifier" : "19CB35CB2ABD2B5C002DF48C",
"name" : "MUXSDKStatsExampleSPM"
}
},
"testTargets" : [
{
"enabled" : false,
"target" : {
"containerPath" : "container:MUXSDKStatsExampleSPM.xcodeproj",
"identifier" : "19CB35E12ABD2B5D002DF48C",
"name" : "MUXSDKStatsExampleSPMTests"
}
},
{
"target" : {
"containerPath" : "container:MUXSDKStatsExampleSPM.xcodeproj",
"identifier" : "19CB35EB2ABD2B5D002DF48C",
"name" : "MUXSDKStatsExampleSPMUITests"
}
}
],
"version" : 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
190698952BB76EDE00CE0FF7 /* CustomSessionDataExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 190698942BB76EDE00CE0FF7 /* CustomSessionDataExampleViewController.swift */; };
190698972BB7769900CE0FF7 /* MUXSDKStatsExampleSPM-CI.xctestplan in Resources */ = {isa = PBXBuildFile; fileRef = 190698962BB7769900CE0FF7 /* MUXSDKStatsExampleSPM-CI.xctestplan */; };
195762142AD64B2800128565 /* AudioOnlyPlaybackExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 195762132AD64B2800128565 /* AudioOnlyPlaybackExampleViewController.swift */; };
19C386A82AD12344009AB018 /* MultiplePlayerItemPlaybackExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19C386A72AD12343009AB018 /* MultiplePlayerItemPlaybackExampleViewController.swift */; };
19C386AA2AD3194F009AB018 /* PlayerLayerScalingExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19C386A92AD3194F009AB018 /* PlayerLayerScalingExampleViewController.swift */; };
Expand Down Expand Up @@ -42,6 +44,8 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
190698942BB76EDE00CE0FF7 /* CustomSessionDataExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomSessionDataExampleViewController.swift; sourceTree = "<group>"; };
190698962BB7769900CE0FF7 /* MUXSDKStatsExampleSPM-CI.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "MUXSDKStatsExampleSPM-CI.xctestplan"; sourceTree = "<group>"; };
194C6D432ABD518A003F965E /* mux-stats-sdk-avplayer */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "mux-stats-sdk-avplayer"; path = ../..; sourceTree = "<group>"; };
195762132AD64B2800128565 /* AudioOnlyPlaybackExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioOnlyPlaybackExampleViewController.swift; sourceTree = "<group>"; };
19ABBEA92B650DB2004A3634 /* MUXSDKStatsExampleSPM.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = MUXSDKStatsExampleSPM.xctestplan; sourceTree = "<group>"; };
Expand Down Expand Up @@ -102,6 +106,7 @@
isa = PBXGroup;
children = (
19ABBEA92B650DB2004A3634 /* MUXSDKStatsExampleSPM.xctestplan */,
190698962BB7769900CE0FF7 /* MUXSDKStatsExampleSPM-CI.xctestplan */,
194C6D422ABD518A003F965E /* Packages */,
19CB35CE2ABD2B5C002DF48C /* MUXSDKStatsExampleSPM */,
19CB35E52ABD2B5D002DF48C /* MUXSDKStatsExampleSPMTests */,
Expand Down Expand Up @@ -130,6 +135,7 @@
19C386A72AD12343009AB018 /* MultiplePlayerItemPlaybackExampleViewController.swift */,
19C386A92AD3194F009AB018 /* PlayerLayerScalingExampleViewController.swift */,
195762132AD64B2800128565 /* AudioOnlyPlaybackExampleViewController.swift */,
190698942BB76EDE00CE0FF7 /* CustomSessionDataExampleViewController.swift */,
19CB36042ABD2D63002DF48C /* ProcessInfo+Mux.swift */,
19CB35D52ABD2B5C002DF48C /* Main.storyboard */,
19CB35D82ABD2B5D002DF48C /* Assets.xcassets */,
Expand Down Expand Up @@ -268,6 +274,7 @@
19CB35DC2ABD2B5D002DF48C /* LaunchScreen.storyboard in Resources */,
19CB35D92ABD2B5D002DF48C /* Assets.xcassets in Resources */,
19CB35D72ABD2B5C002DF48C /* Main.storyboard in Resources */,
190698972BB7769900CE0FF7 /* MUXSDKStatsExampleSPM-CI.xctestplan in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -293,6 +300,7 @@
buildActionMask = 2147483647;
files = (
19CB36052ABD2D63002DF48C /* ProcessInfo+Mux.swift in Sources */,
190698952BB76EDE00CE0FF7 /* CustomSessionDataExampleViewController.swift in Sources */,
19C386AA2AD3194F009AB018 /* PlayerLayerScalingExampleViewController.swift in Sources */,
19C386A82AD12344009AB018 /* MultiplePlayerItemPlaybackExampleViewController.swift in Sources */,
19CB35D42ABD2B5C002DF48C /* BasicPlaybackExampleViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "19CB35CB2ABD2B5C002DF48C"
BuildableName = "MUXSDKStatsExampleSPM.app"
BlueprintName = "MUXSDKStatsExampleSPM"
ReferencedContainer = "container:MUXSDKStatsExampleSPM.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:MUXSDKStatsExampleSPM-CI.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "19CB35E12ABD2B5D002DF48C"
BuildableName = "MUXSDKStatsExampleSPMTests.xctest"
BlueprintName = "MUXSDKStatsExampleSPMTests"
ReferencedContainer = "container:MUXSDKStatsExampleSPM.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "19CB35EB2ABD2B5D002DF48C"
BuildableName = "MUXSDKStatsExampleSPMUITests.xctest"
BlueprintName = "MUXSDKStatsExampleSPMUITests"
ReferencedContainer = "container:MUXSDKStatsExampleSPM.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">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "19CB35CB2ABD2B5C002DF48C"
BuildableName = "MUXSDKStatsExampleSPM.app"
BlueprintName = "MUXSDKStatsExampleSPM"
ReferencedContainer = "container:MUXSDKStatsExampleSPM.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "ENV_KEY"
value = ""
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "PLAYBACK_ID"
value = ""
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "19CB35CB2ABD2B5C002DF48C"
BuildableName = "MUXSDKStatsExampleSPM.app"
BlueprintName = "MUXSDKStatsExampleSPM"
ReferencedContainer = "container:MUXSDKStatsExampleSPM.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
3 changes: 3 additions & 0 deletions apps/MUXSDKStatsExampleSPM/MUXSDKStatsExampleSPM.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
}
},
{
"skippedTests" : [
"MUXSDKStatsExampleSPMUITests\/testCustomSessionDataExample()"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test that'll use the local HLS server is skipped when running the non-CI app scheme.

],
"target" : {
"containerPath" : "container:MUXSDKStatsExampleSPM.xcodeproj",
"identifier" : "19CB35EB2ABD2B5D002DF48C",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="kWI-EU-SKA">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="kWI-EU-SKA">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand Down Expand Up @@ -42,6 +42,23 @@
</objects>
<point key="canvasLocation" x="2416" y="-79"/>
</scene>
<!--Custom Session Data Example View Controller-->
<scene sceneID="wDe-jV-01M">
<objects>
<viewController id="P9P-1d-DcD" customClass="CustomSessionDataExampleViewController" customModule="MUXSDKStatsExampleSPM" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="eu3-og-JMe">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="VQw-nG-tqW"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<accessibility key="accessibilityConfiguration" identifier="CustomSessionDataExampleView"/>
</view>
<navigationItem key="navigationItem" id="xRl-mv-3UD"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="aBZ-7i-QCZ" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1157" y="1511"/>
</scene>
<!--Player Layer Example View Controller-->
<scene sceneID="6Bb-A5-c34">
<objects>
Expand Down Expand Up @@ -275,6 +292,34 @@
<segue destination="OkB-KB-WOH" kind="show" id="Hwl-df-fFA"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="PlayerLayerExample" textLabel="cKK-yr-SeG" detailTextLabel="5BJ-Cn-2te" style="IBUITableViewCellStyleSubtitle" id="ybN-ga-mfE" userLabel="CustomSessionDataExample">
<rect key="frame" x="0.0" y="578" width="393" height="88"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ybN-ga-mfE" id="JvB-je-alr">
<rect key="frame" x="0.0" y="0.0" width="393" height="88"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Custom Session Data Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cKK-yr-SeG" userLabel="Custom Session Data Example">
<rect key="frame" x="20" y="15.666666666666666" width="315.33333333333331" height="28.666666666666668"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Send session data included with video" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5BJ-Cn-2te" userLabel="Send session data included with video">
<rect key="frame" x="20" y="48.666666666666671" width="276.66666666666669" height="19.333333333333332"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<accessibility key="accessibilityConfiguration" identifier="CustomSessionDataExample"/>
<connections>
<segue destination="P9P-1d-DcD" kind="show" id="on8-sy-Ajz"/>
</connections>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
Expand Down
Loading
Loading