From 8ee4c1ce5006ca706b9450771fa7e9b5b1510785 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 18 Sep 2023 11:35:07 -0700 Subject: [PATCH] Update release packaging for XCode 15 final --- CHANGELOG.md | 20 ++++++++++---------- Jenkinsfile.publish | 2 +- Jenkinsfile.releasability | 30 +++++++++++++++++------------- Package.swift | 2 +- Realm/Realm-Info.plist | 4 ++-- build.sh | 10 +++++----- dependencies.list | 2 +- scripts/create-release-package.rb | 25 ++++++++++--------------- scripts/package_examples.rb | 2 +- scripts/reset-simulators.rb | 4 ++-- 10 files changed, 50 insertions(+), 51 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c3218974d..00cc012449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,23 @@ -x.y.z Release notes (yyyy-MM-dd) +10.42.3 Release notes (2023-09-18) ============================================================= + ### Enhancements -* None. + +* Update packaging for the Xcode 15.0 release. Carthage release and obj-c + binaries are now built with Xcode 15. ### Fixed -* ([#????](https://github.com/realm/realm-swift/issues/????), since v?.?.?) -* None. - +* The prebuilt Realm.xcframework for SPM was packaged incorrectly and did not + work ([#8361](https://github.com/realm/realm-swift/issues/8361), since v10.42.1). ### Compatibility + * Realm Studio: 14.0.1 or later. * APIs are backwards compatible with all previous releases in the 10.x.y series. -* Carthage release for Swift is built with Xcode 14.3.1. +* Carthage release for Swift is built with Xcode 15.0.0. * CocoaPods: 1.10 or later. -* Xcode: 14.1-15 beta 7. - -### Internal -* Upgraded realm-core from ? to ? +* Xcode: 14.1-15.0.0. 10.42.2 Release notes (2023-09-13) ============================================================= diff --git a/Jenkinsfile.publish b/Jenkinsfile.publish index 54cf264041..b45a8e806a 100644 --- a/Jenkinsfile.publish +++ b/Jenkinsfile.publish @@ -88,7 +88,7 @@ pipeline { agent { label 'osx' } steps { prepareWorkspace() - withCredentials([file(credentialsId: 's3cfg', variable: 'S3CMD_CONFIG')]) { + withCredentials([file(credentialsId: 'c0cc8f9e-c3f1-4e22-b22f-6568392e26ae', variable: 'S3CMD_CONFIG')]) { sh './build.sh publish-update-checker' } } diff --git a/Jenkinsfile.releasability b/Jenkinsfile.releasability index 8f7fd44681..2b634d0043 100644 --- a/Jenkinsfile.releasability +++ b/Jenkinsfile.releasability @@ -1,15 +1,19 @@ xcodeVersions = ['14.1', '14.2', '14.3.1'] platforms = ['osx', 'ios', 'watchos', 'tvos', 'catalyst'] platformNames = ['osx': 'macOS', 'ios': 'iOS', 'watchos': 'watchOS', 'tvos': 'tvOS', 'catalyst': 'Catalyst', 'visionos': 'visionOS'] -carthageXcodeVersion = '14.3.1' +carthageXcodeVersion = '15.0' +// This should be the same as carthageXcodeVersion, but we only have one Xcode 15 runner +docsXcodeVersion = '14.3.1' -def buildPlatform(platform, xcodeVersion, nodeLabel = 'osx') { +def buildPlatform(platform, xcodeVersion, xcodeSuffix, nodeLabel = 'osx') { def platformName = platformNames[platform] return { node(nodeLabel) { deleteDir() unstash 'source' - sh "REALM_XCODE_VERSION=${xcodeVersion} ./build.sh package ${platform}" + withEnv(["DEVELOPER_DIR=/Applications/Xcode-${xcodeSuffix}.app/Contents/Developer"]) { + sh "./build.sh package ${platform}" + } dir("build") { stash includes: "realm-${platform}-${xcodeVersion}.zip", name: "${platform}-${xcodeVersion}" @@ -31,7 +35,7 @@ def installationTest(platform, test, xcode, language = 'swift', linkage = 'dynam sh """ hostname - export REALM_XCODE_VERSION='${xcode}' + export DEVELOPER_DIR='/Applications/Xcode-${xcode}.app/Contents/Developer' export REALM_TEST_BRANCH='${sha}' cd examples/installation ./build.rb ${platform} ${test} ${linkage} @@ -84,7 +88,7 @@ def doBuild() { unstash 'source' sh """ hostname - export REALM_XCODE_VERSION=${carthageXcodeVersion} + export REALM_XCODE_VERSION=${docsXcodeVersion} sh build.sh package-docs """ dir('docs') { @@ -116,11 +120,11 @@ def doBuild() { def platform = p def platformName = platformNames[platform] for (def xcodeVersion in xcodeVersions) { - parallelBuilds["${platformName} ${xcodeVersion}"] = buildPlatform(platform, xcodeVersion) + parallelBuilds["${platformName} ${xcodeVersion}"] = buildPlatform(platform, xcodeVersion, xcodeVersion) } - parallelBuilds["${platformName} 15.0"] = buildPlatform(platform, '15.0', 'macos_13') + parallelBuilds["${platformName} 15.0"] = buildPlatform(platform, '15.0', '15.0.0', 'macos_13') } - parallelBuilds["visionOS 15.0"] = buildPlatform('visionos', '15.0', 'macos_13') + parallelBuilds["visionOS 15.0"] = buildPlatform('visionos', '15.0', '15-beta', 'macos_13') parallel parallelBuilds } @@ -140,7 +144,7 @@ def doBuild() { unstash 'examples' unstash 'build-scripts' - withEnv(['REALM_XCODE_VERSION=15.0']) { + withEnv(['DEVELOPER_DIR=/Applications/Xcode-15-beta.app/Contents/Developer']) { sh './build.sh package-release' } @@ -196,13 +200,13 @@ def doBuild() { def platformName = platformNames[platform] for (def test in ['xcframework', 'cocoapods', 'carthage', 'spm']) { if (platform != 'catalyst' || test != 'carthage') { - parallelBuilds["Installation - ${platformName} ${test}"] = installationTest(platform, test, carthageXcodeVersion) + parallelBuilds["Installation - ${platformName} ${test}"] = installationTest(platform, test, docsXcodeVersion) } } - parallelBuilds["Installation - ${platformName} CocoaPods static"] = installationTest(platform, 'cocoapods', carthageXcodeVersion, 'swift', 'static') - parallelBuilds["Installation - ${platformName} spm static"] = installationTest(platform, 'spm', carthageXcodeVersion, 'swift', 'static') + parallelBuilds["Installation - ${platformName} CocoaPods static"] = installationTest(platform, 'cocoapods', docsXcodeVersion, 'swift', 'static') + parallelBuilds["Installation - ${platformName} spm static"] = installationTest(platform, 'spm', docsXcodeVersion, 'swift', 'static') } - parallelBuilds['Installation - iOS Static'] = installationTest('ios', 'xcframework', carthageXcodeVersion, 'objc', 'static') + parallelBuilds['Installation - iOS Static'] = installationTest('ios', 'xcframework', docsXcodeVersion, 'objc', 'static') parallelBuilds['Installation - XCFramework Evolution'] = xcframeworkEvolutionTest() for (def version in xcodeVersions) { parallelBuilds["Installation - Xcode ${version}"] = installationTest('osx', 'xcframework', version) diff --git a/Package.swift b/Package.swift index 94987f3f48..b92bd8dbdd 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,7 @@ import PackageDescription import Foundation let coreVersion = Version("13.20.1") -let cocoaVersion = Version("10.42.2") +let cocoaVersion = Version("10.42.3") let cxxSettings: [CXXSetting] = [ .headerSearchPath("."), diff --git a/Realm/Realm-Info.plist b/Realm/Realm-Info.plist index fe1f569532..8c8b7e17cb 100644 --- a/Realm/Realm-Info.plist +++ b/Realm/Realm-Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 10.42.2 + 10.42.3 CFBundleSignature ???? CFBundleVersion - 10.42.2 + 10.42.3 NSHumanReadableCopyright Copyright © 2014-2021 Realm. All rights reserved. NSPrincipalClass diff --git a/build.sh b/build.sh index 26f45e1561..f073ad877d 100755 --- a/build.sh +++ b/build.sh @@ -508,12 +508,12 @@ case "$COMMAND" in ;; "test-ios") - xctest Realm -configuration "$CONFIGURATION" -sdk iphonesimulator -destination 'name=iPhone 8' + xctest Realm -configuration "$CONFIGURATION" -sdk iphonesimulator -destination 'name=iPhone 11' exit 0 ;; "test-ios-swift") - xctest RealmSwift -configuration "$CONFIGURATION" -sdk iphonesimulator -destination 'name=iPhone 8' + xctest RealmSwift -configuration "$CONFIGURATION" -sdk iphonesimulator -destination 'name=iPhone 11' exit 0 ;; @@ -592,7 +592,7 @@ case "$COMMAND" in ;; "test-swiftui-ios") - xctest 'SwiftUITestHost' -configuration "$CONFIGURATION" -sdk iphonesimulator -destination 'name=iPhone 8' + xctest 'SwiftUITestHost' -configuration "$CONFIGURATION" -sdk iphonesimulator -destination 'name=iPhone 11' exit 0 ;; @@ -1179,9 +1179,9 @@ x.y.z Release notes (yyyy-MM-dd) ### Compatibility * Realm Studio: 14.0.1 or later. * APIs are backwards compatible with all previous releases in the 10.x.y series. -* Carthage release for Swift is built with Xcode 14.3.1. +* Carthage release for Swift is built with Xcode 15.0.0. * CocoaPods: 1.10 or later. -* Xcode: 14.1-15 beta 7. +* Xcode: 14.1-15.0.0. ### Internal * Upgraded realm-core from ? to ? diff --git a/dependencies.list b/dependencies.list index d4971d2807..a0d838bbe8 100755 --- a/dependencies.list +++ b/dependencies.list @@ -1,3 +1,3 @@ -VERSION=10.42.2 +VERSION=10.42.3 REALM_CORE_VERSION=13.20.1 STITCH_VERSION=1eb31b87154cf7af6cbe50ab2732e2856ca499c7 diff --git a/scripts/create-release-package.rb b/scripts/create-release-package.rb index 7341245eeb..141e8abc25 100755 --- a/scripts/create-release-package.rb +++ b/scripts/create-release-package.rb @@ -32,13 +32,6 @@ def create_xcframework(root, xcode_version, configuration, name) output = "#{prefix}/#{configuration}/#{name}.xcframework" files = Dir.glob "#{prefix}/#{configuration}/*/#{name}.xcframework/*/#{name}.framework" - # We only ship a single Realm.xcframework built with the latest non-beta version of Xcode. - # Until Xcode 15 leaves beta, that means we need to stick a visionos slice - # built with Xcode 15 into an otherwise Xcode 14 xcframework. - if name == 'Realm' and xcode_version.start_with? '14' and XCODE_VERSIONS.include? '15.0' - files += Dir.glob "#{root}/15.0/#{configuration}/visionos/#{name}.xcframework/*/#{name}.framework" - end - sh 'xcodebuild', '-create-xcframework', '-allow-internal-distribution', '-output', output, *files.flat_map {|f| ['-framework', f]} end @@ -74,9 +67,9 @@ def zip(name, *files) end puts 'Creating Obj-C XCFrameworks' - xcode_14_version = XCODE_VERSIONS.filter {|v| v.start_with? '14'}.last - create_xcframework tmp, xcode_14_version, 'Release', 'Realm' - create_xcframework tmp, xcode_14_version, 'Static', 'Realm' + objc_xcode_version = XCODE_VERSIONS.last + create_xcframework tmp, objc_xcode_version, 'Release', 'Realm' + create_xcframework tmp, objc_xcode_version, 'Static', 'Realm' puts 'Creating release package' package_dir = "#{tmp}/realm-swift-#{VERSION}" @@ -95,9 +88,9 @@ def zip(name, *files) } end - sh 'cp', '-Rca', "#{tmp}/#{xcode_14_version}/Release/Realm.xcframework", "#{package_dir}" + sh 'cp', '-Rca', "#{tmp}/#{objc_xcode_version}/Release/Realm.xcframework", "#{package_dir}" FileUtils.mkdir_p "#{package_dir}/static" - sh 'cp', '-Rca', "#{tmp}/#{xcode_14_version}/Static/Realm.xcframework", "#{package_dir}/static" + sh 'cp', '-Rca', "#{tmp}/#{objc_xcode_version}/Static/Realm.xcframework", "#{package_dir}/static" for version in XCODE_VERSIONS FileUtils.mkdir_p "#{package_dir}/#{version}" sh 'cp', '-Rca', "#{tmp}/#{version}/Release/RealmSwift.xcframework", "#{package_dir}/#{version}" @@ -108,7 +101,9 @@ def zip(name, *files) end puts 'Creating SPM release zips' - zip 'Realm.spm.zip', "#{tmp}/#{xcode_14_version}/Release/Realm.xcframework" + Dir.chdir "#{tmp}/#{objc_xcode_version}/Release" do + zip 'Realm.spm.zip', "Realm.xcframework" + end for version in XCODE_VERSIONS Dir.chdir "#{tmp}/#{version}/Release" do zip "RealmSwift@#{version}.spm.zip", 'RealmSwift.xcframework' @@ -118,8 +113,8 @@ def zip(name, *files) puts 'Creating Carthage release zip' Dir.mktmpdir do |tmp2| Dir.chdir(tmp2) do - sh 'cp', '-Rca', "#{tmp}/#{xcode_14_version}/Release/Realm.xcframework", tmp2 - sh 'cp', '-Rca', "#{tmp}/#{xcode_14_version}/Release/RealmSwift.xcframework", tmp2 + sh 'cp', '-Rca', "#{tmp}/#{objc_xcode_version}/Release/Realm.xcframework", tmp2 + sh 'cp', '-Rca', "#{tmp}/#{objc_xcode_version}/Release/RealmSwift.xcframework", tmp2 zip 'Carthage.xcframework.zip', 'Realm.xcframework', 'RealmSwift.xcframework' end end diff --git a/scripts/package_examples.rb b/scripts/package_examples.rb index 2b1e357b7d..7dae1e163d 100755 --- a/scripts/package_examples.rb +++ b/scripts/package_examples.rb @@ -44,7 +44,7 @@ def replace_framework(example, framework, path) "examples/tvos/swift", ] -xcode_versions = %w(14.1 14.2 14.3.1) +xcode_versions = %w(14.1 14.2 14.3.1 15.0) # Remove reference to Realm.xcodeproj from all example workspaces. base_examples.each do |example| diff --git a/scripts/reset-simulators.rb b/scripts/reset-simulators.rb index b9f2439fe3..888df37e74 100755 --- a/scripts/reset-simulators.rb +++ b/scripts/reset-simulators.rb @@ -164,8 +164,8 @@ def shutdown_simulator_devices(devices) print 'Booting Apple TV simulator...' system("xcrun simctl boot 'Apple TV'") or raise "Failed to boot Apple TV simulator" else - print 'Booting iPhone 8 simulator...' - system("xcrun simctl boot 'iPhone 8'") or raise "Failed to boot iPhone 8 simulator" + print 'Booting iPhone 11 simulator...' + system("xcrun simctl boot 'iPhone 11'") or raise "Failed to boot iPhone 11 simulator" end puts ' done!'