-
Notifications
You must be signed in to change notification settings - Fork 1
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 #6 from SomeRandomiOSDev/Updates
Regenerated project using the latest from https://github.com/SomeRandomiOSDev/ProjectTemplate
- Loading branch information
Showing
48 changed files
with
2,015 additions
and
747 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
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 |
---|---|---|
@@ -1,23 +1,52 @@ | ||
name: Cocoapods | ||
on: [push, workflow_dispatch] | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '**' | ||
paths-ignore: | ||
- .gitignore | ||
- LICENSE | ||
- README.md | ||
|
||
jobs: | ||
lint: | ||
strategy: | ||
matrix: | ||
linttype: [Dynamic, Static] | ||
|
||
name: Lint | ||
runs-on: macOS-latest | ||
env: | ||
LOGSDIR: /tmp/.keyvalueobservation.cocoapods/Logs | ||
LINT_TYPE: ${{ matrix.linttype }} | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Environment | ||
run: | | ||
mkdir -p "$LOGSDIR" | ||
- name: Setup Cocoapods | ||
uses: maxim-lobanov/setup-cocoapods@v1 | ||
with: | ||
version: latest | ||
|
||
- name: Lint (Dynamic Library) | ||
- name: Lint | ||
run: | | ||
pod lib lint --skip-tests | ||
if [ "$LINT_TYPE" == "Dynamic" ]; then | ||
pod lib lint --verbose 2>&1 | tee "$LOGSDIR/PodLint-$LINT_TYPE.log" | ||
else | ||
pod lib lint --verbose --use-libraries 2>&1 | tee "$LOGSDIR/PodLint-$LINT_TYPE.log" | ||
fi | ||
- name: Lint (Static Library) | ||
run: | | ||
pod lib lint --use-libraries --skip-tests | ||
- name: Upload Logs | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: Logs | ||
path: ${{ env.LOGSDIR }}/*.log |
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,24 @@ | ||
name: Publish CocoaPods | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
name: Publish CocoaPods | ||
runs-on: macOS-latest | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup CocoaPods | ||
uses: maxim-lobanov/setup-cocoapods@v1 | ||
with: | ||
version: latest | ||
|
||
- name: Publish CocoaPod | ||
run: | | ||
pod trunk push KeyValueObservation.podspec |
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
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 |
---|---|---|
@@ -1,102 +1,200 @@ | ||
name: Xcode Project | ||
on: [push, workflow_dispatch] | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '**' | ||
paths-ignore: | ||
- .gitignore | ||
- LICENSE | ||
- README.md | ||
|
||
jobs: | ||
ios: | ||
name: iOS | ||
runs-on: macOS-latest | ||
env: | ||
LOGSDIR: /tmp/.keyvalueobservation.xcodebuild/iOS/Logs | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Environment | ||
run: | | ||
mkdir -p "$LOGSDIR" | ||
- name: Build iOS | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS" -configuration Debug | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS" -configuration Debug 2>&1 | tee "$LOGSDIR/build-ios.log" | ||
- name: Build iOS Simulator | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS Simulator" -configuration Debug | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS Simulator" -configuration Debug 2>&1 | tee "$LOGSDIR/build-iossimulator.log" | ||
- name: Test | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=iOS Simulator,name=iPhone 12 Pro Max" -configuration Debug ONLY_ACTIVE_ARCH=YES test | ||
IOS_SIM="$(xcrun simctl list devices available | grep "iPhone [0-9]" | sort -rV | head -n 1 | sed -E 's/(.+)[ ]*\([^)]*\)[ ]*\([^)]*\)/\1/' | awk '{$1=$1};1')" | ||
if [ "${#IOS_SIM}" == "0" ]; then | ||
IOS_SIM = "iPhone 12 Pro" # Fallback Simulator | ||
fi | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=iOS Simulator,name=$IOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-ios.log" | ||
- name: Upload Logs | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: iOSBuildLogs | ||
path: ${{ env.LOGSDIR }}/*.log | ||
|
||
maccatalyst: | ||
name: Mac Catalyst | ||
runs-on: macOS-latest | ||
env: | ||
LOGSDIR: /tmp/.keyvalueobservation.xcodebuild/macCatalyst/Logs | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Environment | ||
run: | | ||
mkdir -p "$LOGSDIR" | ||
- name: Build | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=macOS,variant=Mac Catalyst" -configuration Debug | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=macOS,variant=Mac Catalyst" -configuration Debug 2>&1 | tee "$LOGSDIR/build-maccatalyst.log" | ||
- name: Test | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=macOS,variant=Mac Catalyst" -configuration Debug ONLY_ACTIVE_ARCH=YES test | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=macOS,variant=Mac Catalyst" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-maccatalyst.log" | ||
- name: Upload Logs | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: MacCatalystBuildLogs | ||
path: ${{ env.LOGSDIR }}/*.log | ||
|
||
macos: | ||
name: macOS | ||
runs-on: macOS-latest | ||
env: | ||
LOGSDIR: /tmp/.keyvalueobservation.xcodebuild/macOS/Logs | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Environment | ||
run: | | ||
mkdir -p "$LOGSDIR" | ||
- name: Build | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -destination "generic/platform=macOS" -configuration Debug | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -destination "generic/platform=macOS" -configuration Debug 2>&1 | tee "$LOGSDIR/build-macos.log" | ||
- name: Test | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -testPlan "KeyValueObservation macOS Tests" -configuration Debug -enableCodeCoverage YES test | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -testPlan "KeyValueObservation macOS Tests" -derivedDataPath ".xcodebuild" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-macos.log" | ||
- name: Generate Code Coverage File | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
run: | | ||
PROFDATA_FILE="$(find .xcodebuild -name "*.profdata")" | ||
xcrun llvm-cov export --format=lcov --instr-profile="$PROFDATA_FILE" ".xcodebuild/Build/Products/Debug/KeyValueObservationTests.xctest/Contents/MacOS/KeyValueObservationTests" > "./codecov.lcov" | ||
- name: Upload Code Coverage | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./codecov.lcov | ||
verbose: true | ||
|
||
- name: Upload Logs | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: macOSBuildLogs | ||
path: ${{ env.LOGSDIR }}/*.log | ||
|
||
tvos: | ||
name: tvOS | ||
runs-on: macOS-latest | ||
env: | ||
LOGSDIR: /tmp/.keyvalueobservation.xcodebuild/tvOS/Logs | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Environment | ||
run: | | ||
mkdir -p "$LOGSDIR" | ||
- name: Build tvOS | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS" -configuration Debug | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS" -configuration Debug 2>&1 | tee "$LOGSDIR/build-tvos.log" | ||
- name: Build tvOS Simulator | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS Simulator" -configuration Debug | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS Simulator" -configuration Debug 2>&1 | tee "$LOGSDIR/build-tvossimulator.log" | ||
- name: Test | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -testPlan "KeyValueObservation tvOS Tests" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES test | ||
TVOS_SIM="$(xcrun simctl list devices available | grep "Apple TV" | sort -V | head -n 1 | sed -E 's/(.+)[ ]*\([^)]*\)[ ]*\([^)]*\)/\1/' | awk '{$1=$1};1')" | ||
if [ "${#TVOS_SIM}" == "0" ]; then | ||
TVOS_SIM = "Apple TV" # Fallback Simulator | ||
fi | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -testPlan "KeyValueObservation tvOS Tests" -destination "platform=tvOS Simulator,name=$TVOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-tvos.log" | ||
- name: Upload Logs | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: tvOSBuildLogs | ||
path: ${{ env.LOGSDIR }}/*.log | ||
|
||
watchos: | ||
name: watchOS | ||
runs-on: macOS-11 | ||
env: | ||
LOGSDIR: /tmp/.keyvalueobservation.xcodebuild/watchOS/Logs | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Environment | ||
run: | | ||
mkdir -p "$LOGSDIR" | ||
- name: Build watchOS | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS" -configuration Debug | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS" -configuration Debug 2>&1 | tee "$LOGSDIR/build-watchos.log" | ||
- name: Build watchOS Simulator | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS Simulator" -configuration Debug | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS Simulator" -configuration Debug 2>&1 | tee "$LOGSDIR/build-watchossimulator.log" | ||
- name: Test | ||
run: | | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -testPlan "KeyValueObservation watchOS Tests" -destination "platform=watchOS Simulator,name=Apple Watch Series 6 - 44mm" -configuration Debug ONLY_ACTIVE_ARCH=YES test | ||
WATCHOS_SIM="$(xcrun simctl list devices available | grep "Apple Watch" | sort -rV | head -n 1 | sed -E 's/(.+)[ ]*\([^)]*\)[ ]*\([^)]*\)/\1/' | awk '{$1=$1};1')" | ||
if [ "${#WATCHOS_SIM}" == "0" ]; then | ||
WATCHOS_SIM = "Apple Watch Series 6 - 44mm" # Fallback Simulator | ||
fi | ||
xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -testPlan "KeyValueObservation watchOS Tests" -destination "platform=watchOS Simulator,name=$WATCHOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-watchos.log" | ||
- name: Upload Logs | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: watchOSBuildLogs | ||
path: ${{ env.LOGSDIR }}/*.log |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
KeyValueObservation.xcodeproj/project.xcworkspace | ||
KeyValueObservation.xcodeproj/xcuserdata | ||
|
||
.xcodebuild | ||
scripts/build |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.