Skip to content

Commit

Permalink
Update release packaging for Xcode 15.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed May 20, 2024
1 parent a478ed8 commit afa2de6
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 53 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/master-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- "master"
- "release/**"
env:
XCODE_VERSION: "['15.1', '15.2', '15.3']"
XCODE_TEST_VERSIONS: "['15.1', '15.2', '15.3']"
XCODE_VERSION: "['15.1', '15.2', '15.3', '15.4']"
XCODE_TEST_VERSIONS: "['15.1', '15.2', '15.3', '15.4']"
PLATFORM: "['ios', 'osx', 'watchos', 'tvos', 'catalyst', 'visionos']"
BUILD_PLATFORM: "['ios', 'iossimulator', 'osx', 'watchos', 'watchossimulator', 'tvos', 'tvossimulator', 'catalyst', 'visionos', 'visionossimulator']"
DOC_VERSION: '15.3'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish release
on: workflow_dispatch
env:
XCODE_VERSION: "['15.1', '15.2', '15.3']"
XCODE_VERSION: "['15.1', '15.2', '15.3', '15.4']"
TEST_XCODE_VERSION: '15.3'
jobs:
prepare:
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
x.y.z Release notes (yyyy-MM-dd)
=============================================================
### Enhancements
* None.
* Update release packaging for Xcode 15.4.

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-swift/issues/????), since v?.?.?)
Expand All @@ -13,9 +13,9 @@ x.y.z Release notes (yyyy-MM-dd)
### Compatibility
* Realm Studio: 15.0.0 or later.
* APIs are backwards compatible with all previous releases in the 10.x.y series.
* Carthage release for Swift is built with Xcode 15.3.0.
* Carthage release for Swift is built with Xcode 15.4.0.
* CocoaPods: 1.10 or later.
* Xcode: 15.1.0-15.3.0.
* Xcode: 15.1.0-15.4.0.

### Internal
* Upgraded realm-core from ? to ?
Expand Down
36 changes: 0 additions & 36 deletions Realm/TestUtils/TestUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -166,30 +166,6 @@ bool RLMHasCachedRealmForPath(NSString *path) {
return RLMGetAnyCachedRealmForPath(path.UTF8String);
}

static std::string serialize(id obj) {
auto data = [NSJSONSerialization dataWithJSONObject:obj
options:0
error:nil];
return std::string(static_cast<const char *>(data.bytes), data.length);
}

static std::string fakeJWT() {
std::string unencoded_prefix = serialize(@{@"alg": @"HS256"});
std::string unencoded_body = serialize(@{
@"user_data": @{@"token": @"dummy token"},
@"exp": @123,
@"iat": @456,
@"access": @[@"download", @"upload"]
});
std::string encoded_prefix, encoded_body;
encoded_prefix.resize(realm::util::base64_encoded_size(unencoded_prefix.size()));
encoded_body.resize(realm::util::base64_encoded_size(unencoded_body.size()));
realm::util::base64_encode(unencoded_prefix, encoded_prefix);
realm::util::base64_encode(unencoded_body, encoded_body);
std::string suffix = "Et9HFtf9R3GEMA0IICOfFMVXY7kkTX1wr4qCyhIf58U";
return encoded_prefix + "." + encoded_body + "." + suffix;
}

// A network transport which doesn't actually do anything
@interface NoOpTransport : NSObject <RLMNetworkTransport>
@end
Expand Down Expand Up @@ -261,18 +237,6 @@ + (RLMRealmConfiguration *)fakeFlexibleSyncConfiguration {
}
@end

// Xcode 13 adds -[NSUUID compare:] so this warns about the category
// implementing a method which already exists, but we can't use just the
// built-in one yet.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
@implementation NSUUID (RLMUUIDCompareTests)
- (NSComparisonResult)compare:(NSUUID *)other {
return [[self UUIDString] compare:other.UUIDString];
}
@end
#pragma clang diagnostic pop

bool RLMThreadSanitizerEnabled() {
#if __has_feature(thread_sanitizer)
return true;
Expand Down
13 changes: 6 additions & 7 deletions Realm/TestUtils/include/TestUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,19 @@

#import <Realm/RLMUser.h>

RLM_HEADER_AUDIT_BEGIN(nullability)

FOUNDATION_EXTERN void RLMAssertThrowsWithReasonMatchingSwift(XCTestCase *self,
__attribute__((noescape)) dispatch_block_t block,
NSString *regexString,
NSString *message,
NSString *_Nullable message,
NSString *fileName,
NSUInteger lineNumber);


@interface RLMRealmConfiguration (TestUser)
+ (RLMRealmConfiguration *_Nonnull)fakeSyncConfiguration;
+ (RLMRealmConfiguration *_Nonnull)fakeFlexibleSyncConfiguration;
@end

@interface NSUUID (RLMUUIDCompareTests)
- (NSComparisonResult)compare:(NSUUID *)other;
+ (RLMRealmConfiguration *)fakeSyncConfiguration;
+ (RLMRealmConfiguration *)fakeFlexibleSyncConfiguration;
@end

// It appears to be impossible to check this from Swift so we need a helper function
Expand All @@ -44,3 +42,4 @@ FOUNDATION_EXTERN bool RLMThreadSanitizerEnabled(void);
FOUNDATION_EXTERN bool RLMCanFork(void);
FOUNDATION_EXTERN pid_t RLMFork(void);

RLM_HEADER_AUDIT_END(nullability)
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1343,9 +1343,9 @@ x.y.z Release notes (yyyy-MM-dd)
### Compatibility
* Realm Studio: 15.0.0 or later.
* APIs are backwards compatible with all previous releases in the 10.x.y series.
* Carthage release for Swift is built with Xcode 15.3.0.
* Carthage release for Swift is built with Xcode 15.4.0.
* CocoaPods: 1.10 or later.
* Xcode: 15.1.0-15.3.0.
* Xcode: 15.1.0-15.4.0.
### Internal
* Upgraded realm-core from ? to ?
Expand Down
2 changes: 1 addition & 1 deletion scripts/package_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def replace_framework(example, framework, path)
"examples/tvos/swift",
]

xcode_versions = %w(15.1 15.2 15.3)
xcode_versions = %w(15.1 15.2 15.3 15.4)

# Remove reference to Realm.xcodeproj from all example workspaces.
base_examples.each do |example|
Expand Down
2 changes: 1 addition & 1 deletion scripts/pr-ci-matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def action
# because they don't care about Xcode versions, while some others are latest-only
# because they're particularly slow to run.
module Workflows
XCODE_VERSIONS = %w(15.1 15.2 15.3)
XCODE_VERSIONS = %w(15.1 15.2 15.3 15.4)

all = ->(v) { true }
latest_only = ->(v) { v == XCODE_VERSIONS.last }
Expand Down

0 comments on commit afa2de6

Please sign in to comment.