Skip to content

Commit

Permalink
Update core to 14.13.2, bump max page size to 16kb (#3683)
Browse files Browse the repository at this point in the history
* Update core, bump max page size to 16kb

* Use macos-latest

* Drop support for UWP arm32

* Fix setup-xcode

* Bump platform helpers to .net7

* Use net8 for analytics assembly

* .net6 -> .net8

* Fix some tests

* Use correct reference assemblies

* Update ilspycmd, drop xamarin support

* Downgrade Core

* Fix logger regex

* Update changelog

* Remove check title workflow
  • Loading branch information
nirinchev authored Jan 2, 2025
1 parent b8820ce commit 3c0aa71
Show file tree
Hide file tree
Showing 106 changed files with 126 additions and 4,151 deletions.
1 change: 1 addition & 0 deletions .github/actions/run-android-device-farm-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ runs:
remote_src: true
test_spec: |
version: 0.1
android_test_host: amazon_linux_2
phases:
install:
commands:
Expand Down
4 changes: 3 additions & 1 deletion .github/build-workflows.ps1
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pkl eval pkl-workflows/*.pkl -o workflows/%{moduleName}.yml
Get-ChildItem -Path './pkl-workflows' -Filter *.pkl -File -Name | ForEach-Object {
&pkl eval ./pkl-workflows/$_ -o "./workflows/$($_.Replace('pkl', 'yml'))"
}
8 changes: 2 additions & 6 deletions .github/pkl-workflows/helpers/Common.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const linuxArchs: List<String> = List("x86_64", "armhf", "aarch64")
const applePlatforms: List<String> = List("iOS", "tvOS")
const androidABIs: List<String> = List("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
const windowsArchs: List<String> = List("Win32", "x64", "ARM64")
const uwpArchs: List<String> = List("Win32", "x64", "ARM", "ARM64")
const uwpArchs: List<String> = List("Win32", "x64", "ARM64")

const appleTargets: List<String> = List("Device", "Simulator")

Expand All @@ -24,7 +24,7 @@ local const job_Wrappers: String = "build-wrappers"

const mainBranch: String = "main"

typealias NetFramework = "net6.0"|"net8.0"|String(startsWith("${{ matrix"))|String(startsWith("net8"))
typealias NetFramework = "net9.0"|"net8.0"|String(startsWith("${{ matrix"))|String(startsWith("net8"))
typealias NetRuntime = "win-x64"|"linux-x64"|"osx-x64"|"osx-arm64"|String(startsWith("${{ matrix"))
typealias SyncDifferentiator = "ios-maui"|"android-maui"|"tvos"|"macos-maui"|"code-coverage"|"uwp"|"net-framework"|String(startsWith("${{ matrix"))

Expand Down Expand Up @@ -71,12 +71,8 @@ const function defaultBuildJobs(baasDifferentiators: Listing<SyncDifferentiator>
["test-net-framework"] = TestJobs.netFramework(baasDifferentiators)
["test-uwp"] = TestJobs.uwp(baasDifferentiators)
["test-net-core"] = TestJobs.netCore(netCoreVersions)
["test-macos-xamarin"] = TestJobs.macOS_Xamarin()
["test-macos-maui"] = TestJobs.macOS_Maui(baasDifferentiators)
["test-ios-xamarin"] = TestJobs.iOS_Xamarin()
["test-ios-maui"] = TestJobs.iOS_Maui(baasDifferentiators)
["test-tvos"] = TestJobs.tvOS(baasDifferentiators)
["test-android-xamarin"] = TestJobs.android_Xamarin()
["test-android-maui"] = TestJobs.android_Maui(baasDifferentiators)
["test-woven-classes"] = TestJobs.wovenClasses()
["test-source-generation"] = TestJobs.sourceGeneration()
Expand Down
4 changes: 2 additions & 2 deletions .github/pkl-workflows/helpers/Lint.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function verifyNamespaces(): gha.Job = new {
Steps.checkoutWithoutMatchers(false)
...Steps.fetchPackages(null)
new {
run = "dotnet tool install ilspycmd -g --version 8.0.0.7345"
run = "dotnet tool install ilspycmd -g --version 9.0.0.7833-preview3"
}
new {
name = "Verify Namespaces"
Expand Down Expand Up @@ -66,4 +66,4 @@ function verifyNamespaces(): gha.Job = new {
shell = "pwsh"
}
}
}
}
131 changes: 11 additions & 120 deletions .github/pkl-workflows/helpers/Test.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,8 @@ function netCore(frameworks: Listing<Common.NetFramework>): gha.Job = testJob(
["os"] = new {
new { runner = "windows-latest" runtime = "win-x64" }
new { runner = "ubuntu-latest" runtime = "linux-x64" }
new { runner = "macos-14" runtime = "osx-x64" }
}
["include"] = new {
new {
["framework"] = "net8.0"
["os"] = new MatrixOS { runner = "macos-14" runtime = "osx-arm64" }
}
new { runner = "macos-13" runtime = "osx-x64" }
new { runner = "macos-latest" runtime = "osx-arm64" }
}
}
`fail-fast` = false
Expand Down Expand Up @@ -104,8 +99,8 @@ function weaver(): gha.Job = testJob(
},
(config) -> new Listing<gha.Step> {
...Steps.checkout(false)
...Steps.setupWorkloads(null, "6.0.x")
...Steps.dotnetPublish("Tests/Weaver/Realm.Fody.Tests", "net6.0", "${{ matrix.os.runtime }}", new Mapping {}).toList()
...Steps.setupWorkloads(null, "8.0.x")
...Steps.dotnetPublish("Tests/Weaver/Realm.Fody.Tests", "net8.0", "${{ matrix.os.runtime }}", new Mapping {}).toList()
...dotnetRunTests(false)
...reportTestResults(config)
})
Expand All @@ -119,7 +114,7 @@ function xunit(): gha.Job = testJob(
null,
(config) -> new Listing<gha.Step> {
...prepareTests(config)
...Steps.dotnetPublish("Tests/Tests.XUnit", "net6.0", "win-x64", new Mapping {}).toList()
...Steps.dotnetPublish("Tests/Tests.XUnit", "net8.0", "win-x64", new Mapping {}).toList()
new {
name = "Run Tests"
run = "dotnet test \(executableExpression)/Tests.XUnit.dll --logger GitHubActions"
Expand All @@ -135,7 +130,7 @@ function sourceGeneration(): gha.Job = testJob(
(config) -> new Listing<gha.Step> {
...Steps.checkout(false)
...Steps.setupWorkloads(null, "6.0.x")
...Steps.dotnetPublish("Tests/SourceGenerators/Realm.SourceGenerator.Tests", "net6.0", "win-x64", new Mapping {}).toList()
...Steps.dotnetPublish("Tests/SourceGenerators/Realm.SourceGenerator.Tests", "net8.0", "win-x64", new Mapping {}).toList()
...dotnetRunTests(false)
...reportTestResults(config)
})
Expand All @@ -157,62 +152,6 @@ function wovenClasses(): gha.Job = testJob(
}
)

function tvOS(_syncDifferentiators: Listing<Common.SyncDifferentiator>): gha.Job = testJob(
new TestConfig {
needsPackages = true
title = "Xamarin.tvOS"
syncDifferentiator = "tvos"
syncDifferentiators = _syncDifferentiators
},
"macos-12",
null,
(config) -> new Listing<gha.Step> {
...prepareTests(config)
...buildTests(new Steps.MSBuildConfig {
projects {
"Tests/Tests.XamarinTVOS"
}
properties {
["Platform"] = "iPhoneSimulator"
}
})
Steps.runSimulator(new Steps.SimulatorConfig {
appPath = "Tests/Tests.XamarinTVOS/bin/iPhoneSimulator/\(Common.configuration)/Tests.XamarinTVOS.app"
arguments = "--headless --result=${{ github.workspace }}/\(outputFile) --labels=All \(baasTestArgs(config))"
bundleId = "io.realm.Tests-XamarinTVOS"
iphoneToSimulate = "Apple-TV-1080p"
os = "tvOS"
})
...reportTestResults(config)
})

function iOS_Xamarin(): gha.Job = testJob(
new TestConfig {
needsPackages = true
title = "Xamarin.iOS"
},
"macos-12",
null,
(config) -> new Listing<gha.Step> {
...prepareTests(config)
...buildTests(new Steps.MSBuildConfig {
projects {
"Tests/Tests.iOS"
}
properties {
["Platform"] = "iPhoneSimulator"
}
})
Steps.runSimulator(new Steps.SimulatorConfig {
appPath = "Tests/Tests.iOS/bin/iPhoneSimulator/\(Common.configuration)/Tests.iOS.app"
arguments = "--headless --result=${{ github.workspace }}/\(outputFile) --labels=All \(baasTestArgs(config))"
bundleId = "io.realm.dotnettests"
iphoneToSimulate = "iPhone-8"
os = "iOS"
})
...reportTestResults(config)
})

function iOS_Maui(_syncDifferentiators: Listing<Common.SyncDifferentiator>): gha.Job = testJob(
new TestConfig {
needsPackages = true
Expand All @@ -221,15 +160,15 @@ function iOS_Maui(_syncDifferentiators: Listing<Common.SyncDifferentiator>): gha
syncDifferentiators = _syncDifferentiators
transformResults = true
},
"macos-13",
"macos-latest",
null,
(config) -> new Listing<gha.Step> {
...prepareTests(config)
...Steps.setupWorkloads("maui", null)
Steps.setupXcode("latest-stable")
Steps.dotnetBuild("Tests/Tests.Maui", "net8.0-ios", null, getTestProps(false))
Steps.runSimulator(new Steps.SimulatorConfig {
appPath = "Tests/Tests.Maui/bin/\(Common.configuration)/net8.0-ios/iossimulator-x64/Tests.Maui.app"
appPath = "Tests/Tests.Maui/bin/\(Common.configuration)/net8.0-ios/iossimulator-arm64/Tests.Maui.app"
arguments = "--headless --result=${{ github.workspace }}/\(outputFile) --labels=All \(baasTestArgs(config))"
bundleId = "io.realm.mauitests"
iphoneToSimulate = "iPhone-15"
Expand All @@ -238,27 +177,6 @@ function iOS_Maui(_syncDifferentiators: Listing<Common.SyncDifferentiator>): gha
...reportTestResults(config)
})

function macOS_Xamarin(): gha.Job = testJob(
new TestConfig {
needsPackages = true
title = "Xamarin.macOS"
},
"macos-12",
null,
(config) -> new Listing<gha.Step> {
...prepareTests(config)
...buildTests(new Steps.MSBuildConfig {
projects {
"Tests/Tests.XamarinMac"
}
})
new {
name = "Run the tests"
run = "Tests/Tests.XamarinMac/bin/\(Common.configuration)/Tests.XamarinMac.app/Contents/MacOS/Tests.XamarinMac --headless --result=${{ github.workspace }}/\(outputFile) --labels=All"
}
...reportTestResults(config)
})

function macOS_Maui(_syncDifferentiators: Listing<Common.SyncDifferentiator>): gha.Job = testJob(
new TestConfig {
needsPackages = true
Expand All @@ -267,7 +185,7 @@ function macOS_Maui(_syncDifferentiators: Listing<Common.SyncDifferentiator>): g
syncDifferentiators = _syncDifferentiators
transformResults = true
},
"macos-13",
"macos-latest",
null,
(config) -> new Listing<gha.Step> {
...prepareTests(config)
Expand Down Expand Up @@ -322,33 +240,6 @@ function uwp(_syncDifferentiators: Listing<Common.SyncDifferentiator>): gha.Job
...reportTestResultsWithCustomFile("${{ env.TEST_RESULTS }}", config)
})

function android_Xamarin(): gha.Job = testJob(
new TestConfig {
needsPackages = true
title = "Xamarin.Android"
},
new gha.WindowsLatest {},
null,
(config) -> new Listing<gha.Step> {
Steps.setupJDK()
...prepareTests(config)
...buildTests(new Steps.MSBuildConfig {
projects {
"Tests/Tests.Android"
}
target = "SignAndroidPackage"
properties {
["AndroidUseSharedRuntime"] = "False"
["EmbedAssembliesIntoApk"] = "True"
}
})
...Steps.runDeviceFarm(new Steps.DeviceFarmConfig {
apkPath = "${{ github.workspace }}/Tests/Tests.Android/bin/Release/io.realm.xamarintests-Signed.apk"
appId = "io.realm.xamarintests"
})
...reportTestResultsWithCustomFile("${{ steps.run_tests.outputs.test-results-path }}", config)
})

function android_Maui(_syncDifferentiators: Listing<Common.SyncDifferentiator>): gha.Job = testJob(
new TestConfig {
needsPackages = true
Expand Down Expand Up @@ -488,7 +379,7 @@ function benchmark(): gha.Job = testJob(
name = "Clear nuget cache"
run = "dotnet nuget locals all --clear"
}
...Steps.dotnetPublish("Tests/Benchmarks/PerformanceTests", "net6.0", "linux-x64", getTestProps(true))
...Steps.dotnetPublish("Tests/Benchmarks/PerformanceTests", "net8.0", "linux-x64", getTestProps(true))
new {
name = "Run the tests"
run = "\(executableExpression)/PerformanceTests -f \"*\" --join"
Expand Down Expand Up @@ -630,7 +521,7 @@ local function archiveCoreDump(): gha.Step = (Steps.uploadArtifacts("crash-repor
}

local class MatrixOS {
runner: "windows-latest"|"ubuntu-latest"|"macos-13"|"macos-14"
runner: "windows-latest"|"ubuntu-latest"|"macos-13"|"macos-latest"
runtime: Common.NetRuntime
}

Expand Down
2 changes: 1 addition & 1 deletion .github/pkl-workflows/main.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ local baasDifferentiators: Listing<Common.SyncDifferentiator> = new {
}

local netCoreFrameworks: Listing<Common.NetFramework> = new {
"net6.0"
"net9.0"
"net8.0"
}

Expand Down
4 changes: 2 additions & 2 deletions .github/pkl-workflows/pr.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local baasDifferentiators: Listing<Common.SyncDifferentiator> = new {
}

local netCoreFrameworks: Listing<Common.NetFramework> = new {
"net6.0"
"net8.0"
}

name = "PR Build"
Expand Down Expand Up @@ -41,4 +41,4 @@ concurrency {
`cancel-in-progress` = true
}

jobs = Common.defaultBuildJobs(baasDifferentiators, netCoreFrameworks)
jobs = Common.defaultBuildJobs(baasDifferentiators, netCoreFrameworks)
10 changes: 5 additions & 5 deletions .github/pkl-workflows/wrappers.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs {
}
}
["macos"] = new Job {
`runs-on` = "macos-12"
`runs-on` = "macos-latest"
name = "MacOS"
} |> wrappersJob(new JobConfig {
cmd = "./wrappers/build-macos.sh"
Expand All @@ -58,7 +58,7 @@ jobs {
}
})
["catalyst"] = new Job {
`runs-on` = "macos-12"
`runs-on` = "macos-latest"
name = "Catalyst"
} |> wrappersJob(new JobConfig {
cmd = "pwsh ./wrappers/build-apple-platform.ps1 Catalyst"
Expand All @@ -75,14 +75,14 @@ jobs {
}
`fail-fast` = false
}
`runs-on` = "macos-12"
`runs-on` = "macos-latest"
name = "Apple Platform"
} |> wrappersJob(new JobConfig {
cmd = "pwsh ./wrappers/build-apple-platform.ps1 ${{ matrix.platform }} -Targets ${{ matrix.target }}"
enableLTO = false
platform = "${{ matrix.platform }}-${{ matrix.target }}"
intermediateSteps {
Steps.setupXcode("14")
Steps.setupXcode("latest-stable")
Steps.setupCmake("3.29.0")
}
ifCondition = "\(Common.applePlatformTargets((platform, target) -> "needs.\(job_CheckCache).outputs.wrappers-\(platform)-\(target) != 'true'").join(" || "))"
Expand Down Expand Up @@ -212,4 +212,4 @@ local class JobConfig {

hidden configParam = "\(if (cmd.startsWith("pwsh")) "-Configuration " else "--configuration=")\(Common.configuration)"
hidden ltoParam = if (!enableLTO) "" else (if (cmd.startsWith("pwsh")) "-EnableLTO" else "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION='ON'")
}
}
22 changes: 0 additions & 22 deletions .github/workflows/check-pr-title.yml

This file was deleted.

Loading

0 comments on commit 3c0aa71

Please sign in to comment.