Skip to content

Commit e247fd7

Browse files
authored
Merge pull request #1220 from unoplatform/dev/agzi/MigrateUiTestToNet9
2 parents 85562f6 + 8dbf9bd commit e247fd7

19 files changed

+186
-112
lines changed

.github/workflows/azure-static-webapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
build_and_deploy_job:
1616
env:
1717
DIST_PATH: Uno.Gallery/bin/Release/net9.0-browserwasm/publish/wwwroot
18-
DotnetVersion: '9.0.203'
18+
DotnetVersion: '9.0.300'
1919

2020
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
2121
runs-on: ubuntu-latest

Uno.Gallery/Platforms/Android/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0">
3-
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
3+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
44
<application android:label="Uno.Gallery"></application>
55
<uses-permission android:name="android.permission.INTERNET" />
66
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

Uno.Gallery/Uno.Gallery.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
<!-- NOTE: We cannot build with dotnet build -p:TargetFrameworks=net9.0-platform as that will flow to source generator project, which is incorrect -->
88
<TargetFramework Condition="'$(TargetFrameworkOverride)'!=''">$(TargetFrameworkOverride)</TargetFramework>
99
<TargetFrameworks Condition="'$(TargetFrameworkOverride)'==''">
10+
net9.0-android;
1011
net9.0-ios;
1112
net9.0-maccatalyst;
1213
net9.0-windows10.0.19041;
1314
net9.0-desktop;
1415
net9.0-browserwasm;
1516
</TargetFrameworks>
1617

17-
<!-- android is disable on linux until ci is fixed -->
18-
<TargetFrameworks Condition="'$(TargetFrameworkOverride)'=='' AND !$([MSBuild]::IsOSPlatform('linux'))">$(TargetFrameworks);net9.0-android;</TargetFrameworks>
19-
2018
<!--
2119
Uncomment to use Native rendering for iOS/Android/Wasm
2220
<UseNativeRendering>true</UseNativeRendering>
@@ -125,7 +123,6 @@
125123
<ItemGroup Condition="
126124
('$(Configuration)'=='Debug' or '$(IsUiAutomationMappingEnabled)'=='True')
127125
AND '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'ios'
128-
AND $([MSBuild]::VersionLessThan($([MSBuild]::GetTargetFrameworkVersion($(TargetFramework))), '9.0'))
129126
">
130127
<PackageReference Include="Xamarin.TestCloud.Agent" />
131128
</ItemGroup>

azure-pipelines.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ variables:
4242
IsLightBuild: $[eq(variables['Build.Reason'], 'PullRequest')]
4343
IsCanaryBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/canaries/')]
4444

45-
XCODE_ROOT: '/Applications/Xcode_16.3.app'
46-
XCODE_ROOT_UITESTS: '/Applications/Xcode_15.3.app'
45+
XCODE_ROOT: '/Applications/Xcode_16.4.app'
46+
XCODE_ROOT_UITESTS: '/Applications/Xcode_16.4.app'
4747

4848
# Required to about trashing azdo hosted agents
4949
AotCompileMaxDegreeOfParallelism: 3
@@ -283,12 +283,11 @@ stages:
283283
jobs:
284284
- template: build/stage-uitests-ios.yml
285285

286-
# Disabled for ANR issue on the hosted agents with System.UI
287-
# - stage: Android_Tests
288-
# displayName: 'Android Tests'
289-
# dependsOn: []
290-
# jobs:
291-
# - template: build/stage-uitests-android.yml
286+
- stage: Android_Tests
287+
displayName: 'Android Tests'
288+
dependsOn: []
289+
jobs:
290+
- template: build/stage-uitests-android.yml
292291

293292
- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/canaries/dev') }}:
294293
- template: build/templates/canary-publish/stage-publish-wasm-canary.yml

build/scripts/android-uitest-build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ export ANDROID_SDK_ROOT=$BUILD_SOURCESDIRECTORY/build/android-sdk
1414
export CMDLINETOOLS=commandlinetools-mac-8512546_latest.zip
1515
mkdir -p $ANDROID_HOME
1616
wget https://dl.google.com/android/repository/$CMDLINETOOLS
17-
unzip $CMDLINETOOLS -d $ANDROID_HOME/cmdline-tools
17+
unzip -o $CMDLINETOOLS -d $ANDROID_HOME/cmdline-tools
1818
rm $CMDLINETOOLS
1919
mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/latest
2020

21-
if [[ -f $ANDROID_HOME/platform-tools/platform-tools/adb ]]
21+
if [[ -d $ANDROID_HOME/platform-tools/platform-tools ]]
2222
then
2323
# It appears that the platform-tools 29.0.6 are extracting into an incorrect path
2424
mv $ANDROID_HOME/platform-tools/platform-tools/* $ANDROID_HOME/platform-tools
@@ -31,10 +31,10 @@ then
3131
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platform-tools' | tr '\r' '\n' | uniq
3232
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'build-tools;35.0.0' | tr '\r' '\n' | uniq
3333
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platforms;android-28' | tr '\r' '\n' | uniq
34-
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platforms;android-34' | tr '\r' '\n' | uniq
34+
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platforms;android-35' | tr '\r' '\n' | uniq
3535
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'extras;android;m2repository' | tr '\r' '\n' | uniq
3636
fi
3737

3838
# Build the sample, while the emulator is starting
3939
cd $UNO_UITEST_ANDROID_PROJECT
40-
dotnet publish -f net8.0-android -p:TargetFrameworkOverride=net8.0-android -c Release -p:RuntimeIdentifier=android-x64 /p:IsUiAutomationMappingEnabled=True /p:AndroidUseSharedRuntime=false /p:AotAssemblies=true /p:EmbedAssembliesIntoApk=true -bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/android-app.binlog
40+
dotnet publish -f net9.0-android -p:TargetFrameworkOverride=net9.0-android -p:UseNativeRendering=true -c Release /p:AndroidPackageFormat=apk /p:RuntimeIdentifier=android-x64 /p:IsUiAutomationMappingEnabled=true /p:AndroidUseSharedRuntime=false /p:AndroidUseAssemblyStore=false /p:RunAOTCompilation=false /p:PublishTrimmed=false /p:AndroidStripILAfterAOT=false -bl:"$BUILD_ARTIFACTSTAGINGDIRECTORY/android-app.binlog"

build/scripts/android-uitest-run.sh

Lines changed: 90 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,53 @@ export UNO_UITEST_ANDROID_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery
1212
export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/Uno.Gallery.UITests/bin/Release/net47/Uno.Gallery.UITests.dll
1313
export UNO_EMULATOR_INSTALLED=$BUILD_SOURCESDIRECTORY/build/.emulator_started
1414
export UITEST_TEST_TIMEOUT=60m
15-
export UNO_UITEST_ANDROIDAPK_PATH=$UNO_UITEST_ANDROIDAPK_BASEPATH/com.nventive.uno.ui.demo-Signed.apk
16-
export ANDROID_SIMULATOR_APILEVEL=34
15+
16+
# Prefer the signed APK from build artifacts (Windows job) when available,
17+
# otherwise fall back to the unsigned APK published locally by the UITest job (macOS agent).
18+
APK_FROM_ARTIFACT="$(ls "$UNO_UITEST_ANDROIDAPK_BASEPATH"/*.apk 2>/dev/null | head -n 1 || true)"
19+
APK_FROM_LOCAL="$(ls $BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net9.0-android/android-x64/publish/*.apk 2>/dev/null | head -n 1 || true)"
20+
21+
if [ -f "$APK_FROM_ARTIFACT" ]; then
22+
export UNO_UITEST_ANDROIDAPK_PATH="$APK_FROM_ARTIFACT"
23+
elif [ -f "$APK_FROM_LOCAL" ]; then
24+
export UNO_UITEST_ANDROIDAPK_PATH="$APK_FROM_LOCAL"
25+
else
26+
echo "ERROR: APK not found (neither artifact nor local publish)."
27+
exit 1
28+
fi
29+
30+
echo "Using APK: $UNO_UITEST_ANDROIDAPK_PATH"
31+
32+
# .NET 9 UITest workaround (maui#31072): ensure assemblies.blob exists inside the APK
33+
# UITest sometimes refuses to run if no assemblies store is present.
34+
# Related issue: https://github.com/dotnet/maui/issues/31072
35+
command -v zip >/dev/null || { echo "ERROR: 'zip' not found on PATH"; exit 1; }
36+
tmpdir="$(mktemp -d)"
37+
touch "$tmpdir/assemblies.blob"
38+
( cd "$tmpdir" && zip -q "$UNO_UITEST_ANDROIDAPK_PATH" assemblies.blob )
39+
rm -rf "$tmpdir"
40+
41+
export ANDROID_SIMULATOR_APILEVEL=28
1742

1843
AVD_NAME=xamarin_android_emulator
1944
AVD_CONFIG_FILE=~/.android/avd/$AVD_NAME.avd/config.ini
2045

2146
# Override Android SDK tooling
2247
export ANDROID_HOME=$BUILD_SOURCESDIRECTORY/build/android-sdk
2348
export ANDROID_SDK_ROOT=$BUILD_SOURCESDIRECTORY/build/android-sdk
49+
export LATEST_CMDLINE_TOOLS_PATH=$ANDROID_SDK_ROOT/cmdline-tools/latest
2450
export CMDLINETOOLS=commandlinetools-mac-8512546_latest.zip
2551
mkdir -p $ANDROID_HOME
52+
53+
if [ -d $LATEST_CMDLINE_TOOLS_PATH ];
54+
then
55+
rm -rf $LATEST_CMDLINE_TOOLS_PATH
56+
fi
57+
2658
wget https://dl.google.com/android/repository/$CMDLINETOOLS
2759
unzip $CMDLINETOOLS -d $ANDROID_HOME/cmdline-tools
2860
rm $CMDLINETOOLS
29-
mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/latest
61+
mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $LATEST_CMDLINE_TOOLS_PATH
3062

3163
if [[ -f $ANDROID_HOME/platform-tools/platform-tools/adb ]]
3264
then
@@ -36,21 +68,49 @@ fi
3668

3769
AVD_NAME=xamarin_android_emulator
3870
AVD_CONFIG_FILE=~/.android/avd/$AVD_NAME.avd/config.ini
71+
EMU_UPDATE_FILE=~/.android/emu-update-last-check.ini
72+
SDK_MGR_TOOLS_FLAG=.sdk_toolkit_installed
73+
74+
mkdir -p $UNO_UITEST_SCREENSHOT_PATH
75+
76+
install_android_sdk() {
77+
SIMULATOR_APILEVEL=$1
78+
79+
if [[ ! -f $SDK_MGR_TOOLS_FLAG ]];
80+
then
81+
touch $SDK_MGR_TOOLS_FLAG
3982

40-
# Install Android SDK emulators and SDKs
41-
if [ ! -f "$UNO_EMULATOR_INSTALLED" ];
83+
echo "y" | $LATEST_CMDLINE_TOOLS_PATH/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'tools'| tr '\r' '\n' | uniq
84+
echo "y" | $LATEST_CMDLINE_TOOLS_PATH/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platform-tools' | tr '\r' '\n' | uniq
85+
echo "y" | $LATEST_CMDLINE_TOOLS_PATH/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'build-tools;35.0.0' | tr '\r' '\n' | uniq
86+
echo "y" | $LATEST_CMDLINE_TOOLS_PATH/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'extras;android;m2repository' | tr '\r' '\n' | uniq
87+
fi
88+
89+
echo "y" | $LATEST_CMDLINE_TOOLS_PATH/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "platforms;android-$SIMULATOR_APILEVEL" | tr '\r' '\n' | uniq
90+
echo "y" | $LATEST_CMDLINE_TOOLS_PATH/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "system-images;android-$SIMULATOR_APILEVEL;google_apis_playstore;x86_64" | tr '\r' '\n' | uniq
91+
}
92+
93+
94+
if [[ ! -f $EMU_UPDATE_FILE ]];
4295
then
43-
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "tools"| tr '\r' '\n' | uniq
44-
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "platform-tools" | tr '\r' '\n' | uniq
45-
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "build-tools;35.0.0" | tr '\r' '\n' | uniq
46-
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "platforms;android-$ANDROID_SIMULATOR_APILEVEL" | tr '\r' '\n' | uniq
47-
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "extras;android;m2repository" | tr '\r' '\n' | uniq
96+
touch $EMU_UPDATE_FILE
97+
fi
4898

99+
if [[ ! -f $AVD_CONFIG_FILE ]];
100+
then
49101
# Install AVD files
50-
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "system-images;android-$ANDROID_SIMULATOR_APILEVEL;google_apis;x86_64"
102+
install_android_sdk $ANDROID_SIMULATOR_APILEVEL
103+
install_android_sdk 34
104+
install_android_sdk 35
105+
106+
if [[ -f $ANDROID_HOME/platform-tools/platform-tools/adb ]]
107+
then
108+
# It appears that the platform-tools 29.0.6 are extracting into an incorrect path
109+
mv $ANDROID_HOME/platform-tools/platform-tools/* $ANDROID_HOME/platform-tools
110+
fi
51111

52112
# Create emulator
53-
echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_NAME --abi "x86_64" -k "system-images;android-$ANDROID_SIMULATOR_APILEVEL;google_apis;x86_64" --sdcard 128M --force
113+
echo "no" | $LATEST_CMDLINE_TOOLS_PATH/bin/avdmanager create avd -n "$AVD_NAME" --abi "x86_64" -k "system-images;android-$ANDROID_SIMULATOR_APILEVEL;google_apis_playstore;x86_64" --sdcard 128M --force
54114

55115
# based on https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#hardware
56116
# >> Agents that run macOS images are provisioned on Mac pros with a 3 core CPU, 14 GB of RAM, and 14 GB of SSD disk space.
@@ -59,27 +119,29 @@ then
59119
# Bump the heap size as the tests are stressing the application
60120
echo "vm.heapSize=256M" >> $AVD_CONFIG_FILE
61121

62-
echo $ANDROID_HOME/emulator/emulator -list-avds
122+
$ANDROID_HOME/emulator/emulator -list-avds
123+
124+
echo "Checking for hardware acceleration"
125+
$ANDROID_HOME/emulator/emulator -accel-check
63126

64127
echo "Starting emulator"
65128

129+
# kickstart ADB
130+
$ANDROID_HOME/platform-tools/adb devices
131+
66132
# Start emulator in background
67-
nohup $ANDROID_HOME/emulator/emulator \
68-
-avd $AVD_NAME \
69-
-skin 1280x800 \
70-
-memory 4096 \
71-
-no-window \
72-
-gpu swiftshader_indirect \
73-
-no-snapshot \
74-
-noaudio \
75-
-no-boot-anim \
76-
-prop ro.debuggable=1 \
77-
> $BUILD_ARTIFACTSTAGINGDIRECTORY/android-emulator-log.txt 2>&1 &
78-
79-
touch "$UNO_EMULATOR_INSTALLED"
80-
fi
133+
nohup $ANDROID_HOME/emulator/emulator -avd "$AVD_NAME" -skin 1280x800 -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim > $UNO_UITEST_SCREENSHOT_PATH/android-emulator-log.txt 2>&1 &
81134

82-
mkdir -p $UNO_UITEST_SCREENSHOT_PATH
135+
# Wait for the emulator to finish booting
136+
source $BUILD_SOURCESDIRECTORY/build/scripts/android-uitest-wait-systemui.sh 500
137+
138+
else
139+
# Restart the emulator to avoid running first-time tasks
140+
$ANDROID_HOME/platform-tools/adb reboot
141+
142+
# Wait for the emulator to finish booting
143+
source $BUILD_SOURCESDIRECTORY/build/scripts/android-uitest-wait-systemui.sh 500
144+
fi
83145

84146
cp $UNO_UITEST_ANDROIDAPK_PATH $UNO_UITEST_SCREENSHOT_PATH
85147

build/scripts/ios-uitest-build.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euo pipefail
33
IFS=$'\n\t'
44

55
export UNO_UITEST_IOS_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery
66

77
cd $UNO_UITEST_IOS_PROJECT
88

9-
########
10-
# Warning using net8.0-ios is required because of xamarin.uitest not supporting net9
11-
########
12-
dotnet build -p:TargetFrameworkOverride=net8.0-ios -r iossimulator-x64 -c Release -p:IsUiAutomationMappingEnabled=True -bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/ios-app.binlog
9+
dotnet build -f net9.0-ios -r iossimulator-x64 -p:TargetFrameworkOverride=net9.0-ios -c Release -p:UseNativeRendering=true -p:IsUiAutomationMappingEnabled=true -p:CodesignDisable=true -bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/ios-app.binlog

build/scripts/ios-uitest-run.sh

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export UNO_UITEST_LOGFILE=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/ios/nunit-
99
export UNO_UITEST_IOS_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery
1010
export UITEST_TEST_TIMEOUT=60m
1111

12-
export UNO_UITEST_SIMULATOR_VERSION="com.apple.CoreSimulator.SimRuntime.iOS-17-5"
13-
export UNO_UITEST_SIMULATOR_NAME="iPad Pro (12.9-inch) (6th generation)"
12+
export UNO_UITEST_SIMULATOR_VERSION="com.apple.CoreSimulator.SimRuntime.iOS-18-4"
13+
export UNO_UITEST_SIMULATOR_NAME="iPad Pro 13-inch (M4)"
1414

15-
echo "Lising iOS simulators"
15+
echo "Listing iOS simulators"
1616
xcrun simctl list devices --json
1717

1818
echo "Starting simulator"
@@ -32,11 +32,11 @@ while true; do
3232
export UITEST_IOSDEVICE_DATA_PATH=`xcrun simctl list -j | jq -r --arg sim "$UNO_UITEST_SIMULATOR_VERSION" --arg name "$UNO_UITEST_SIMULATOR_NAME" '.devices[$sim] | .[] | select(.name==$name) | .dataPath'`
3333

3434
if [ -n "$UITEST_IOSDEVICE_ID" ]; then
35-
break
36-
fi
35+
break
36+
fi
3737

38-
echo "Waiting for the simulator to be available"
39-
sleep 5
38+
echo "Waiting for the simulator to be available"
39+
sleep 5
4040
done
4141

4242
echo "Simulator Data Path: $UITEST_IOSDEVICE_DATA_PATH"
@@ -56,12 +56,31 @@ then
5656
brew install idb-companion
5757
pipx install fb-idb
5858
else
59-
echo "Using idb from:" `command -v idb`
59+
echo "Using idb from:" `command -v idb`
6060
fi
6161

6262
echo "Booting the simulator"
63+
# Clean state, then boot and wait until the device is fully booted.
6364
xcrun simctl boot "$UITEST_IOSDEVICE_ID" || true
6465

66+
# Try publish/, then non-publish, then the downloaded artifact
67+
if [ -z "${UNO_UITEST_IOSBUNDLE_PATH:-}" ]; then
68+
echo "iOS app bundle path not found, trying publish"
69+
UNO_UITEST_IOSBUNDLE_PATH="$(ls "$BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net9.0-ios/iossimulator-x64/publish/"*.app 2>/dev/null | head -n 1)"
70+
fi
71+
if [ -z "${UNO_UITEST_IOSBUNDLE_PATH:-}" ]; then
72+
echo "iOS app bundle (publish) not found, trying non-publish"
73+
UNO_UITEST_IOSBUNDLE_PATH="$(ls "$BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net9.0-ios/iossimulator-x64/"*.app 2>/dev/null | head -n 1)"
74+
fi
75+
if [ -z "${UNO_UITEST_IOSBUNDLE_PATH:-}" ]; then
76+
echo "iOS app bundle (non-publish) not found, trying artifact download"
77+
UNO_UITEST_IOSBUNDLE_PATH="$(ls "$PIPELINE_WORKSPACE/iOS_UITest/"*.app 2>/dev/null | head -n 1)"
78+
fi
79+
if [ -z "${UNO_UITEST_IOSBUNDLE_PATH:-}" ] || [ ! -d "$UNO_UITEST_IOSBUNDLE_PATH" ]; then
80+
echo "ERROR: iOS app bundle not found in publish/, net9.0-ios/, or under \$PIPELINE_WORKSPACE/iOS_UITest"
81+
exit 1
82+
fi
83+
6584
echo "Installing the app"
6685
idb install --udid "$UITEST_IOSDEVICE_ID" "$UNO_UITEST_IOSBUNDLE_PATH"
6786

build/scripts/wasm-uitest-build.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euo pipefail
33
IFS=$'\n\t'
44

@@ -8,3 +8,13 @@ export UNO_UITEST_WASM_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery/Uno.Gallery.c
88
cd $BUILD_SOURCESDIRECTORY
99

1010
dotnet publish -f net9.0-browserwasm -p:Configuration=Release $UNO_UITEST_WASM_PROJECT -p:UseNativeRendering=true -p:IsUiAutomationMappingEnabled=True -bl:$UNO_UITEST_SCREENSHOT_PATH/msbuild.binlog
11+
12+
WASM_OUT="$BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net9.0-browserwasm/publish"
13+
if [ ! -d "$WASM_OUT" ]; then
14+
WASM_OUT="$BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net9.0-browserwasm/publish"
15+
fi
16+
17+
echo "Contents of WASM output folder:"
18+
ls -la "$BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net9.0-browserwasm/publish"
19+
20+
echo "##vso[task.setvariable variable=UNO_UITEST_WASM_OUTPUT_PATH]$WASM_OUT"

build/stage-build-wasm.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
- template: templates/gitversion.yml
33

44
- template: templates/dotnet-install-linux.yml
5-
parameters:
6-
UnoCheckParameters: '--tfm net9.0-browserwasm'
75

86
- template: templates/canary-updater.yml
97

@@ -15,7 +13,7 @@
1513
condition: always()
1614
retryCountOnTaskFailure: 3
1715
inputs:
18-
PathtoPublish: '$(Agent.TempDirectory)/wasm-publish/wwwroot'
16+
PathtoPublish: '$(Agent.TempDirectory)/wasm-publish'
1917
ArtifactName: $(ArtifactName)
2018

2119
- task: PublishBuildArtifacts@1

0 commit comments

Comments
 (0)