SDSL rewrite #100
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: Build Android Runtime | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/build-android.yml' | |
| - 'build/Stride.Android.slnf' | |
| # - 'deps/**' | |
| # - 'sources/core/**' | |
| # - 'sources/engine/**' | |
| # - 'sources/native/**' | |
| # - 'sources/shaders/**' | |
| # - 'sources/shared/**' | |
| # - 'sources/sdk/**' | |
| - '!**/.all-contributorsrc' | |
| - '!**/.editorconfig' | |
| - '!**/.gitignore' | |
| - '!**/*.md' | |
| - '!crowdin.yml' | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| inputs: | |
| build-type: | |
| description: Build Configuration | |
| default: Debug | |
| type: choice | |
| options: | |
| - Debug | |
| - Release | |
| workflow_call: | |
| inputs: | |
| build-type: | |
| default: Debug | |
| type: string | |
| concurrency: | |
| group: build-android-${{ github.event.pull_request.number || github.ref }}-${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} | |
| cancel-in-progress: true | |
| jobs: | |
| # | |
| # Build Stride Runtime for Android | |
| # | |
| Android-Runtime: | |
| if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }} | |
| name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }}) | |
| runs-on: windows-2025-vs2026 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| submodules: true | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Install Android Workload | |
| run: dotnet workload install android | |
| - name: Remove Conflicting NDK | |
| shell: pwsh | |
| run: | | |
| $conflictingNdk = "C:\Android\android-sdk\ndk\26.3.11579264" | |
| if (Test-Path $conflictingNdk) { | |
| Write-Host "Removing conflicting NDK 26.3.11579264" | |
| Remove-Item -Path $conflictingNdk -Recurse -Force | |
| } | |
| - name: Setup Android | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| cmdline-tools-version: 12266719 | |
| accept-android-sdk-licenses: true | |
| log-accepted-android-sdk-licenses: true | |
| packages: tools platform-tools ndk;21.4.7075529 | |
| - name: Configure NDK Environment | |
| shell: pwsh | |
| run: | | |
| $ndkPath = "$env:ANDROID_SDK_ROOT\ndk\21.4.7075529" | |
| echo "ANDROID_NDK_ROOT=$ndkPath" >> $env:GITHUB_ENV | |
| echo "ANDROID_NDK_HOME=$ndkPath" >> $env:GITHUB_ENV | |
| echo "Using NDK at: $ndkPath" | |
| - name: Debug NDK Configuration | |
| shell: pwsh | |
| run: | | |
| Write-Host "ANDROID_SDK_ROOT: $env:ANDROID_SDK_ROOT" | |
| Write-Host "ANDROID_NDK_ROOT: $env:ANDROID_NDK_ROOT" | |
| Write-Host "ANDROID_NDK_HOME: $env:ANDROID_NDK_HOME" | |
| Write-Host "NDK Path exists: $(Test-Path $env:ANDROID_NDK_ROOT)" | |
| if (Test-Path "$env:ANDROID_NDK_ROOT\source.properties") { | |
| Get-Content "$env:ANDROID_NDK_ROOT\source.properties" | |
| } | |
| - name: Build | |
| run: | | |
| dotnet build build\Stride.Android.slnf ` | |
| -p:StrideNativeBuildMode=Clang ` | |
| -m:1 -nr:false ` | |
| -p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} ` | |
| -p:StridePlatforms=Android ` | |
| -p:StrideSkipUnitTests=true ` | |
| -p:StrideSkipAutoPack=true ` | |
| -p:_AndroidNdkDirectory="$env:ANDROID_NDK_ROOT" |