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

Upgrade to Xcode 16 and macOS 15 #1075

Merged
merged 41 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
daf39c5
Update supported Xcode version to 16.0
ayoy Sep 20, 2024
b99688d
Use OS=18.0 specifier for iOS unit tests
ayoy Sep 20, 2024
9196066
Update to GRDB 2.4.2 (upstream 6.29.3, SQLCipher 4.6.1)
ayoy Sep 21, 2024
28c03b8
Use macos-14-xlarge for iOS unit tests
ayoy Sep 24, 2024
86f6b4c
Fix ConfigurationManagerTests
ayoy Sep 24, 2024
bf04235
Back to macos-14 runner for iOS
ayoy Sep 24, 2024
6e71a13
Use macos-15 runners
ayoy Sep 25, 2024
d93ca97
Bump mikepenz/action-junit-report to v4
ayoy Sep 25, 2024
6580247
Merge branch 'main' into dominik/xcode-16
ayoy Oct 8, 2024
c4aaa66
Merge branch 'main' into dominik/xcode-16
ayoy Oct 14, 2024
d42b173
Merge branch 'main' into dominik/xcode-16
samsymons Oct 21, 2024
748463e
Merge branch 'main' into dominik/xcode-16
jotaemepereira Oct 21, 2024
ac3faeb
Merge branch 'main' into dominik/xcode-16
samsymons Oct 28, 2024
5fbd293
Update BSK phishing detection resource file usage.
samsymons Oct 28, 2024
ca2dba2
Bump Xcode to 16.1.
samsymons Oct 28, 2024
94d7a1c
Add a couple logs to check that the scheme handler is returning data.
samsymons Oct 28, 2024
edfdc60
Undo logging changes.
samsymons Oct 29, 2024
1c28539
Test disabling some WKWebView-dependent tests during iOS test runs.
samsymons Oct 29, 2024
6952d81
Disable additional flaky iOS tests.
samsymons Oct 29, 2024
b9c68ff
Disable additional tests.
samsymons Oct 29, 2024
4dd33d2
Disable additional tests.
samsymons Oct 29, 2024
8091127
Disable additional tests.
samsymons Oct 29, 2024
56ff820
Disable additional tests.
samsymons Oct 30, 2024
3ae7f7a
Disable additional tests.
samsymons Oct 30, 2024
2a861ef
Fix compilation issues.
samsymons Oct 30, 2024
8fb01fb
Merge branch 'main' into dominik/xcode-16
jotaemepereira Nov 1, 2024
b2ed5cc
Merge branch 'main' into dominik/xcode-16
samsymons Nov 3, 2024
3160ecf
Merge branch 'main' into dominik/xcode-16
ayoy Nov 5, 2024
9a8a9e0
Merge branch 'main' into dominik/xcode-16
samsymons Nov 5, 2024
0e44c27
Merge branch 'main' into dominik/xcode-16
samsymons Nov 7, 2024
2df411d
Retry tests 2 additional times upon failure.
samsymons Nov 7, 2024
de5936b
Respect successful retries in the test report.
samsymons Nov 7, 2024
596ed27
Undo Package.swift changes.
samsymons Nov 7, 2024
1f2e0e4
Revert "Undo Package.swift changes."
samsymons Nov 7, 2024
2d60823
Merge branch 'main' into dominik/xcode-16
samsymons Nov 8, 2024
43f726e
Merge branch 'main' into dominik/xcode-16
samsymons Nov 12, 2024
3ac3fbf
Wait for the managers to update correctly.
samsymons Nov 12, 2024
722c0b3
Merge branch 'main' into dominik/xcode-16
samsymons Nov 13, 2024
4998cc9
Merge branch 'main' into dominik/xcode-16
samsymons Nov 13, 2024
75bf941
Merge branch 'main' into dominik/xcode-16
samsymons Nov 14, 2024
303fb2d
Set GRDB to 2.4.2.
samsymons Nov 14, 2024
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
15 changes: 9 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

name: Run unit tests (macOS)

runs-on: macos-14
runs-on: macos-15
timeout-minutes: 30

outputs:
Expand Down Expand Up @@ -67,12 +67,13 @@ jobs:
run: set -o pipefail && swift test | tee -a build-log.txt | xcbeautify --report junit --report-path . --junit-report-filename tests.xml

- name: Publish Unit Tests Report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
if: always()
with:
check_name: Test Report (macOS)
report_paths: tests.xml
require_tests: true
check_retries: true

- name: Update Asana with failed unit tests
if: always() # always run even if the previous step fails
Expand Down Expand Up @@ -108,7 +109,7 @@ jobs:

name: Run unit tests (iOS)

runs-on: macos-14
runs-on: macos-15
timeout-minutes: 30

steps:
Expand Down Expand Up @@ -143,7 +144,7 @@ jobs:
run: |
while xcodebuild -resolvePackageDependencies \
-scheme BrowserServicesKit-Package \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17' \
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \
-derivedDataPath DerivedData \
2>&1 | grep Error; do :; done

Expand All @@ -156,16 +157,18 @@ jobs:
run: |
set -o pipefail && xcodebuild test \
-scheme BrowserServicesKit \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17' \
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \
-derivedDataPath DerivedData \
-skipPackagePluginValidation \
-skipMacroValidation \
-test-iterations 3 \
-retry-tests-on-failure \
CODE_SIGNING_ALLOWED=NO \
| tee -a ios-build-log.txt \
| xcbeautify --report junit --report-path . --junit-report-filename ios-unittests.xml

- name: Publish Unit Tests Report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
if: always()
with:
check_name: Test Report (iOS)
Expand Down
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.4
16.1
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/GRDB.swift.git",
"state" : {
"revision" : "4225b85c9a0c50544e413a1ea1e502c802b44b35",
"version" : "2.4.0"
"revision" : "5b2f6a81099d26ae0f9e38788f51490cd6a4b202",
"version" : "2.4.2"
}
},
{
Expand Down
8 changes: 2 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,6 @@ let package = Package(
dependencies: [
"Common"
],
resources: [
.copy("hashPrefixes.json"),
.copy("filterSet.json")
],
swiftSettings: [
.define("DEBUG", .when(configuration: .debug))
]
Expand Down Expand Up @@ -655,8 +651,8 @@ let package = Package(
"PixelKit"
],
resources: [
.copy("hashPrefixes.json"),
.copy("filterSet.json")
.copy("Resources/hashPrefixes.json"),
.copy("Resources/filterSet.json")
]
),
.testTarget(
Expand Down
2 changes: 1 addition & 1 deletion Sources/Configuration/DefaultConfigurationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ open class DefaultConfigurationManager: NSObject {

public func start() {
Logger.config.debug("Starting configuration refresh timer")
refreshTask = Task.periodic(interval: Constants.refreshCheckIntervalSeconds) {
refreshTask = Task.periodic(interval: Constants.refreshCheckIntervalSeconds) { [weak self] in
Self.queue.async { [weak self] in
self?.lastRefreshCheckTime = Date()
self?.refreshIfNeeded()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import XCTest
import BrowserServicesKit
import os
Expand Down Expand Up @@ -217,3 +220,5 @@ class AdClickAttributionRulesProviderTests: XCTestCase {
}

}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import XCTest
import os.log
import WebKit
Expand Down Expand Up @@ -368,3 +371,5 @@ class ClickToLoadBlockingTests: XCTestCase {
}
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import XCTest
import os.log
import WebKit
Expand Down Expand Up @@ -203,3 +206,5 @@ class ContentBlockerReferenceTests: XCTestCase {
}
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import Foundation
import TrackerRadarKit
import BrowserServicesKit
Expand Down Expand Up @@ -294,3 +297,5 @@ final class ContentBlockerRulesManagerInitialCompilationTests: XCTestCase {
}

}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import XCTest
import TrackerRadarKit
import BrowserServicesKit
Expand Down Expand Up @@ -352,3 +355,5 @@ class ContentBlockerRulesManagerMultipleRulesTests: ContentBlockerRulesManagerTe
}

}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import XCTest
import TrackerRadarKit
import BrowserServicesKit
Expand Down Expand Up @@ -1243,3 +1246,5 @@ extension ContentBlockerRulesManager {
}

}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import BrowserServicesKit
import Common
import TrackerRadarKit
Expand Down Expand Up @@ -569,3 +572,5 @@ class ContentBlockerRulesUserScriptsTests: XCTestCase {
self.wait(for: [websiteLoaded], timeout: 30)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import XCTest
@testable import TrackerRadarKit
import os.log
Expand Down Expand Up @@ -226,3 +229,5 @@ final class SurrogatesReferenceTests: XCTestCase {
}
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import BrowserServicesKit
import Common
import TrackerRadarKit
Expand Down Expand Up @@ -685,3 +688,5 @@ class SurrogatesUserScriptsTests: XCTestCase {
self.wait(for: [websiteLoaded, surrogateValidated], timeout: 15)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import XCTest
import os.log
import WebKit
Expand Down Expand Up @@ -209,3 +212,5 @@ class TrackerAllowlistReferenceTests: XCTestCase {
}
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import XCTest
@testable import TrackerRadarKit
@testable import BrowserServicesKit
Expand Down Expand Up @@ -260,3 +263,5 @@ private struct Test: Codable {
let property, expectPropertyValue: String
let exceptPlatforms: [String]
}

#endif
5 changes: 5 additions & 0 deletions Tests/BrowserServicesKitTests/GPC/GPCReferenceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// limitations under the License.
//

// Tests are disabled on iOS due to WKWebView stability issues on the iOS 17.5+ simulator.
#if os(macOS)

import XCTest
import BrowserServicesKit
import os.log
Expand Down Expand Up @@ -235,3 +238,5 @@ struct GpcJavaScriptAPITest: Codable {
let exceptPlatforms: [String]
let frameURL: String?
}

#endif
Loading
Loading