Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for macCatalyst and visionOS. Drop earlier version support. #81

Merged
merged 6 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 38 additions & 60 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
pod-lint:
name: Pod Lint
runs-on: macOS-11
runs-on: macOS-13
steps:
- uses: ruby/setup-ruby@v1
with:
Expand All @@ -19,34 +19,17 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Lint Podspec
run: bundle exec pod lib lint --verbose --fail-fast --swift-version=5.1
carthage:
name: Carthage
runs-on: macOS-11
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.3'
- name: Checkout Repo
uses: actions/checkout@v3
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
- name: Install Carthage
run: brew outdated carthage || brew upgrade carthage
- name: Build Framework
run: swift package generate-xcodeproj --output generated/ && carthage build --project-directory generated/ --verbose --no-skip-current
spm-11:
name: Build Xcode 11
runs-on: macOS-11
run: bundle exec pod lib lint --verbose --fail-fast --swift-version=5.6
spm-13:
name: Build Xcode 13
runs-on: macOS-12
strategy:
matrix:
platforms: [
'iOS_13,watchOS_6',
'macOS_10_15,tvOS_13',
'iOS_15,watchOS_8',
'macOS_12,tvOS_15',
]
fail-fast: false
steps:
Expand All @@ -58,21 +41,19 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
run: sudo xcode-select --switch /Applications/Xcode_13.4.1.app/Contents/Developer
- name: Prepare Simulator Runtimes
run: Scripts/github/prepare-simulators.sh ${{ matrix.platforms }}
- name: Build and Test Framework
run: Scripts/build.swift ${{ matrix.platforms }}
spm-12:
name: Build Xcode 12
runs-on: macOS-11
strategy:
matrix:
platforms: [
'iOS_14,watchOS_7',
'macOS_11,tvOS_14',
]
fail-fast: false
- name: Prepare Coverage Reports
run: ./Scripts/prepare-coverage-reports.sh
- name: Upload Coverage Reports
if: success()
uses: codecov/codecov-action@v3
spm-13-swift:
name: Swift Build Xcode 13
runs-on: macOS-12
steps:
- uses: ruby/setup-ruby@v1
with:
Expand All @@ -82,19 +63,17 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_12.4.app/Contents/Developer
- name: Prepare Simulator Runtimes
run: Scripts/github/prepare-simulators.sh ${{ matrix.platforms }}
run: sudo xcode-select --switch /Applications/Xcode_13.4.1.app/Contents/Developer
- name: Build and Test Framework
run: Scripts/build.swift ${{ matrix.platforms }}
spm-13:
name: Build Xcode 13
run: xcrun swift test -c release -Xswiftc -enable-testing
spm-14:
name: Build Xcode 14
runs-on: macOS-12
strategy:
matrix:
platforms: [
'iOS_15,watchOS_8',
'macOS_12,tvOS_15',
'iOS_16,watchOS_9',
'macOS_12,tvOS_16',
]
fail-fast: false
steps:
Expand All @@ -106,7 +85,7 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_13.4.1.app/Contents/Developer
run: sudo xcode-select --switch /Applications/Xcode_14.0.1.app/Contents/Developer
- name: Prepare Simulator Runtimes
run: Scripts/github/prepare-simulators.sh ${{ matrix.platforms }}
- name: Build and Test Framework
Expand All @@ -116,8 +95,8 @@ jobs:
- name: Upload Coverage Reports
if: success()
uses: codecov/codecov-action@v3
spm-13-swift:
name: Swift Build Xcode 13
spm-14-swift:
name: Swift Build Xcode 14
runs-on: macOS-12
steps:
- uses: ruby/setup-ruby@v1
Expand All @@ -128,17 +107,18 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_13.4.1.app/Contents/Developer
run: sudo xcode-select --switch /Applications/Xcode_14.0.1.app/Contents/Developer
- name: Build and Test Framework
run: xcrun swift test -c release -Xswiftc -enable-testing
spm-14:
name: Build Xcode 14
runs-on: macOS-12
spm-15:
name: Build Xcode 15
runs-on: macos-13
strategy:
matrix:
platforms: [
'iOS_16,watchOS_9',
'macOS_12,tvOS_16',
'iOS_17,watchOS_10',
'macOS_14,tvOS_17',
'macCatalyst_14'
]
fail-fast: false
steps:
Expand All @@ -150,19 +130,17 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_14.0.1.app/Contents/Developer
- name: Prepare Simulator Runtimes
run: Scripts/github/prepare-simulators.sh ${{ matrix.platforms }}
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Build and Test Framework
run: Scripts/build.swift ${{ matrix.platforms }}
- name: Prepare Coverage Reports
run: ./Scripts/prepare-coverage-reports.sh
- name: Upload Coverage Reports
if: success()
uses: codecov/codecov-action@v3
spm-14-swift:
name: Swift Build Xcode 14
runs-on: macOS-12
spm-15-swift:
name: Swift Build Xcode 15
runs-on: macos-13
steps:
- uses: ruby/setup-ruby@v1
with:
Expand All @@ -172,6 +150,6 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_14.0.1.app/Contents/Developer
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Build and Test Framework
run: xcrun swift test -c release -Xswiftc -enable-testing
12 changes: 6 additions & 6 deletions CacheAdvance.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Pod::Spec.new do |s|
s.name = 'CacheAdvance'
s.version = '1.2.5'
s.version = '2.0.0'
s.license = 'Apache License, Version 2.0'
s.summary = 'A performant cache for logging systems. CacheAdvance persists log events 30x faster than SQLite.'
s.homepage = 'https://github.com/dfed/CacheAdvance'
s.authors = 'Dan Federman'
s.source = { :git => 'https://github.com/dfed/CacheAdvance.git', :tag => s.version }
s.swift_version = '5.1'
s.swift_version = '5.6'
s.source_files = 'Sources/**/*.{swift}', 'Sources/**/*.{h,m}'
s.ios.deployment_target = '12.0'
s.tvos.deployment_target = '12.0'
s.watchos.deployment_target = '5.0'
s.macos.deployment_target = '10.14'
s.ios.deployment_target = '13.0'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.macos.deployment_target = '10.15'
end
27 changes: 7 additions & 20 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// swift-tools-version:5.1
// swift-tools-version:5.6
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "CacheAdvance",
platforms: [
.iOS(.v12),
.tvOS(.v12),
.watchOS(.v5),
.macOS(.v10_14),
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6),
.macOS(.v10_15),
.macCatalyst(.v13),
],
products: [
.library(
Expand All @@ -24,7 +25,6 @@ let package = Package(
targets: [
.target(
name: "CacheAdvance",
dependencies: ["SwiftTryCatch"],
swiftSettings: [.define("SWIFT_PACKAGE_MANAGER")]
),
.testTarget(
Expand All @@ -44,18 +44,5 @@ let package = Package(
name: "CADCacheAdvanceTests",
dependencies: ["CADCacheAdvance", "LorumIpsum"]
),
.target(
name: "SwiftTryCatch",
dependencies: [],
publicHeadersPath: "./",
// Make Objective-C exceptions not leak, since we can now recover from them.
// For more info, see https://clang.llvm.org/docs/AutomaticReferenceCounting.html#exceptions
swiftSettings: [SwiftSetting.define("-fobjc-arc-exceptions")]
),
.testTarget(
name: "SwiftTryCatchTests",
dependencies: ["SwiftTryCatch"]
)
],
swiftLanguageVersions: [.v5]
]
)
48 changes: 48 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// swift-tools-version:5.7
Copy link
Owner Author

@dfed dfed Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these files are just clones of the Package.swift with different swift tools versions unless otherwise specified.

// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "CacheAdvance",
platforms: [
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6),
.macOS(.v10_15),
.macCatalyst(.v13),
],
products: [
.library(
name: "CacheAdvance",
targets: ["CacheAdvance"]
),
.library(
name: "CADCacheAdvance",
targets: ["CADCacheAdvance"]
)
],
targets: [
.target(
name: "CacheAdvance",
swiftSettings: [.define("SWIFT_PACKAGE_MANAGER")]
),
.testTarget(
name: "CacheAdvanceTests",
dependencies: ["CacheAdvance", "LorumIpsum"]
),
.target(
name: "CADCacheAdvance",
dependencies: ["CacheAdvance"],
swiftSettings: [.define("SWIFT_PACKAGE_MANAGER")]
),
.target(
name: "LorumIpsum",
dependencies: []
),
.testTarget(
name: "CADCacheAdvanceTests",
dependencies: ["CADCacheAdvance", "LorumIpsum"]
),
]
)
48 changes: 48 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// swift-tools-version:5.8
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "CacheAdvance",
platforms: [
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6),
.macOS(.v10_15),
.macCatalyst(.v13),
],
products: [
.library(
name: "CacheAdvance",
targets: ["CacheAdvance"]
),
.library(
name: "CADCacheAdvance",
targets: ["CADCacheAdvance"]
)
],
targets: [
.target(
name: "CacheAdvance",
swiftSettings: [.define("SWIFT_PACKAGE_MANAGER")]
),
.testTarget(
name: "CacheAdvanceTests",
dependencies: ["CacheAdvance", "LorumIpsum"]
),
.target(
name: "CADCacheAdvance",
dependencies: ["CacheAdvance"],
swiftSettings: [.define("SWIFT_PACKAGE_MANAGER")]
),
.target(
name: "LorumIpsum",
dependencies: []
),
.testTarget(
name: "CADCacheAdvanceTests",
dependencies: ["CADCacheAdvance", "LorumIpsum"]
),
]
)
Loading