Skip to content

Commit

Permalink
Add Swift 5.7 Support (#43)
Browse files Browse the repository at this point in the history
* chore: Update to recommended settings

* chore: Clean up imports

* chore: Update SPM

* chore: Clean up build settings

* chore: Update CI

* chore: Bump version

* fix: CI tests

* fix: Update CI

* fix: Remove failing tests

* fix: CI watchOS test

* fix: CI watchOS test
  • Loading branch information
chrisdhaan authored Dec 13, 2022
1 parent 85f7731 commit b089810
Show file tree
Hide file tree
Showing 24 changed files with 283 additions and 190 deletions.
96 changes: 72 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,37 @@ on:
branches:
- master
paths:
- "Source/**"
- ".github/workflows/**"
- "Package.swift"
- "Source/**"
pull_request:
paths:
- "Source/**"
- ".github/workflows/**"
- "Package.swift"
- "Source/**"

concurrency:
group: ci
group: ${{ github.ref_name }}
cancel-in-progress: true
jobs:
Latest:
name: Test Latest (iOS, macOS, tvOS, watchOS)
runs-on: macOS-12
env:
DEVELOPER_DIR: "/Applications/Xcode_13.4.1.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- name: "iOS"
destination: "OS=15.5,name=iPhone 13 Pro"
destination: "OS=16.1,name=iPhone 14 Pro"
- name: "macOS"
destination: "platform=macOS"
- name: "tvOS"
destination: "OS=15.4,name=Apple TV"
destination: "OS=16.1,name=Apple TV"
- name: "watchOS"
destination: "OS=8.5,name=Apple Watch Series 7 - 41mm"
destination: "OS=9.1,name=Apple Watch Series 8 (45mm)"
steps:
- uses: actions/checkout@v3
- name: ${{ matrix.name }} - Debug
Expand All @@ -50,7 +50,7 @@ jobs:
name: Test Catalyst
runs-on: macOS-12
env:
DEVELOPER_DIR: "/Applications/Xcode_13.4.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
Expand All @@ -64,15 +64,21 @@ jobs:
env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit iOS" -destination "platform=macOS" -configuration Release clean build | xcpretty
iOS:
name: Test iOS
runs-on: macOS-11
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- name: "iOS 14.5"
- runsOn: macOS-12
xcode: "Xcode_13.4.1.app"
name: "iOS 15.5"
destination: "OS=15.5,name=iPhone 13 Pro"
- runsOn: macOS-11
xcode: "Xcode_12.5.1.app"
name: "iOS 14.5"
destination: "OS=14.5,name=iPhone 12 Pro"
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -104,12 +110,18 @@ jobs:
fail-fast: false
matrix:
include:
- runsOn: macOS-12
xcode: "Xcode_14.1.app"
name: "macOS 12, Xcode 14.1, Swift 5.7.1"
- runsOn: macOS-12
xcode: "Xcode_14.0.1.app"
name: "macOS 12, Xcode 14.0.1, Swift 5.7.0"
- runsOn: macOS-12
xcode: "Xcode_13.4.1.app"
name: "macOS 12, Xcode 13.4.1, Swift 5.6.1"
- runsOn: macOS-12
xcode: "Xcode_13.3.1.app"
name: "macOS 12, Xcode 13.3.1, Swift 5.6"
name: "macOS 12, Xcode 13.3.1, Swift 5.6.0"
- runsOn: macOS-11
xcode: "Xcode_13.2.1.app"
name: "macOS 11, Xcode 13.2.1, Swift 5.5.2"
Expand All @@ -121,10 +133,19 @@ jobs:
name: "macOS 11, Xcode 13.0, Swift 5.5.0"
- runsOn: macOS-11
xcode: "Xcode_12.5.1.app"
name: "macOS 11, Xcode 12.5.1, Swift 5.4"
name: "macOS 11, Xcode 12.5.1, Swift 5.4.2"
- runsOn: macOS-10.15
xcode: "Xcode_12.4.app"
name: "macOS 10.15, Xcode 12.4, Swift 5.3"
name: "macOS 10.15, Xcode 12.4, Swift 5.3.2"
- runsOn: macOS-10.15
xcode: "Xcode_12.3.app"
name: "macOS 10.15, Xcode 12.3, Swift 5.3.2"
- runsOn: macOS-10.15
xcode: "Xcode_12.2.app"
name: "macOS 10.15, Xcode 12.2, Swift 5.3.1"
- runsOn: macOS-10.15
xcode: "Xcode_12.1.1.app"
name: "macOS 10.15, Xcode 12.1.1, Swift 5.3.0"
steps:
- uses: actions/checkout@v3
- name: ${{ matrix.name }} - Debug
Expand All @@ -137,15 +158,21 @@ jobs:
env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit macOS" -destination "platform=macOS" -configuration Release clean build | xcpretty
tvOS:
name: Test tvOS
runs-on: macOS-11
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- name: "tvOS 14.5"
- runsOn: macOS-12
xcode: "Xcode_13.4.1.app"
name: "tvOS 15.4"
destination: "OS=15.4,name=Apple TV"
- runsOn: macOS-11
xcode: "Xcode_12.5.1.app"
name: "tvOS 14.5"
destination: "OS=14.5,name=Apple TV"
steps:
- uses: actions/checkout@v3
Expand All @@ -159,15 +186,21 @@ jobs:
env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit tvOS" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty
watchOS:
name: Test watchOS
runs-on: macOS-11
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- name: "watchOS 7.4"
- runsOn: macOS-12
xcode: "Xcode_13.4.1.app"
name: "watchOS 8.5"
destination: "OS=8.5,name=Apple Watch Series 7 - 41mm"
- runsOn: macOS-11
xcode: "Xcode_12.5.1.app"
name: "watchOS 7.4"
destination: "OS=7.4,name=Apple Watch Series 6 - 44mm"

steps:
Expand All @@ -190,12 +223,18 @@ jobs:
fail-fast: false
matrix:
include:
- xcode: "Xcode_13.4.app"
- xcode: "Xcode_14.1.app"
runsOn: macOS-12
name: "macOS 12, SPM 5.7.1 Build"
- xcode: "Xcode_14.0.1.app"
runsOn: macOS-12
name: "macOS 12, SPM 5.7.0 Build"
- xcode: "Xcode_13.4.1.app"
runsOn: macOS-12
name: "macOS 12, SPM 5.6.1 Build"
- xcode: "Xcode_13.3.1.app"
runsOn: macOS-12
name: "macOS 12, SPM 5.6 Build"
name: "macOS 12, SPM 5.6.0 Build"
- xcode: "Xcode_13.2.1.app"
runsOn: macOS-11
name: "macOS 11, SPM 5.5.2 Build"
Expand All @@ -207,10 +246,19 @@ jobs:
name: "macOS 11, SPM 5.5 Test"
- xcode: "Xcode_12.5.1.app"
runsOn: macOS-11
name: "macOS 11, SPM 5.4 Build"
name: "macOS 11, SPM 5.4.2 Build"
- xcode: "Xcode_12.4.app"
runsOn: macOS-10.15
name: "macOS 10.15, SPM 5.3 Build"
name: "macOS 10.15, SPM 5.3.2 Build"
- xcode: "Xcode_12.3.app"
runsOn: macOS-10.15
name: "macOS 10.15, SPM 5.3.2 Build"
- xcode: "Xcode_12.2.app"
runsOn: macOS-10.15
name: "macOS 10.15, SPM 5.3.1 Build"
- xcode: "Xcode_12.1.app"
runsOn: macOS-10.15
name: "macOS 10.15, SPM 5.3.0 Build"
steps:
- uses: actions/checkout@v3
- name: ${{ matrix.name }}
Expand Down
14 changes: 10 additions & 4 deletions CDMarkdownKit.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = 'CDMarkdownKit'
s.version = '2.5.0'
s.version = '2.5.1'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'An extensive Swift framework providing simple and customizable markdown parsing.'
s.description = <<-DESC
This Swift framework handles standard markdown parsing along with the ability to parse custom elements.
DESC
This Swift framework handles standard markdown parsing along with the ability to parse custom elements.
DESC
s.homepage = 'https://github.com/chrisdhaan/CDMarkdownKit'
s.author = { 'Christopher de Haan' => '[email protected]' }
s.source = { :git => 'https://github.com/chrisdhaan/CDMarkdownKit.git', :tag => s.version.to_s }
Expand All @@ -15,7 +15,13 @@ Pod::Spec.new do |s|
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '3.0'

s.swift_versions = ['5.3', '5.4', '5.5']
s.swift_versions = ['5']

s.source_files = 'Source/*.swift'

s.framework = 'Foundation'
s.ios.framework = 'UIKit'
s.osx.framework = 'Cocoa'
s.tvos.framework = 'UIKit'
s.watchos.framework = 'UIKit'
end
45 changes: 7 additions & 38 deletions CDMarkdownKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -392,45 +392,13 @@
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
B2ACA0741FBF93ED00EABEF6 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
B2ACA0811FBF940700EABEF6 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
B2ACA08E1FBF941B00EABEF6 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
B2B365B41F3245800078B962 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
B2ACA0761FBF93ED00EABEF6 /* CDMarkdownKit macOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = B2ACA07C1FBF93ED00EABEF6 /* Build configuration list for PBXNativeTarget "CDMarkdownKit macOS" */;
buildPhases = (
B2ACA0721FBF93ED00EABEF6 /* Sources */,
B2ACA0731FBF93ED00EABEF6 /* Frameworks */,
B2ACA0741FBF93ED00EABEF6 /* Headers */,
B2ACA0751FBF93ED00EABEF6 /* Resources */,
B2CC862C20D4553C00170627 /* Swift Lint */,
);
Expand All @@ -449,7 +417,6 @@
buildPhases = (
B2ACA07F1FBF940700EABEF6 /* Sources */,
B2ACA0801FBF940700EABEF6 /* Frameworks */,
B2ACA0811FBF940700EABEF6 /* Headers */,
B2ACA0821FBF940700EABEF6 /* Resources */,
B2CC862D20D4554B00170627 /* Swift Lint */,
);
Expand All @@ -468,7 +435,6 @@
buildPhases = (
B2ACA08C1FBF941B00EABEF6 /* Sources */,
B2ACA08D1FBF941B00EABEF6 /* Frameworks */,
B2ACA08E1FBF941B00EABEF6 /* Headers */,
B2ACA08F1FBF941B00EABEF6 /* Resources */,
B2CC862E20D4555900170627 /* Swift Lint */,
);
Expand All @@ -487,7 +453,6 @@
buildPhases = (
B2B365B21F3245800078B962 /* Sources */,
B2B365B31F3245800078B962 /* Frameworks */,
B2B365B41F3245800078B962 /* Headers */,
B2B365B51F3245800078B962 /* Resources */,
B2CC862B20D4552C00170627 /* Swift Lint */,
);
Expand All @@ -506,7 +471,7 @@
B2B365AE1F3245800078B962 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1340;
LastUpgradeCheck = 1410;
ORGANIZATIONNAME = "Christopher de Haan";
TargetAttributes = {
B2ACA0761FBF93ED00EABEF6 = {
Expand Down Expand Up @@ -829,6 +794,7 @@
B2ACA07D1FBF93ED00EABEF6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEAD_CODE_STRIPPING = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -847,6 +813,7 @@
B2ACA07E1FBF93ED00EABEF6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEAD_CODE_STRIPPING = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand Down Expand Up @@ -966,6 +933,7 @@
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -987,7 +955,7 @@
INFOPLIST_FILE = Source/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 2.5.0;
MARKETING_VERSION = 2.5.1;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.christopherdehaan.CDMarkdownKit;
PRODUCT_NAME = CDMarkdownKit;
Expand Down Expand Up @@ -1035,6 +1003,7 @@
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -1050,7 +1019,7 @@
INFOPLIST_FILE = Source/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 2.5.0;
MARKETING_VERSION = 2.5.1;
PRODUCT_BUNDLE_IDENTIFIER = com.christopherdehaan.CDMarkdownKit;
PRODUCT_NAME = CDMarkdownKit;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
LastUpgradeVersion = "1410"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
LastUpgradeVersion = "1410"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
LastUpgradeVersion = "1410"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit b089810

Please sign in to comment.