-
Notifications
You must be signed in to change notification settings - Fork 11
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 #17 from SomeRandomiOSDev/Modernize
Modernized the project
- Loading branch information
Showing
48 changed files
with
1,707 additions
and
1,039 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Carthage | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: macOS-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Carthage | ||
run: | | ||
brew update | ||
brew install carthage | ||
- name: Create Cartfile | ||
run: | | ||
# Delete all of the old tags (if any) and create a new tag for building | ||
git tag | xargs git tag -d | ||
git tag 1.0 | ||
echo "git \"file://$(pwd)\"" > ./Cartfile | ||
- name: Build | ||
run: | | ||
./scripts/carthage.sh update |
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,23 @@ | ||
name: Cocoapods | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: macOS-11 | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Cocoapods | ||
uses: maxim-lobanov/setup-cocoapods@v1 | ||
with: | ||
version: latest | ||
|
||
- name: Lint (Dynamic Library) | ||
run: | | ||
pod lib lint | ||
- name: Lint (Static Library) | ||
run: | | ||
pod lib lint --use-libraries |
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,50 @@ | ||
name: Swift Package | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [macOS-latest, ubuntu-latest] | ||
|
||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: | | ||
swift --version | ||
swift build -v | ||
test: | ||
strategy: | ||
matrix: | ||
os: [macOS-latest, ubuntu-latest] | ||
|
||
name: Test | ||
runs-on: ${{ matrix.os }} | ||
needs: build | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: | | ||
swift test -v --enable-code-coverage | ||
- name: Generate Code Coverage File | ||
if: ${{ runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
run: | | ||
xcrun llvm-cov export --instr-profile=.build/x86_64-apple-macosx/debug/codecov/default.profdata .build/x86_64-apple-macosx/debug/CBORCodingPackageTests.xctest/Contents/MacOS/CBORCodingPackageTests > ./info.lcov | ||
- name: Upload Code Coverage | ||
if: ${{ runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./info.lcov | ||
verbose: true |
This file was deleted.
Oops, something went wrong.
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,49 @@ | ||
name: Upload Assets | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: Upload Assets | ||
runs-on: macOS-latest | ||
env: | ||
TMPDIR: /tmp/.cborcoding.xcframework.build | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: | | ||
./scripts/xcframework.sh -output ${TMPDIR}/CBORCoding.xcframework | ||
- name: Create Zip | ||
run: | | ||
cd ${TMPDIR} | ||
zip -rX CBORCoding.xcframework.zip CBORCoding.xcframework | ||
- name: Upload Zip | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{ env.TMPDIR }}/CBORCoding.xcframework.zip | ||
asset_name: CBORCoding.xcframework.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Create Tar | ||
run: | | ||
cd ${TMPDIR} | ||
tar -zcvf CBORCoding.xcframework.tar.gz CBORCoding.xcframework | ||
- name: Upload Tar | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{ env.TMPDIR }}/CBORCoding.xcframework.tar.gz | ||
asset_name: CBORCoding.xcframework.tar.gz | ||
asset_content_type: application/gzip |
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,17 @@ | ||
name: XCFramework | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: macOS-latest | ||
env: | ||
TMPDIR: /tmp/.cborcoding.xcframework.build | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: | | ||
./scripts/xcframework.sh -output ${TMPDIR}/CBORCoding.xcframework |
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,110 @@ | ||
name: Xcode Project | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
ios: | ||
name: iOS | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build iOS | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding" -destination "generic/platform=iOS" -configuration Debug | ||
- name: Build iOS Simulator | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding" -destination "generic/platform=iOS Simulator" -configuration Debug | ||
- name: Test | ||
run: | | ||
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 CBORCoding.xcodeproj -scheme "CBORCoding" -testPlan "CBORCodingTests" -destination "platform=iOS Simulator,name=$IOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test | ||
maccatalyst: | ||
name: Mac Catalyst | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding" -destination "generic/platform=macOS,variant=Mac Catalyst" -configuration Debug | ||
- name: Test | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding" -testPlan "CBORCodingTests" -destination "platform=macOS,variant=Mac Catalyst" -configuration Debug ONLY_ACTIVE_ARCH=YES test | ||
macos: | ||
name: macOS | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding macOS" -destination "generic/platform=macOS" -configuration Debug | ||
- name: Test | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding macOS" -testPlan "CBORCoding macOS Tests" -configuration Debug ONLY_ACTIVE_ARCH=YES test | ||
tvos: | ||
name: tvOS | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build tvOS | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding tvOS" -destination "generic/platform=tvOS" -configuration Debug | ||
- name: Build tvOS Simulator | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding tvOS" -destination "generic/platform=tvOS Simulator" -configuration Debug | ||
- name: Test | ||
run: | | ||
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 CBORCoding.xcodeproj -scheme "CBORCoding tvOS" -testPlan "CBORCoding tvOS Tests" -destination "platform=tvOS Simulator,name=$TVOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test | ||
watchos: | ||
name: watchOS | ||
runs-on: macOS-11 | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build watchOS | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding watchOS" -destination "generic/platform=watchOS" -configuration Debug | ||
- name: Build watchOS Simulator | ||
run: | | ||
xcodebuild -project CBORCoding.xcodeproj -scheme "CBORCoding watchOS" -destination "generic/platform=watchOS Simulator" -configuration Debug | ||
- name: Test | ||
run: | | ||
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 CBORCoding.xcodeproj -scheme "CBORCoding watchOS" -testPlan "CBORCoding watchOS Tests" -destination "platform=watchOS Simulator,name=$WATCHOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test |
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,8 +1,7 @@ | ||
CBORCoding.xcodeproj/project.xcworkspace/xcuserdata | ||
CBORCoding.xcodeproj/xcuserdata | ||
CBORCoding.xcworkspace/xcuserdata | ||
|
||
.build | ||
.swiftpm | ||
IDEWorkspaceChecks.plist | ||
Pods | ||
Carthage | ||
scripts/build |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.