diff --git a/.github/pkl-workflows/codeql.pkl b/.github/pkl-workflows/codeql.pkl index 228586e166..dff05f4723 100644 --- a/.github/pkl-workflows/codeql.pkl +++ b/.github/pkl-workflows/codeql.pkl @@ -58,7 +58,7 @@ jobs { } } ...Steps.setupAndroid() - ...Steps.setupWorkloads("tvos ios maccatalyst android", "8.0.x") + Steps.setupDotnet("8.0.x") ...Steps.msbuild(new Steps.MSBuildConfig { projects = Common.packages.map((pkg) -> "Realm/\(pkg)").toListing() properties { diff --git a/.github/pkl-workflows/helpers/Package.pkl b/.github/pkl-workflows/helpers/Package.pkl index 782e104448..386a1a9f34 100644 --- a/.github/pkl-workflows/helpers/Package.pkl +++ b/.github/pkl-workflows/helpers/Package.pkl @@ -22,8 +22,7 @@ function nuget(shouldBuildDocsCondition: String): gha.Job = new { `timeout-minutes` = 30 steps { ...Steps.checkout(false) - ...Steps.setupAndroid() - ...Steps.setupWorkloads("tvos ios maccatalyst android", "8.0.x") + Steps.setupDotnet("8.0.x") setVersionSuffix ...Steps.fetchWrappers(null) ...Steps.msbuild(new Steps.MSBuildConfig { diff --git a/.github/pkl-workflows/helpers/Steps.pkl b/.github/pkl-workflows/helpers/Steps.pkl index 2abac1bf9f..6d6b932dbf 100644 --- a/.github/pkl-workflows/helpers/Steps.pkl +++ b/.github/pkl-workflows/helpers/Steps.pkl @@ -107,11 +107,11 @@ const function fetchWrappers(wrappers: List(every((wrapper) -> Common.wr } }) -const function setupWorkloads(workloads: String?, dotnetVersion: String?): Listing = new { - setupDotnet(dotnetVersion) +const function setupMaui(): Listing = new { + setupDotnet(null) new { - name = "Setup workloads" - run = "dotnet workload install \(workloads ?? "android ${{ (runner.os != 'Linux' && 'tvos ios maccatalyst') || '' }}")" + name = "Setup Maui workload" + run = "dotnet workload install maui" } } diff --git a/.github/pkl-workflows/helpers/Test.pkl b/.github/pkl-workflows/helpers/Test.pkl index 51b0fbd2c5..8aaad8a7a7 100644 --- a/.github/pkl-workflows/helpers/Test.pkl +++ b/.github/pkl-workflows/helpers/Test.pkl @@ -99,7 +99,7 @@ function weaver(): gha.StepJobBase = testJob( }, (config) -> new Listing { ...Steps.checkout(false) - ...Steps.setupWorkloads(null, "6.0.x") + Steps.setupDotnet("6.0.x") ...Steps.dotnetPublish("Tests/Weaver/Realm.Fody.Tests", "net6.0", "${{ matrix.os.runtime }}", new Mapping{}).toList() ...dotnetRunTests(false) ...reportTestResults(config) @@ -129,7 +129,7 @@ function sourceGeneration(): gha.StepJobBase = testJob( null, (config) -> new Listing { ...Steps.checkout(false) - ...Steps.setupWorkloads(null, "6.0.x") + Steps.setupDotnet("6.0.x") ...Steps.dotnetPublish("Tests/SourceGenerators/Realm.SourceGenerator.Tests", "net6.0", "win-x64", new Mapping{}).toList() ...dotnetRunTests(false) ...reportTestResults(config) @@ -212,11 +212,11 @@ function iOS_Maui(): gha.StepJobBase = testJob( title = "Maui.iOS" transformResults = true }, - "macos-13", + "macos-14", null, (config) -> new Listing { ...prepareTests(config) - ...Steps.setupWorkloads("maui", null) + ...Steps.setupMaui() Steps.setupXcode("latest-stable") Steps.dotnetBuild("Tests/Tests.Maui", "net8.0-ios", null, getTestProps(false)) Steps.runSimulator(new Steps.SimulatorConfig{ @@ -256,11 +256,11 @@ function macOS_Maui(): gha.StepJobBase = testJob( title = "Maui.MacCatalyst" transformResults = true }, - "macos-13", + "macos-14", null, (config) -> new Listing { ...prepareTests(config) - ...Steps.setupWorkloads("maui", null) + ...Steps.setupMaui() Steps.setupXcode("latest-stable") Steps.dotnetBuild("Tests/Tests.Maui", "net8.0-maccatalyst", null, getTestProps(false)) new { @@ -347,7 +347,7 @@ function android_Maui(): gha.StepJobBase = testJob( (config) -> new Listing { Steps.setupJDK() ...prepareTests(config) - ...Steps.setupWorkloads("maui", null) + ...Steps.setupMaui() ...Steps.dotnetPublish("Tests/Tests.Maui", "net8.0-android", /* runtime */ null, getTestProps(false)) ...Steps.runDeviceFarm(new Steps.DeviceFarmConfig { apkPath = "${{ github.workspace }}/Tests/Tests.Maui/bin/Release/net8.0-android/publish/io.realm.mauitests-Signed.apk" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 29b790522c..be738d2ed3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -56,8 +56,6 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 8.0.x - - name: Setup workloads - run: dotnet workload install tvos ios maccatalyst android - name: Add msbuild to PATH if: ${{ runner.os == 'Windows' }} uses: microsoft/setup-msbuild@70b70342ae97ca98d5eaad06cafd26d30f9592a9 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c350197d8d..f30613e4de 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,20 +41,9 @@ jobs: run: |- echo "::add-matcher::.github/problem-matchers/csc.json" echo "::add-matcher::.github/problem-matchers/msvc.json" - - name: Setup JDK - uses: actions/setup-java@2e74cbce18569d23ca8b812590dbb83f13ac7c5a - with: - distribution: microsoft - java-version: 17 - - name: Setup Android - uses: android-actions/setup-android@e1f5280adf78cf863c0fa43ffabc64a9cd08153f - - name: Install SDK platform 21 - run: sdkmanager --install "platforms;android-21" - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 8.0.x - - name: Setup workloads - run: dotnet workload install tvos ios maccatalyst android - name: Set version suffix id: set-version-suffix run: |- @@ -675,7 +664,7 @@ jobs: - build-packages if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') timeout-minutes: 60 - runs-on: macos-13 + runs-on: macos-14 steps: - name: Checkout Code uses: actions/checkout@v4 @@ -694,7 +683,7 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 8.0.x - - name: Setup workloads + - name: Setup Maui workload run: dotnet workload install maui - name: Setup Xcode uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd @@ -767,7 +756,7 @@ jobs: - build-packages if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') timeout-minutes: 60 - runs-on: macos-13 + runs-on: macos-14 steps: - name: Checkout Code uses: actions/checkout@v4 @@ -786,7 +775,7 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 8.0.x - - name: Setup workloads + - name: Setup Maui workload run: dotnet workload install maui - name: Setup Xcode uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd @@ -945,7 +934,7 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 8.0.x - - name: Setup workloads + - name: Setup Maui workload run: dotnet workload install maui - name: Publish Tests/Tests.Maui run: dotnet publish Tests/Tests.Maui -c Release -f net8.0-android -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ needs.build-packages.outputs.package_version }} --no-self-contained @@ -1037,8 +1026,6 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 6.0.x - - name: Setup workloads - run: dotnet workload install android ${{ (runner.os != 'Linux' && 'tvos ios maccatalyst') || '' }} - name: Publish Tests/SourceGenerators/Realm.SourceGenerator.Tests run: dotnet publish Tests/SourceGenerators/Realm.SourceGenerator.Tests -c Release -f net6.0 -r win-x64 --no-self-contained - name: Output executable path @@ -1075,8 +1062,6 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 6.0.x - - name: Setup workloads - run: dotnet workload install android ${{ (runner.os != 'Linux' && 'tvos ios maccatalyst') || '' }} - name: Publish Tests/Weaver/Realm.Fody.Tests run: dotnet publish Tests/Weaver/Realm.Fody.Tests -c Release -f net6.0 -r ${{ matrix.os.runtime }} --no-self-contained - name: Output executable path diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 407368cbdf..41bcdfcbca 100755 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -47,20 +47,9 @@ jobs: run: |- echo "::add-matcher::.github/problem-matchers/csc.json" echo "::add-matcher::.github/problem-matchers/msvc.json" - - name: Setup JDK - uses: actions/setup-java@2e74cbce18569d23ca8b812590dbb83f13ac7c5a - with: - distribution: microsoft - java-version: 17 - - name: Setup Android - uses: android-actions/setup-android@e1f5280adf78cf863c0fa43ffabc64a9cd08153f - - name: Install SDK platform 21 - run: sdkmanager --install "platforms;android-21" - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 8.0.x - - name: Setup workloads - run: dotnet workload install tvos ios maccatalyst android - name: Set version suffix id: set-version-suffix run: |- @@ -680,7 +669,7 @@ jobs: - build-packages if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') timeout-minutes: 60 - runs-on: macos-13 + runs-on: macos-14 steps: - name: Checkout Code uses: actions/checkout@v4 @@ -699,7 +688,7 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 8.0.x - - name: Setup workloads + - name: Setup Maui workload run: dotnet workload install maui - name: Setup Xcode uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd @@ -772,7 +761,7 @@ jobs: - build-packages if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') timeout-minutes: 60 - runs-on: macos-13 + runs-on: macos-14 steps: - name: Checkout Code uses: actions/checkout@v4 @@ -791,7 +780,7 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 8.0.x - - name: Setup workloads + - name: Setup Maui workload run: dotnet workload install maui - name: Setup Xcode uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd @@ -950,7 +939,7 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 8.0.x - - name: Setup workloads + - name: Setup Maui workload run: dotnet workload install maui - name: Publish Tests/Tests.Maui run: dotnet publish Tests/Tests.Maui -c Release -f net8.0-android -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ needs.build-packages.outputs.package_version }} --no-self-contained @@ -1042,8 +1031,6 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 6.0.x - - name: Setup workloads - run: dotnet workload install android ${{ (runner.os != 'Linux' && 'tvos ios maccatalyst') || '' }} - name: Publish Tests/SourceGenerators/Realm.SourceGenerator.Tests run: dotnet publish Tests/SourceGenerators/Realm.SourceGenerator.Tests -c Release -f net6.0 -r win-x64 --no-self-contained - name: Output executable path @@ -1080,8 +1067,6 @@ jobs: - uses: actions/setup-dotnet@5d1464d5da459f3d7085106d52e499f4dc5d0f59 with: dotnet-version: 6.0.x - - name: Setup workloads - run: dotnet workload install android ${{ (runner.os != 'Linux' && 'tvos ios maccatalyst') || '' }} - name: Publish Tests/Weaver/Realm.Fody.Tests run: dotnet publish Tests/Weaver/Realm.Fody.Tests -c Release -f net6.0 -r ${{ matrix.os.runtime }} --no-self-contained - name: Output executable path