diff --git a/.github/workflows/build-samples-todoapp-avalonia.yml b/.github/workflows/build-samples-todoapp-avalonia.yml index a5e5a08..2312b59 100644 --- a/.github/workflows/build-samples-todoapp-avalonia.yml +++ b/.github/workflows/build-samples-todoapp-avalonia.yml @@ -76,18 +76,51 @@ jobs: ios: # iOS builds require Xcode, which is only available on macOS runners. - runs-on: macos-latest + # Pinned to macos-15 (rather than macos-latest) while that label migrates to macos-26 + # (see https://github.com/actions/runner-images/issues/14167, rollout through + # 2026-07-15): macos-latest can currently land on either image at random, each with a + # different default Xcode (16.4 vs 26.4.1), and macos-15's *default* Xcode (16.4) doesn't + # match what any currently-published net10.0 iOS SDK pack requires (see WorkloadSetVersion + # below) - so this job also explicitly selects a non-default Xcode already installed on + # the image (see the "Select Xcode" step) to match. See + # https://github.com/CommunityToolkit/Datasync/issues/529. Revisit this whole job once we + # deliberately upgrade to a newer, Xcode-26-compatible workload set. + runs-on: macos-15 + env: + # `dotnet workload install ios` alone always resolves the newest published + # Microsoft.iOS.Sdk.net10.0_* pack. As of workload set 10.0.108, that's 26.5.10284, + # which requires Xcode 26.5 - not installed on macos-15 (even as a non-default Xcode). + # Pinning to 10.0.107 (the last set before the iOS/MacCatalyst/macOS/tvOS manifest moved + # to the 26.4/26.5 pack line; see workload-set history for package id + # Microsoft.NET.Workloads.10.0.100 on nuget.org) resolves 26.2.10233 instead, which + # requires Xcode 26.3 - installed (non-default) on macos-15 as of image 20260629.0276.1 + # (see the "Select Xcode" step below). This also keeps other manifests (e.g. Android) at + # their latest versions. `--version` pins only this job's `dotnet workload install` + # invocation and the `restore`/`build` steps that follow it in the same runner - it's + # intentionally not a repo-wide global.json pin, which would force every `dotnet` + # invocation in the whole repo (including samples with no workload dependency at all) + # to require this exact workload version to already be installed, breaking them on a + # fresh runner. + WorkloadSetVersion: '10.0.107' + RequiredXcodeVersion: '26.3' steps: - name: Checkout Repository uses: actions/checkout@v7 + - name: Select Xcode ${{ env.RequiredXcodeVersion }} + # macos-15 defaults to Xcode 16.4, which doesn't satisfy what the pinned iOS + # workload (see WorkloadSetVersion above) requires. Xcode 26.3 is already installed + # on the image, just not selected by default - so switch to it explicitly rather + # than installing anything extra. + run: sudo xcode-select -s /Applications/Xcode_${{ env.RequiredXcodeVersion }}.app + - name: Setup .NET uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Install iOS workload - run: dotnet workload install ios + run: dotnet workload install ios --version ${{ env.WorkloadSetVersion }} - name: Restore iOS project run: dotnet restore ${{ env.iOSProjectFile }} diff --git a/.github/workflows/build-samples-todoapp-maui.yml b/.github/workflows/build-samples-todoapp-maui.yml index 5f03eda..0f977cb 100644 --- a/.github/workflows/build-samples-todoapp-maui.yml +++ b/.github/workflows/build-samples-todoapp-maui.yml @@ -48,18 +48,51 @@ jobs: ios: # iOS builds require Xcode, which is only available on macOS runners. - runs-on: macos-latest + # Pinned to macos-15 (rather than macos-latest) while that label migrates to macos-26 + # (see https://github.com/actions/runner-images/issues/14167, rollout through + # 2026-07-15): macos-latest can currently land on either image at random, each with a + # different default Xcode (16.4 vs 26.4.1), and macos-15's *default* Xcode (16.4) doesn't + # match what any currently-published net10.0 iOS SDK pack requires (see WorkloadSetVersion + # below) - so this job also explicitly selects a non-default Xcode already installed on + # the image (see the "Select Xcode" step) to match. See + # https://github.com/CommunityToolkit/Datasync/issues/529. Revisit this whole job once we + # deliberately upgrade to a newer, Xcode-26-compatible workload set. + runs-on: macos-15 + env: + # `dotnet workload install maui-ios` alone always resolves the newest published + # Microsoft.iOS.Sdk.net10.0_* pack. As of workload set 10.0.108, that's 26.5.10284, + # which requires Xcode 26.5 - not installed on macos-15 (even as a non-default Xcode). + # Pinning to 10.0.107 (the last set before the iOS/MacCatalyst/macOS/tvOS manifest moved + # to the 26.4/26.5 pack line; see workload-set history for package id + # Microsoft.NET.Workloads.10.0.100 on nuget.org) resolves 26.2.10233 instead, which + # requires Xcode 26.3 - installed (non-default) on macos-15 as of image 20260629.0276.1 + # (see the "Select Xcode" step below). This also keeps other manifests (e.g. MAUI, + # Android) at their latest versions. `--version` pins only this job's + # `dotnet workload install` invocation and the `restore`/`build` steps that follow it in + # the same runner - it's intentionally not a repo-wide global.json pin, which would + # force every `dotnet` invocation in the whole repo (including samples with no workload + # dependency at all) to require this exact workload version to already be installed, + # breaking them on a fresh runner. + WorkloadSetVersion: '10.0.107' + RequiredXcodeVersion: '26.3' steps: - name: Checkout Repository uses: actions/checkout@v7 + - name: Select Xcode ${{ env.RequiredXcodeVersion }} + # macos-15 defaults to Xcode 16.4, which doesn't satisfy what the pinned iOS + # workload (see WorkloadSetVersion above) requires. Xcode 26.3 is already installed + # on the image, just not selected by default - so switch to it explicitly rather + # than installing anything extra. + run: sudo xcode-select -s /Applications/Xcode_${{ env.RequiredXcodeVersion }}.app + - name: Setup .NET uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Install MAUI iOS workload - run: dotnet workload install maui-ios + run: dotnet workload install maui-ios --version ${{ env.WorkloadSetVersion }} - name: Restore MAUI project (iOS TFM only) run: dotnet restore ${{ env.MauiProjectFile }} -p:TargetFramework=${{ env.iOSTargetFramework }}