Skip to content

Commit

Permalink
Run CI on visionOS (#83)
Browse files Browse the repository at this point in the history
* Run CI on visionOS

* Bump cocoapods

* Remove swift version from podspec

* Test Pod Lint on every Swift version we support
  • Loading branch information
dfed committed Feb 1, 2024
1 parent 6f4d72c commit 6e380c9
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 30 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ on:
jobs:
pod-lint:
name: Pod Lint
runs-on: macOS-13
runs-on: macOS-14
strategy:
matrix:
swift_version: [
'5.6',
'5.7',
'5.8',
'5.9',
]
fail-fast: false
steps:
- uses: ruby/setup-ruby@v1
with:
Expand All @@ -19,9 +28,9 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
run: sudo xcode-select --switch /Applications/Xcode_15.2.app/Contents/Developer
- name: Lint Podspec
run: bundle exec pod lib lint --verbose --fail-fast --swift-version=5.6
run: bundle exec pod lib lint --verbose --fail-fast --swift-version=${{ matrix.swift_version }}
spm-13:
name: Build Xcode 13
runs-on: macOS-12
Expand Down Expand Up @@ -112,13 +121,14 @@ jobs:
run: xcrun swift test -c release -Xswiftc -enable-testing
spm-15:
name: Build Xcode 15
runs-on: macos-13
runs-on: macOS-14
strategy:
matrix:
platforms: [
'iOS_17,watchOS_10',
'macOS_14,tvOS_17',
'macCatalyst_14'
'macCatalyst_14',
'visionOS_1'
]
fail-fast: false
steps:
Expand All @@ -130,7 +140,7 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
run: sudo xcode-select --switch /Applications/Xcode_15.2.app/Contents/Developer
- name: Build and Test Framework
run: Scripts/build.swift ${{ matrix.platforms }}
- name: Prepare Coverage Reports
Expand All @@ -140,7 +150,7 @@ jobs:
uses: codecov/codecov-action@v3
spm-15-swift:
name: Swift Build Xcode 15
runs-on: macos-13
runs-on: macOS-14
steps:
- uses: ruby/setup-ruby@v1
with:
Expand All @@ -150,6 +160,6 @@ jobs:
- name: Bundle Install
run: bundle install
- name: Select Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
run: sudo xcode-select --switch /Applications/Xcode_15.2.app/Contents/Developer
- name: Build and Test Framework
run: xcrun swift test -c release -Xswiftc -enable-testing
4 changes: 2 additions & 2 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 = '2.0.0'
s.version = '2.1.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.6'
s.source_files = 'Sources/**/*.{swift}', 'Sources/**/*.{h,m}'
s.ios.deployment_target = '13.0'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.macos.deployment_target = '10.15'
s.visionos.deployment_target = '1.0'
end
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ ruby '3.1.3'

source 'https://rubygems.org'

gem 'cocoapods', '~> 1.13.0'
gem 'activesupport', '~> 7.0.8' # Ensure cocoapods can run. https://github.com/fastlane/fastlane/issues/21585
gem 'cocoapods', '~> 1.15.0'
33 changes: 22 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@ GEM
specs:
CFPropertyList (3.0.6)
rexml
activesupport (7.0.8)
activesupport (7.1.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.2.0)
bigdecimal (3.1.6)
claide (1.1.0)
cocoapods (1.13.0)
cocoapods (1.15.0)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.13.0)
cocoapods-core (= 1.15.0)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
Expand All @@ -33,7 +40,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.13.0)
cocoapods-core (1.15.0)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -44,7 +51,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
Expand All @@ -53,7 +60,10 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
drb (2.2.0)
ruby2_keywords
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
Expand All @@ -65,19 +75,21 @@ GEM
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.7.1)
minitest (5.20.0)
minitest (5.21.2)
molinillo (0.8.0)
mutex_m (0.2.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.7)
rexml (3.2.6)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.23.0)
xcodeproj (1.24.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -89,8 +101,7 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (~> 7.0.8)
cocoapods (~> 1.13.0)
cocoapods (~> 1.15.0)

RUBY VERSION
ruby 3.1.3p185
Expand Down
22 changes: 15 additions & 7 deletions Scripts/build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
case watchOS_8
case watchOS_9
case watchOS_10
case visionOS_1

var destination: String {
switch self {
Expand All @@ -55,7 +56,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
case .iOS_16:
return "platform=iOS Simulator,OS=16.0,name=iPad Pro (12.9-inch) (5th generation)"
case .iOS_17:
return "platform=iOS Simulator,OS=17.0.1,name=iPad Pro (12.9-inch) (6th generation)"
return "platform=iOS Simulator,OS=17.2,name=iPad Pro (12.9-inch) (6th generation)"

case .tvOS_13:
return "platform=tvOS Simulator,OS=13.4,name=Apple TV"
Expand All @@ -66,7 +67,7 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
case .tvOS_16:
return "platform=tvOS Simulator,OS=16.0,name=Apple TV"
case .tvOS_17:
return "platform=tvOS Simulator,OS=17.0,name=Apple TV"
return "platform=tvOS Simulator,OS=17.2,name=Apple TV"

case .macOS_10_15,
.macOS_11,
Expand All @@ -86,7 +87,9 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
case .watchOS_9:
return "OS=9.0,name=Apple Watch Series 7 (45mm)"
case .watchOS_10:
return "OS=10.0,name=Apple Watch Series 7 (45mm)"
return "OS=10.2,name=Apple Watch Series 7 (45mm)"
case .visionOS_1:
return "OS=1.0,name=Apple Vision Pro"
}
}

Expand Down Expand Up @@ -115,18 +118,21 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
case .macOS_13:
return "macosx13.0"
case .macOS_14:
return "macosx14.0"
return "macosx14.2"
case .macCatalyst_13:
return "macosx13.0"
case .macCatalyst_14:
return "macosx14.0"
return "macosx14.2"

case .watchOS_6,
.watchOS_7,
.watchOS_8,
.watchOS_9,
.watchOS_10:
return "watchsimulator"

case .visionOS_1:
return "xrsimulator"
}
}

Expand All @@ -148,7 +154,8 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
.macOS_13,
.macOS_14,
.macCatalyst_13,
.macCatalyst_14:
.macCatalyst_14,
.visionOS_1:
return true

case .watchOS_6,
Expand Down Expand Up @@ -186,7 +193,8 @@ enum Platform: String, CaseIterable, CustomStringConvertible {
.macCatalyst_14,
.watchOS_8,
.watchOS_9,
.watchOS_10:
.watchOS_10,
.visionOS_1:
// Xcode 13+ do not require xcodeproj generation
return false
}
Expand Down

0 comments on commit 6e380c9

Please sign in to comment.