Skip to content

ci: enable MTP coverage and dynamic Xcode setup #55

ci: enable MTP coverage and dynamic Xcode setup

ci: enable MTP coverage and dynamic Xcode setup #55

Workflow file for this run

name: Build and Test
on: [push, pull_request]
jobs:
Unix:
if: (github.event_name == 'pull_request') == github.event.pull_request.head.repo.fork
strategy:
fail-fast: false # Don't cancel other os builds if one fails
matrix:
# Check included Xcode versions for GitHub Actions: https://github.com/actions/runner-images?tab=readme-ov-file#available-images
os: [ubuntu-latest, macos-26] # windows-latest is tested in Nightly.yml. It also needs special handling with regards to CSharpMath.Uno.Example so it's omitted here.
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-dotnet@main
with:
dotnet-version: '10.x'
- name: Select recommended Xcode version
id: ios-version
if: startsWith(matrix.os, 'macos')
shell: bash
run: |
_RecommendedXcodeVersion=$(dotnet build CSharpMath.Maui.Example/CSharpMath.Maui.Example.csproj --no-restore -getProperty:_RecommendedXcodeVersion -f net10.0-ios -p:OutputType=Exe | tail -n 1 | tr -d '\r' | sed 's/\.[0-9]*$//')
echo "xcode-version=${_RecommendedXcodeVersion:-latest-stable}" >> "$GITHUB_OUTPUT"
- uses: maxim-lobanov/setup-xcode@v1
if: startsWith(matrix.os, 'macos')
with:
xcode-version: ${{ steps.ios-version.outputs.xcode-version }}
- uses: actions/setup-dotnet@main
with:
dotnet-version: '10.x'
workloads: ${{ case(startsWith(matrix.os, 'ubuntu'), 'maui-android, wasm-tools', 'maui, wasm-tools') }}
- name: Build Everything
run: dotnet build
- name: Run Tests
run: dotnet test --no-build --solution CSharpMath.slnx