Skip to content

Commit

Permalink
👷 각 패키지 별 CI 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
SwiftyJunnos committed Nov 25, 2023
1 parent 7a7cb81 commit 46bc558
Show file tree
Hide file tree
Showing 14 changed files with 563 additions and 167 deletions.
74 changes: 58 additions & 16 deletions .github/workflows/Xcode_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,73 @@ on:
types: [assigned, labeled, opened, synchronize, reopened]

jobs:
build-and-test:
prepare-matrix:
runs-on: macos-13
env:
working-directory: ./iOS
strategy:
matrix:
package: [MSCoreKit, MSFoundation, MSUIKit]
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Xcode Setup
- name: Setup Xcode
if: ${{ !env.ACT }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest

- name: Generate matrix
id: set-matrix
run: |
matrix="{\"include\":["
first_entry=true
for package in MSCoreKit MSFoundation MSUIKit; do
cd $package
for scheme in $(xcodebuild -list | grep -E '^[[:space:]]*Schemes:' -A 10 | tail -n +2 | grep -v '^$'); do
if [[ $scheme != *"-Package" ]]; then
if [ "$first_entry" = true ]; then
first_entry=false
else
matrix+=","
fi
matrix+="{\"package\":\"$package\", \"scheme\":\"$scheme\"}"
fi
done
cd ..
done
matrix+="]}"
echo "::set-output name=matrix:: $matrix"
build-and-test:
needs: prepare-matrix
runs-on: macos-13
strategy:
fail-fast: false
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Xcode
if: ${{ !env.ACT }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest

- name: Build ${{ matrix.package }}
run: xcodebuild \
-scheme ${{ matrix.package }} \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 15' \
build
- name: 🛠️ Build ${{ matrix.scheme }}
if: ${{ !contains(matrix.scheme, 'Tests') }}
run: |
echo "🛠️ Building ${{ matrix.package }} - Scheme: ${{ matrix.scheme }}"
xcodebuild \
-scheme ${{ matrix.scheme }} \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro' \
clean build
- name: Test ${{ matrix.package }}
run: xcodebuild test \
-scheme ${{ matrix.package }} \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17.0'
- name: 🧪 Test ${{ matrix.scheme }}
if: ${{ contains(matrix.scheme, 'Tests') }}
run: |
echo "🧪 Testing ${{ matrix.package }} - Scheme: ${{ matrix.scheme }}"
xcodebuild clean test \
-scheme ${{ matrix.scheme }} \
-destination 'platform=iOS Simulator,name=iPhone 14 Pro'
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?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 = "MSCacheStorage"
BuildableName = "MSCacheStorage"
BlueprintName = "MSCacheStorage"
ReferencedContainer = "container:">
</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">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MSCacheStorage"
BuildableName = "MSCacheStorage"
BlueprintName = "MSCacheStorage"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</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,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MSCacheStorageTests"
BuildableName = "MSCacheStorageTests"
BlueprintName = "MSCacheStorageTests"
ReferencedContainer = "container:">
</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>
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MSFoundation"
BuildableName = "MSFoundation"
BlueprintName = "MSFoundation"
BlueprintIdentifier = "MSFetcher"
BuildableName = "MSFetcher"
BlueprintName = "MSFetcher"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
Expand Down Expand Up @@ -49,9 +49,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MSFoundation"
BuildableName = "MSFoundation"
BlueprintName = "MSFoundation"
BlueprintIdentifier = "MSFetcher"
BuildableName = "MSFetcher"
BlueprintName = "MSFetcher"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MSFetcherTests"
BuildableName = "MSFetcherTests"
BlueprintName = "MSFetcherTests"
ReferencedContainer = "container:">
</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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?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 = "MSNetworking"
BuildableName = "MSNetworking"
BlueprintName = "MSNetworking"
ReferencedContainer = "container:">
</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">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "MSNetworking"
BuildableName = "MSNetworking"
BlueprintName = "MSNetworking"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading

0 comments on commit 46bc558

Please sign in to comment.