Fixed project path in comment. #3262
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| # Supported platforms: https://docs.github.com/en/actions/reference/runners/github-hosted-runners | |
| os: | |
| - windows-latest | |
| - windows-11-arm | |
| - ubuntu-24.04-arm | |
| - ubuntu-latest | |
| - macos-26 # choose a macOS version with Xcode that is supported by https://github.com/dotnet/macios/releases | |
| fail-fast: false # Don't cancel one when another fails | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.x' | |
| - uses: jakoch/install-vulkan-sdk-action@v1 | |
| if: contains(matrix.os, 'macos') | |
| with: | |
| optional_components: com.lunarg.vulkan.ios | |
| - name: Build desktop only | |
| run: dotnet build | |
| - name: Install MAUI workload (if not Linux ARM) | |
| if: "!(contains(matrix.os, 'ubuntu') && contains(matrix.os, 'arm'))" # .NET Android SDK doesn't support Linux ARM64: https://github.com/dotnet/android/issues/11184 | |
| run: | | |
| dotnet workload install ${{ case(!contains(matrix.os, 'ubuntu'), 'maui', 'maui-android') }} # Linux doesn't support iOS therefore full MAUI workload | |
| - name: Install Android dependencies for Windows ARM | |
| if: "contains(matrix.os, 'windows') && contains(matrix.os, 'arm')" | |
| run: | |
| dotnet build "Projects/Mobile" -t:InstallAndroidDependencies -f net10.0-android -p BuildMobile=true,AcceptAndroidSdkLicenses=True | |
| - name: Get Xcode version from Apple workload | |
| if: contains(matrix.os, 'macos') | |
| id: ios-version | |
| run: | | |
| # NOTE: .NET for iOS/tvOS/MacCatalyst checks the major.minor version of Xcode for version validation. | |
| # Meanwhile, the available property for us (_RecommendedXcodeVersion) may include a build number like 26.6.1. | |
| # We strip any patch component so setup-xcode uses semver range matching (bare "26.6" matches any 26.6.x). | |
| # If we passed the full 3-component version like "26.6.1", Node.js's semver.satisfies would require | |
| # an exact patch match, which could fail if the runner only has "26.6.0" (or vice versa). | |
| # This property is more reliable than trying to derive the Xcode version from the workload version number, since the mapping is | |
| # not always 1:1 (e.g. iOS 26.5 → Xcode 26.6), see https://github.com/dotnet/macios/issues/25818 | |
| XCODE_VERSION=$(dotnet build "Projects/Mobile" -f net10.0-ios -getProperty:_RecommendedXcodeVersion 2>/dev/null | tail -n 1) # Note the project used should have OutputType=Exe, because OutputType=Library has a different version returned | |
| echo "Recommended Xcode version is $XCODE_VERSION" | |
| XCODE_VERSION=$(echo "$XCODE_VERSION" | cut -d. -f1-2) # Keep only major.minor | |
| echo "xcode-version=${XCODE_VERSION}" >> "$GITHUB_OUTPUT" | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| if: contains(matrix.os, 'macos') | |
| with: | |
| xcode-version: ${{ steps.ios-version.outputs.xcode-version }} | |
| - name: Build all (if not Linux ARM) | |
| if: "!(contains(matrix.os, 'ubuntu') && contains(matrix.os, 'arm'))" | |
| run: dotnet build -p BuildMobile=true | |
| test: | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] # can't include ARM because we don't have ImGui native libraries | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.x' | |
| - uses: jakoch/install-vulkan-sdk-action@v1 | |
| if: contains(matrix.os, 'macos') | |
| # GitHub Actions runners have no GPU so skip Integration tests | |
| - run: dotnet test Nu/Nu.Tests --filter TestCategory!="Integration" |