Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f4856cd
Add Android device smoke tests via DeviceRunners
hahn-kev Jul 2, 2026
bcec434
Simplify Android test MAUI host to Android-only.
hahn-kev Jul 2, 2026
f9c9fe3
Add Android collation test; treat Android as Unix.
hahn-kev Jul 2, 2026
92d76de
Load bundled ICU 72 on Android for device tests in Debug and Release.
hahn-kev Jul 3, 2026
f0a14b7
Run icu.net.tests NUnit suite on Android via DeviceRunners.
hahn-kev Jul 3, 2026
f207712
Enable TRX output so dotnet test shows the standard summary on Android.
hahn-kev Jul 3, 2026
8a033f0
Rebuild TRX from DeviceRunners JSONL when failure output breaks XML.
hahn-kev Jul 3, 2026
8bbf99d
Move Android ICU bootstrap into icu.net with optional net10.0-android…
hahn-kev Jul 3, 2026
5ed6bf6
Drop xUnit from Android device tests; use NUnit only.
hahn-kev Jul 3, 2026
c8f4b5f
Add CI job for Android device tests and publish TRX results.
hahn-kev Jul 3, 2026
e24c2ff
Fix CI: exclude Android from default solution build.
hahn-kev Jul 3, 2026
5446e62
Fix invalid setup-java and pin android-emulator-runner action SHAs.
hahn-kev Jul 3, 2026
2e5774c
Fix Android CI ANDROID_HOME for ubuntu runner SDK path.
hahn-kev Jul 3, 2026
c297631
Run only Android smoke tests in CI until suite triage is done.
hahn-kev Jul 3, 2026
edc02c5
Fix DeviceRunners TRX paths on Linux CI runners.
hahn-kev Jul 3, 2026
bf1fb1d
Skip TRX rebuild when DeviceRunners paths are unset after PrepareArgs.
hahn-kev Jul 3, 2026
11c5a10
Run full Android NUnit suite in CI again.
hahn-kev Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"microsoft.dotnet.xharness.cli": {
"version": "11.0.0-prerelease.26217.1",
"commands": [
"xharness"
]
}
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
*.xml -whitespace
*.yml -whitespace
*.json -whitespace
*.sh text eol=lf
changelog -whitespace
GitVersion.yml -whitespace
79 changes: 79 additions & 0 deletions .github/workflows/CI-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,85 @@ jobs:
output/*.snupkg
if: matrix.os == 'ubuntu-latest'

android-build-and-test:
name: "Android Build and Test"
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: '0'

- name: Install .NET
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: |
8.0.x
10.0.x

- name: Install Java
uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7 # v4.2.0
with:
distribution: temurin
java-version: 17

- name: Install MAUI Android workload
run: dotnet workload install maui-android

- name: Install Android NDK
run: |
SDK_ROOT="${ANDROID_HOME:-/usr/local/lib/android/sdk}"
echo "ANDROID_HOME=$SDK_ROOT" >> "$GITHUB_ENV"
echo "ANDROID_SDK_ROOT=$SDK_ROOT" >> "$GITHUB_ENV"
yes | "$SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --licenses || true
"$SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --install "ndk;27.0.12077973"
echo "ANDROID_NDK_HOME=$SDK_ROOT/ndk/$(ls "$SDK_ROOT/ndk" | sort -V | tail -1)" >> "$GITHUB_ENV"

- name: Cache ICU Android build
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: output/android-icu
key: android-icu-${{ runner.os }}-72.1-x86_64-${{ hashFiles('scripts/build-icu-android.sh') }}
restore-keys: |
android-icu-${{ runner.os }}-72.1-x86_64-

- name: Build ICU for Android
run: bash scripts/build-icu-android.sh --arch=x86_64

- name: Build Android test project
run: |
export IcuDotNetIncludeAndroid=true
dotnet build --configuration Release source/icu.net.android.tests/icu.net.android.tests.csproj \
-f net10.0-android -p:IcuDotNetIncludeAndroid=true

- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Run Android device tests
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2.35.0
with:
api-level: 30
arch: x86_64
target: google_apis
profile: pixel_6
disable-animations: true
script: bash scripts/ci-android-tests.sh

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: Test Results (android)
path: |
source/icu.net.android.tests/test-results/**
**/TestResults/*.xml
if-no-files-found: warn

publish-nuget:
name: "Publish NuGet package"
runs-on: ubuntu-22.04
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ jobs:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
nunit_files: "artifacts/**/*.xml"
files: |
artifacts/**/*.xml
artifacts/**/*.trx
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ build/nuget.exe
build/packages/
lib/
output/
# Explicit marker for Android ICU cross-compile output (also under output/)
output/android-icu/
bin/
obj/
test-results/
Expand Down
58 changes: 58 additions & 0 deletions scripts/build-icu-android.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#Requires -Version 5.1
<#
.SYNOPSIS
Cross-compile ICU4C for Android (one-time setup, like brew install icu4c on macOS).

.DESCRIPTION
Invokes scripts/build-icu-android.sh via Git Bash or WSL bash.
Output (gitignored): output/android-icu/{x86_64,arm64-v8a}/libicu*.so*

Prerequisites:
- Android NDK (ANDROID_NDK_HOME or ANDROID_HOME/ndk/<version>)
- Git Bash or WSL with: bash, curl, tar, make

.EXAMPLE
.\scripts\build-icu-android.ps1
.\scripts\build-icu-android.ps1 -Arch x86_64
.\scripts\build-icu-android.ps1 -Arch x86_64,arm64-v8a
#>
[CmdletBinding()]
param(
[string] $Arch = 'x86_64',
[string] $IcuVersion = '72.1',
[int] $ApiLevel = 21,
[switch] $Clean
)

$ErrorActionPreference = 'Stop'
$repoRoot = Split-Path -Parent $PSScriptRoot
$bashScript = Join-Path $PSScriptRoot 'build-icu-android.sh'

function Find-Bash {
$candidates = @(
(Get-Command bash -ErrorAction SilentlyContinue)?.Source,
'C:\Program Files\Git\bin\bash.exe',
'C:\Program Files (x86)\Git\bin\bash.exe'
) | Where-Object { $_ -and (Test-Path $_) }
return $candidates | Select-Object -First 1
}

$bash = Find-Bash
if (-not $bash) {
Write-Error @"
bash not found. Install Git for Windows or use WSL, then re-run this script.
Alternatively run: bash scripts/build-icu-android.sh --arch=$Arch
"@
}

$args = @(
$bashScript
"--arch=$Arch"
"--api=$ApiLevel"
"--icu-version=$IcuVersion"
)
if ($Clean) { $args += '--clean' }

Write-Host "Running: $bash $($args -join ' ')"
& $bash @args
exit $LASTEXITCODE
Loading
Loading