-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from mercari/work/ci
Setup CI with GitHub Actions
- Loading branch information
Showing
5 changed files
with
184 additions
and
1 deletion.
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,35 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
run: set -o pipefail && make build-library | xcpretty | ||
|
||
test: | ||
name: Test | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Test | ||
run: set -o pipefail && make test-library | xcpretty | ||
|
||
build-example: | ||
name: Build Example app | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
run: set -o pipefail && make build-example | xcpretty |
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 @@ | ||
WORKSPACE_PATH := SwiftUIChart.xcworkspace | ||
|
||
LIBRARY_SCHEME := "SwiftUI Chart" | ||
EXAMPLE_APP_SCHEME := Example | ||
|
||
DESTINATION_TARGET := platform="iOS Simulator,name=iPhone 14 Pro,OS=16.4" | ||
|
||
|
||
.PHONY: open | ||
open: | ||
open ${WORKSPACE_PATH} | ||
|
||
.PHONY: build-library | ||
build-library: | ||
@xcodebuild build \ | ||
-workspace ${WORKSPACE_PATH} \ | ||
-scheme ${LIBRARY_SCHEME} \ | ||
-destination ${DESTINATION_TARGET} | ||
|
||
.PHONY: test-library | ||
test-library: | ||
@xcodebuild test \ | ||
-workspace ${WORKSPACE_PATH} \ | ||
-scheme ${LIBRARY_SCHEME} \ | ||
-destination ${DESTINATION_TARGET} | ||
|
||
.PHONY: build-example | ||
build-example: | ||
@xcodebuild build \ | ||
-workspace ${WORKSPACE_PATH} \ | ||
-scheme ${EXAMPLE_APP_SCHEME} \ | ||
-destination ${DESTINATION_TARGET} |
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,31 @@ | ||
{ | ||
"configurations" : [ | ||
{ | ||
"id" : "7C60ABA9-5C92-4774-90CC-FF681D51F465", | ||
"name" : "Configuration 1", | ||
"options" : { | ||
|
||
} | ||
} | ||
], | ||
"defaultOptions" : { | ||
"testTimeoutsEnabled" : true | ||
}, | ||
"testTargets" : [ | ||
{ | ||
"target" : { | ||
"containerPath" : "container:", | ||
"identifier" : "ChartCoreTests", | ||
"name" : "ChartCoreTests" | ||
} | ||
}, | ||
{ | ||
"target" : { | ||
"containerPath" : "container:", | ||
"identifier" : "LineChartTests", | ||
"name" : "LineChartTests" | ||
} | ||
} | ||
], | ||
"version" : 1 | ||
} |
85 changes: 85 additions & 0 deletions
85
SwiftUIChart.xcworkspace/xcshareddata/xcschemes/SwiftUI Chart.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,85 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1430" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "ChartCore" | ||
BuildableName = "ChartCore" | ||
BlueprintName = "ChartCore" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "LineChart" | ||
BuildableName = "LineChart" | ||
BlueprintName = "LineChart" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<TestPlans> | ||
<TestPlanReference | ||
reference = "container:SwiftUIChart.xctestplan" | ||
default = "YES"> | ||
</TestPlanReference> | ||
</TestPlans> | ||
</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 = "ChartCore" | ||
BuildableName = "ChartCore" | ||
BlueprintName = "ChartCore" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |