diff --git a/.github/workflows/azure-static-webapp.yml b/.github/workflows/azure-static-webapp.yml index 40fcc04cb..bb4027593 100644 --- a/.github/workflows/azure-static-webapp.yml +++ b/.github/workflows/azure-static-webapp.yml @@ -14,7 +14,7 @@ on: jobs: build_and_deploy_job: env: - DIST_PATH: Uno.Gallery/bin/Release/net8.0-browserwasm/dist + DIST_PATH: Uno.Gallery/bin/Release/net9.0-browserwasm/publish/wwwroot if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest @@ -26,6 +26,17 @@ jobs: fetch-depth: 0 # Required for gitversion submodules: true + - name: Setup .NET + uses: actions/setup-dotnet@v1.7.2 + with: + dotnet-version: '9.0.100-rc.2.24474.11' + include-prerelease: true + + - run: | + cd Uno.Gallery + dotnet workload install wasm-tools + name: Setup Workloads + - name: Install GitVersion uses: gittools/actions/gitversion/setup@v0.9.7 with: @@ -38,19 +49,21 @@ jobs: useConfigFile: true configFilePath: build/gitversion.yml - - name: Setup .NET SDK - uses: actions/setup-dotnet@v1.7.2 - with: - dotnet-version: '8.0.100' - - run: | cd Uno.Gallery - dotnet build -c Release -p:TargetFrameworkOverride=net8.0-browserwasm "/p:PackageVersion=${{ steps.gitversion.outputs.fullSemVer }}" + dotnet publish -c Release -f net9.0-browserwasm "/p:PackageVersion=${{ steps.gitversion.outputs.fullSemVer }}" /bl:../binlogs/output.binlog + name: Build Gallery + - uses: actions/upload-artifact@v4 with: name: wasm-site path: ${{ env.DIST_PATH }} + - uses: actions/upload-artifact@v4 + with: + name: logs + path: binlogs + - name: Publish to Azure Static WebApps id: builddeploy_uno continue-on-error: true @@ -68,7 +81,7 @@ jobs: close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest + runs-on: ubuntu-latest name: Close Pull Request Job steps: - name: Close Pull Request diff --git a/Directory.Build.props b/Directory.Build.props index 8daf56929..342cb55fb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,5 +11,9 @@ PRI257: Ignore default language (en) not being one of the included resources (eg en-us, en-uk) --> $(NoWarn);NU1507;NETSDK1201;PRI257 + + 2.88.9-preview.2.2 + 9.1.0-dev.41 + diff --git a/Directory.Packages.props b/Directory.Packages.props index 5d8f2537e..4f8ea937b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,39 +1,42 @@ - - - - - - - - - - - + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + diff --git a/Uno.Gallery.UITests/Uno.Gallery.UITests.csproj b/Uno.Gallery.UITests/Uno.Gallery.UITests.csproj index 19ed83888..0539978d0 100644 --- a/Uno.Gallery.UITests/Uno.Gallery.UITests.csproj +++ b/Uno.Gallery.UITests/Uno.Gallery.UITests.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 true diff --git a/Uno.Gallery.sln b/Uno.Gallery.sln index f4db7f5a5..f6c2db910 100644 --- a/Uno.Gallery.sln +++ b/Uno.Gallery.sln @@ -11,6 +11,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BADA71DC-7FFD-4EDC-9F28-FB74AEADC713}" ProjectSection(SolutionItems) = preProject .gitignore = .gitignore + .github\workflows\azure-static-webapp.yml = .github\workflows\azure-static-webapp.yml Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets Directory.Packages.props = Directory.Packages.props diff --git a/Uno.Gallery/Platforms/WebAssembly/aot-uitests.profile b/Uno.Gallery/Platforms/WebAssembly/aot-uitests.profile index a0b71f79f..76f585f17 100644 Binary files a/Uno.Gallery/Platforms/WebAssembly/aot-uitests.profile and b/Uno.Gallery/Platforms/WebAssembly/aot-uitests.profile differ diff --git a/Uno.Gallery/Platforms/WebAssembly/aot.profile b/Uno.Gallery/Platforms/WebAssembly/aot.profile index 2a5fc2ccf..2b9c6cbde 100644 Binary files a/Uno.Gallery/Platforms/WebAssembly/aot.profile and b/Uno.Gallery/Platforms/WebAssembly/aot.profile differ diff --git a/Uno.Gallery/Platforms/WebAssembly/wwwroot/favicon.ico b/Uno.Gallery/Platforms/WebAssembly/wwwroot/favicon.ico deleted file mode 100644 index c7db125fe..000000000 Binary files a/Uno.Gallery/Platforms/WebAssembly/wwwroot/favicon.ico and /dev/null differ diff --git a/Uno.Gallery/Properties/launchSettings.json b/Uno.Gallery/Properties/launchSettings.json index 74be6876a..7d3df4b44 100644 --- a/Uno.Gallery/Properties/launchSettings.json +++ b/Uno.Gallery/Properties/launchSettings.json @@ -42,7 +42,7 @@ }, "Gallery (Desktop WSL2)": { "commandName": "WSL2", - "commandLineArgs": "{ProjectDir}/bin/Debug/net8.0-desktop/Uno.Gallery.dll", + "commandLineArgs": "{ProjectDir}/bin/Debug/net9.0-desktop/Uno.Gallery.dll", "distributionName": "", "compatibleTargetFramework": "desktop" } diff --git a/Uno.Gallery/Uno.Gallery.csproj b/Uno.Gallery/Uno.Gallery.csproj index 1096e793f..1689887f8 100644 --- a/Uno.Gallery/Uno.Gallery.csproj +++ b/Uno.Gallery/Uno.Gallery.csproj @@ -1,19 +1,22 @@  - + - + - + $(TargetFrameworkOverride) - net8.0-android; - net8.0-ios; - net8.0-maccatalyst; - net8.0-windows10.0.19041; - net8.0-desktop; - net8.0-browserwasm; + net9.0-ios; + net9.0-maccatalyst; + net9.0-windows10.0.19041; + net9.0-desktop; + net9.0-browserwasm; + + + $(TargetFrameworks);net9.0-android; + Exe true @@ -68,25 +71,47 @@ - + - + - + iPhone Distribution ios-arm64 - + - + + / + + + + InterpreterAndAOT + false + true + true + + + + + true Apple Distribution: Uno Platform Inc. (PD74CHS9Z5) 3rd Party Mac Developer Installer @@ -99,16 +124,16 @@ Uno Gallery Canary (Catalyst) - + true - + - + @@ -119,7 +144,9 @@ - + + + all runtime; build; native; contentfiles; analyzers @@ -128,7 +155,40 @@ all runtime; build; native; contentfiles; analyzers + + + + + + + aot.profile + + + + aot-uitests.profile + + + + + + + <_WasmLinkStepArgs Remove="@(_EmccLinkStepArgs)" /> + <_EmccLinkStepArgs Remove=""%(_WasmNativeFileForLinking.Identity)"" /> + <_WasmLinkDependencies Remove="@(_WasmNativeFileForLinking)" /> + + <_SkiaSharpToReorder Include="@(_WasmNativeFileForLinking)" Condition="$([System.String]::Copy('%(FullPath)').Contains('SkiaSharp'))" /> + <_WasmNativeFileForLinking Remove="@(_SkiaSharpToReorder)" /> + <_WasmNativeFileForLinking Include="@(_SkiaSharpToReorder)" /> + + <_EmccLinkStepArgs Include=""%(_WasmNativeFileForLinking.Identity)"" /> + <_WasmLinkDependencies Include="@(_WasmNativeFileForLinking)" /> + <_WasmLinkStepArgs Include="@(_EmccLinkStepArgs)" /> + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d07444e53..927833bf3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -42,144 +42,184 @@ variables: IsLightBuild: $[eq(variables['Build.Reason'], 'PullRequest')] IsCanaryBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/canaries/')] - XCODE_ROOT: '/Applications/Xcode_15.4.app' - -jobs: -- job: Windows_Android_Mobile - strategy: - maxParallel: 3 - matrix: - Android_Store: - ApplicationPlatform: AnyCPU - ArtifactName: Android - BuildForPlayStore: True - VersionCodeOffset: 1 - - pool: - vmImage: windows-2022 - - variables: - - group: 'UADO Keystore' # Import all variables for the signing from the library in azure devops - - steps: - - template: build/stage-build-android-mobile.yml - -- job: Windows_WinAppSDK - pool: - vmImage: windows-2022 - - variables: - - group: 'UADO Keystore' # Import all variables for the Android signing from the library in azure devops - - group: 'Uno Platform authenticode signing' # Import all variables for the signing from the library in azure devops - - name: ApplicationPlatform - value: x86 # switch back to x64 once CommunityToolkit.WinUI.UI supports x64 (https://github.com/CommunityToolkit/Lottie-Windows/issues/515#issuecomment-1662305826) - - name: BuildTargetFramework - value: net8.0-windows10.0.19041 - - name: ArtifactName - value: Windows - - name: VersionCodeOffset - value: 50 - - name: PackageOutputPath - value: $(Build.ArtifactStagingDirectory) - - steps: - - template: build/stage-build-windows.yml - -- job: Windows_Desktop - pool: - vmImage: windows-2022 - - variables: - - group: 'UADO Keystore' # Import all variables for the signing from the library in azure devops - - steps: - - template: build/stage-build-skia-desktop.yml - -- job: macOS_netcore - strategy: - maxParallel: 2 - matrix: - iOS: - BuildTargetFramework: net8.0-ios - ArtifactName: iOS-mobile - ApplicationBuildNumberOffset: 50 - BuildCommand: publish - Catalyst: - BuildTargetFramework: net8.0-maccatalyst - ArtifactName: Catalyst - ApplicationBuildNumberOffset: 50 - BuildCommand: build - pool: - vmImage: macos-14 - - variables: - - name: SkipUnknownFrameworks - value: true # Used by TargetFrameworks.Filtering package - - group: unoplatform.apple.ios.appstore.distribution - - steps: - - task: InstallAppleCertificate@2 - displayName: Install Certificate - inputs: - certSecureFile: UnoPlatform-Apple-Distribution.p12 - certPwd: $(appleappstorecertificatepassword) - keychain: temp - # disabled because of azure devops failing to uninstall as of 2022-11-16 - # deleteCert: true - - - task: InstallAppleCertificate@2 - displayName: Install Certificate - inputs: - certSecureFile: UnoPlatform-MacInstaller.p12 - certPwd: $(appleappstorecertificatepassword) - keychain: temp - # disabled because of azure devops failing to uninstall as of 2022-11-16 - # deleteCert: true - - - task: InstallAppleProvisioningProfile@1 - displayName: 'Install Apple Provisioning Profile' - inputs: - provisioningProfileLocation: 'secureFiles' - provProfileSecureFile: Uno_Gallery_Catalyst.provisionprofile - - - task: InstallAppleProvisioningProfile@1 - displayName: 'Install Apple Provisioning Profile' - inputs: - provisioningProfileLocation: 'secureFiles' - provProfileSecureFile: Uno_Gallery_Canary_Catalyst.provisionprofile - - - task: InstallAppleProvisioningProfile@1 - displayName: 'Install Apple Provisioning Profile' - inputs: - provisioningProfileLocation: 'secureFiles' - provProfileSecureFile: Uno_Gallery_iOS.mobileprovision - - - task: InstallAppleProvisioningProfile@1 - displayName: 'Install Apple Provisioning Profile' - inputs: - provisioningProfileLocation: 'secureFiles' - provProfileSecureFile: Uno_Gallery_Canary_iOS.mobileprovision - - - template: build/templates/xcode-select.yml - parameters: - xCodeRoot: $(XCODE_ROOT) - - - template: build/stage-build-mobile.yml - -- job: Linux - timeoutInMinutes: 60 - pool: - vmImage: ubuntu-latest - - container: unoplatform/wasm-build:3.0 - - variables: - ArtifactName: WASM - SkipUnknownFrameworks: true - - steps: - - template: build/stage-build-wasm.yml - -- template: build/stage-uitests-wasm.yml -- template: build/stage-uitests-ios.yml -- template: build/stage-uitests-android.yml + XCODE_ROOT: '/Applications/Xcode_16.app' + XCODE_ROOT_UITESTS: '/Applications/Xcode_15.3.app' + + # Required to about trashing azdo hosted agents + AotCompileMaxDegreeOfParallelism: 2 + +stages: +- stage: Android + displayName: 'Android' + dependsOn: [] + jobs: + - job: Windows_Android_Mobile + strategy: + maxParallel: 3 + matrix: + Android_Store: + ApplicationPlatform: AnyCPU + ArtifactName: Android + BuildForPlayStore: True + VersionCodeOffset: 1 + + pool: + vmImage: windows-2022 + + variables: + - group: 'UADO Keystore' # Import all variables for the signing from the library in azure devops + + steps: + - template: build/stage-build-android-mobile.yml + + +- stage: Windows + displayName: 'Windows' + dependsOn: [] + jobs: + - job: Windows_WinAppSDK + pool: + vmImage: windows-2022 + + variables: + - group: 'UADO Keystore' # Import all variables for the Android signing from the library in azure devops + - group: 'Uno Platform authenticode signing' # Import all variables for the signing from the library in azure devops + - name: ApplicationPlatform + value: x86 # switch back to x64 once CommunityToolkit.WinUI.UI supports x64 (https://github.com/CommunityToolkit/Lottie-Windows/issues/515#issuecomment-1662305826) + - name: BuildTargetFramework + value: net9.0-windows10.0.19041 + - name: ArtifactName + value: Windows + - name: VersionCodeOffset + value: 50 + - name: PackageOutputPath + value: $(Build.ArtifactStagingDirectory) + + steps: + - template: build/stage-build-windows.yml + +- stage: Skia_Desktop + displayName: 'Skia Desktop' + dependsOn: [] + jobs: + - job: Windows_Desktop + pool: + vmImage: windows-2022 + + variables: + - group: 'UADO Keystore' # Import all variables for the signing from the library in azure devops + + steps: + - template: build/stage-build-skia-desktop.yml + +- stage: Apple + displayName: 'Apple' + dependsOn: [] + jobs: + - job: macOS_netcore + timeoutInMinutes: 90 + strategy: + maxParallel: 2 + matrix: + iOS: + BuildTargetFramework: net9.0-ios + ArtifactName: iOS-mobile + ApplicationBuildNumberOffset: 50 + BuildCommand: publish + Catalyst: + BuildTargetFramework: net9.0-maccatalyst + ArtifactName: Catalyst + ApplicationBuildNumberOffset: 50 + BuildCommand: build + pool: + vmImage: macos-14 + + variables: + - name: SkipUnknownFrameworks + value: true # Used by TargetFrameworks.Filtering package + - group: unoplatform.apple.ios.appstore.distribution + + steps: + - task: InstallAppleCertificate@2 + displayName: Install Certificate + inputs: + certSecureFile: UnoPlatform-Apple-Distribution.p12 + certPwd: $(appleappstorecertificatepassword) + keychain: temp + # disabled because of azure devops failing to uninstall as of 2022-11-16 + # deleteCert: true + + - task: InstallAppleCertificate@2 + displayName: Install Certificate + inputs: + certSecureFile: UnoPlatform-MacInstaller.p12 + certPwd: $(appleappstorecertificatepassword) + keychain: temp + # disabled because of azure devops failing to uninstall as of 2022-11-16 + # deleteCert: true + + - task: InstallAppleProvisioningProfile@1 + displayName: 'Install Apple Provisioning Profile' + inputs: + provisioningProfileLocation: 'secureFiles' + provProfileSecureFile: Uno_Gallery_Catalyst.provisionprofile + + - task: InstallAppleProvisioningProfile@1 + displayName: 'Install Apple Provisioning Profile' + inputs: + provisioningProfileLocation: 'secureFiles' + provProfileSecureFile: Uno_Gallery_Canary_Catalyst.provisionprofile + + - task: InstallAppleProvisioningProfile@1 + displayName: 'Install Apple Provisioning Profile' + inputs: + provisioningProfileLocation: 'secureFiles' + provProfileSecureFile: Uno_Gallery_iOS.mobileprovision + + - task: InstallAppleProvisioningProfile@1 + displayName: 'Install Apple Provisioning Profile' + inputs: + provisioningProfileLocation: 'secureFiles' + provProfileSecureFile: Uno_Gallery_Canary_iOS.mobileprovision + + - template: build/templates/xcode-select.yml + parameters: + xCodeRoot: $(XCODE_ROOT) + + - template: build/stage-build-mobile.yml + +- stage: WebAssembly + displayName: 'WebAssembly' + dependsOn: [] + jobs: + - job: Linux + timeoutInMinutes: 60 + pool: + vmImage: ubuntu-latest + + container: unoplatform/wasm-build:3.0 + + variables: + ArtifactName: WASM + SkipUnknownFrameworks: true + + steps: + - template: build/stage-build-wasm.yml + +- stage: WebAssembly_Tests + displayName: 'WebAssembly Tests' + dependsOn: [] + jobs: + - template: build/stage-uitests-wasm.yml + +- stage: iOS_Tests + displayName: 'iOS Tests' + dependsOn: [] + jobs: + - template: build/stage-uitests-ios.yml + +- stage: Android_Tests + displayName: 'Android Tests' + dependsOn: [] + jobs: + - template: build/stage-uitests-android.yml diff --git a/build/scripts/android-uitest-build.sh b/build/scripts/android-uitest-build.sh new file mode 100644 index 000000000..3491aea79 --- /dev/null +++ b/build/scripts/android-uitest-build.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' + +# echo commands +set -x + +export UNO_UITEST_ANDROID_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery +export UNO_EMULATOR_INSTALLED=$BUILD_SOURCESDIRECTORY/build/.emulator_started + +# Override Android SDK tooling +export ANDROID_HOME=$BUILD_SOURCESDIRECTORY/build/android-sdk +export ANDROID_SDK_ROOT=$BUILD_SOURCESDIRECTORY/build/android-sdk +export CMDLINETOOLS=commandlinetools-mac-8512546_latest.zip +mkdir -p $ANDROID_HOME +wget https://dl.google.com/android/repository/$CMDLINETOOLS +unzip $CMDLINETOOLS -d $ANDROID_HOME/cmdline-tools +rm $CMDLINETOOLS +mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/latest + +if [[ -f $ANDROID_HOME/platform-tools/platform-tools/adb ]] +then + # It appears that the platform-tools 29.0.6 are extracting into an incorrect path + mv $ANDROID_HOME/platform-tools/platform-tools/* $ANDROID_HOME/platform-tools +fi + +# Install Android SDK emulators and SDKs +if [ ! -f "$UNO_EMULATOR_INSTALLED" ]; +then + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'tools'| tr '\r' '\n' | uniq + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platform-tools' | tr '\r' '\n' | uniq + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'build-tools;35.0.0' | tr '\r' '\n' | uniq + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platforms;android-28' | tr '\r' '\n' | uniq + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platforms;android-34' | tr '\r' '\n' | uniq + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'extras;android;m2repository' | tr '\r' '\n' | uniq +fi + +# Build the sample, while the emulator is starting +cd $UNO_UITEST_ANDROID_PROJECT +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=false -bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/android-app.binlog diff --git a/build/scripts/android-uitest-run.sh b/build/scripts/android-uitest-run.sh index 2f80c3dfd..db6388f73 100644 --- a/build/scripts/android-uitest-run.sh +++ b/build/scripts/android-uitest-run.sh @@ -7,7 +7,6 @@ set -x export UNO_UITEST_SCREENSHOT_PATH=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/android export UNO_UITEST_PLATFORM=Android -export UNO_UITEST_ANDROIDAPK_PATH=$BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net8.0-android/android-x64/com.nventive.uno.ui.demo-Signed.apk export UNO_UITEST_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery.UITests export UNO_UITEST_ANDROID_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/Uno.Gallery.UITests/bin/Release/net47/Uno.Gallery.UITests.dll @@ -35,7 +34,7 @@ if [ ! -f "$UNO_EMULATOR_INSTALLED" ]; then echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'tools'| tr '\r' '\n' | uniq echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platform-tools' | tr '\r' '\n' | uniq - echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'build-tools;34.0.0' | tr '\r' '\n' | uniq + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'build-tools;35.0.0' | tr '\r' '\n' | uniq echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platforms;android-28' | tr '\r' '\n' | uniq echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'platforms;android-34' | tr '\r' '\n' | uniq echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install 'extras;android;m2repository' | tr '\r' '\n' | uniq @@ -56,10 +55,6 @@ then touch "$UNO_EMULATOR_INSTALLED" fi -# Build the sample, while the emulator is starting -cd $UNO_UITEST_ANDROID_PROJECT -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=false -bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/android-app.binlog - mkdir -p $UNO_UITEST_SCREENSHOT_PATH cp $UNO_UITEST_ANDROIDAPK_PATH $UNO_UITEST_SCREENSHOT_PATH diff --git a/build/scripts/ios-uitest-build.sh b/build/scripts/ios-uitest-build.sh new file mode 100644 index 000000000..6090d149d --- /dev/null +++ b/build/scripts/ios-uitest-build.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +export UNO_UITEST_IOS_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery + +cd $UNO_UITEST_IOS_PROJECT +dotnet build -p:TargetFrameworkOverride=net9.0-ios -r iossimulator-x64 -c Release -p:IsUiAutomationMappingEnabled=True -bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/ios-app.binlog diff --git a/build/scripts/ios-uitest-run.sh b/build/scripts/ios-uitest-run.sh index 84fc6fec2..ca4b1fb6c 100644 --- a/build/scripts/ios-uitest-run.sh +++ b/build/scripts/ios-uitest-run.sh @@ -3,34 +3,28 @@ set -euo pipefail IFS=$'\n\t' export UNO_UITEST_PLATFORM=iOS -export UNO_UITEST_IOSBUNDLE_PATH=$BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net8.0-ios/iossimulator-x64/Uno.Gallery.app export UNO_UITEST_SCREENSHOT_PATH=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/ios export UNO_UITEST_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery.UITests export UNO_UITEST_LOGFILE=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/ios/nunit-log.txt export UNO_UITEST_IOS_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery export UITEST_TEST_TIMEOUT=60m -export UNO_UITEST_SIMULATOR_VERSION="com.apple.CoreSimulator.SimRuntime.iOS-16-1" +export UNO_UITEST_SIMULATOR_VERSION="com.apple.CoreSimulator.SimRuntime.iOS-17-5" export UNO_UITEST_SIMULATOR_NAME="iPad Pro (12.9-inch) (6th generation)" echo "Lising iOS simulators" xcrun simctl list devices --json +echo "Starting simulator" /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator & # Prime the output directory mkdir -p $UNO_UITEST_SCREENSHOT_PATH/_logs -cd $UNO_UITEST_IOS_PROJECT -dotnet build -p:TargetFrameworkOverride=net8.0-ios -r iossimulator-x64 -c Release -p:IsUiAutomationMappingEnabled=True -bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/ios-app.binlog - ## ## Pre-install the application to avoid https://github.com/microsoft/appcenter/issues/2389 ## -## Install iOS 16.1 simulators -xcodes runtimes install --keep-archive 'iOS 16.1' || true - # Wait while ios runtime 16.1 is not having simulators. The install process may # take a few seconds and "simctl list devices" may not return devices. while true; do @@ -65,15 +59,18 @@ else echo "Using idb from:" `command -v idb` fi +echo "Booting the simulator" xcrun simctl boot "$UITEST_IOSDEVICE_ID" || true +echo "Installing the app" idb install --udid "$UITEST_IOSDEVICE_ID" "$UNO_UITEST_IOSBUNDLE_PATH" - # Run the tests cd $UNO_UITEST_PROJECT +echo "Running tests" + dotnet test \ -c Release \ -l:"console;verbosity=normal" \ diff --git a/build/scripts/local-ios-uitest-run.sh b/build/scripts/local-ios-uitest-run.sh index a5a08fb8f..d0ed787ac 100644 --- a/build/scripts/local-ios-uitest-run.sh +++ b/build/scripts/local-ios-uitest-run.sh @@ -1,5 +1,7 @@ #!/bin/bash export BUILD_SOURCESDIRECTORY=`pwd`/../.. export BUILD_ARTIFACTSTAGINGDIRECTORY=/tmp/uno-uitests-results +export UNO_UITEST_IOSBUNDLE_PATH=$BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net9.0-ios/iossimulator-x64/Uno.Gallery.app +./ios-uitest-build.sh ./ios-uitest-run.sh diff --git a/build/scripts/wasm-uitest-build.sh b/build/scripts/wasm-uitest-build.sh new file mode 100644 index 000000000..bad9fd8ec --- /dev/null +++ b/build/scripts/wasm-uitest-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +export UNO_UITEST_SCREENSHOT_PATH=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/wasm +export UNO_UITEST_WASM_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery/Uno.Gallery.csproj + +cd $BUILD_SOURCESDIRECTORY + +dotnet publish -f net9.0-browserwasm -p:Configuration=Release $UNO_UITEST_WASM_PROJECT -p:IsUiAutomationMappingEnabled=True -bl:$UNO_UITEST_SCREENSHOT_PATH/msbuild.binlog diff --git a/build/scripts/wasm-uitest-run.sh b/build/scripts/wasm-uitest-run.sh index c25623acb..232869456 100644 --- a/build/scripts/wasm-uitest-run.sh +++ b/build/scripts/wasm-uitest-run.sh @@ -4,25 +4,20 @@ IFS=$'\n\t' export UNO_UITEST_TARGETURI=http://localhost:5000 export UNO_UITEST_DRIVERPATH_CHROME=$BUILD_SOURCESDIRECTORY/build/node_modules/chromedriver/lib/chromedriver -export UNO_UITEST_CHROME_BINARY_PATH=$BUILD_SOURCESDIRECTORY/build/node_modules/puppeteer/.local-chromium/linux-991974/chrome-linux/chrome +export UNO_UITEST_CHROME_BINARY_PATH=~/.cache/puppeteer/chrome/linux-127.0.6533.72/chrome-linux64/chrome export UNO_UITEST_SCREENSHOT_PATH=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/wasm export UNO_UITEST_PLATFORM=Browser # export UNO_UITEST_CHROME_CONTAINER_MODE=true export UNO_UITEST_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery.UITests export UNO_UITEST_LOGFILE=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/wasm/nunit-log.txt export UNO_UITEST_WASM_PROJECT=$BUILD_SOURCESDIRECTORY/Uno.Gallery/Uno.Gallery.csproj -export UNO_UITEST_WASM_OUTPUT_PATH=$BUILD_SOURCESDIRECTORY/Uno.Gallery/bin/Release/net8.0-browserwasm/dist/ export UITEST_TEST_TIMEOUT=60m -cd $BUILD_SOURCESDIRECTORY - -dotnet build /r /p:Configuration=Release $UNO_UITEST_WASM_PROJECT -p:TargetFrameworkOverride=net8.0-browserwasm /p:IsUiAutomationMappingEnabled=True /bl:$UNO_UITEST_SCREENSHOT_PATH/msbuild.binlog - cd $BUILD_SOURCESDIRECTORY/build mkdir -p tools -npm i chromedriver@102.0.0 -npm i puppeteer@14.1.0 +npm i chromedriver@127.0.0 +npm i puppeteer@22.14.0 # install dotnet serve / Remove as needed dotnet tool uninstall dotnet-serve -g || true @@ -34,11 +29,6 @@ mkdir -p $UNO_UITEST_SCREENSHOT_PATH # Start the server dotnet-serve -p 5000 -d "$UNO_UITEST_WASM_OUTPUT_PATH" & -#dotnet run --project $UNO_UITEST_WASM_PROJECT -c Release --no-build & - - - - cd $UNO_UITEST_PROJECT diff --git a/build/stage-build-android-mobile.yml b/build/stage-build-android-mobile.yml index cc45550d5..2bd936751 100644 --- a/build/stage-build-android-mobile.yml +++ b/build/stage-build-android-mobile.yml @@ -1,5 +1,8 @@ steps: - template: templates/dotnet-install-windows.yml + parameters: + UnoCheckParameters: '--tfm net9.0-android' + - template: templates/canary-updater.yml - task: DownloadSecureFile@1 @@ -12,13 +15,13 @@ steps: - script: | cd $(build.sourcesdirectory)/Uno.Gallery - dotnet publish -f:net8.0-android -c:Release "/p:InformationalVersion=$(GitVersion.InformationalVersion)" /p:AndroidSigningKeyStore=$(keyStore.secureFilePath) /p:AndroidSigningStorePass=$(AndroidSigningStorePass) /p:AndroidSigningKeyPass=$(AndroidSigningKeyPass) /p:AndroidSigningKeyAlias=$(AndroidSigningKeyAlias) /p:AndroidKeyStore=true /bl:$(build.artifactstagingdirectory)/build-$(BuildForPlayStore).binlog + dotnet publish -f:net9.0-android -p:TargetFrameworkOverride=net9.0-android -c:Release "/p:InformationalVersion=$(GitVersion.InformationalVersion)" /p:AndroidSigningKeyStore=$(keyStore.secureFilePath) /p:AndroidSigningStorePass=$(AndroidSigningStorePass) /p:AndroidSigningKeyPass=$(AndroidSigningKeyPass) /p:AndroidSigningKeyAlias=$(AndroidSigningKeyAlias) /p:AndroidKeyStore=true /bl:$(build.artifactstagingdirectory)/build-$(BuildForPlayStore).binlog displayName: 'Build Android Package' condition: eq(variables['System.PullRequest.IsFork'],'False') - script: | cd $(build.sourcesdirectory)/Uno.Gallery - dotnet publish -f:net8.0-android -c:Release "/p:InformationalVersion=$(GitVersion.InformationalVersion)" /p:AndroidKeyStore=False /bl:$(build.artifactstagingdirectory)/build-$(BuildForPlayStore).binlog + dotnet publish -f:net9.0-android -p:TargetFrameworkOverride=net9.0-android -c:Release "/p:InformationalVersion=$(GitVersion.InformationalVersion)" /p:AndroidKeyStore=False /bl:$(build.artifactstagingdirectory)/build-$(BuildForPlayStore).binlog displayName: 'Build Android Package (Fork)' condition: eq(variables['System.PullRequest.IsFork'],'True') @@ -26,7 +29,7 @@ steps: displayName: 'Publish Android netcore Binaries' retryCountOnTaskFailure: 3 inputs: - SourceFolder: $(build.sourcesdirectory)/Uno.Gallery/bin/Release/net8.0-android + SourceFolder: $(build.sourcesdirectory)/Uno.Gallery/bin/Release/net9.0-android Contents: | **/*.aab **/*.apk diff --git a/build/stage-build-mobile.yml b/build/stage-build-mobile.yml index 7797251c6..76b93a3ea 100644 --- a/build/stage-build-mobile.yml +++ b/build/stage-build-mobile.yml @@ -1,6 +1,12 @@ steps: - template: templates/dotnet-install-mac.yml + parameters: + UnoCheckParameters: '--tfm net9.0-ios --tfm net9.0-maccatalyst' + - template: templates/dotnet-install-windows.yml + parameters: + UnoCheckParameters: '--tfm net9.0-ios --tfm net9.0-maccatalyst' + - template: templates/canary-updater.yml - task: DownloadSecureFile@1 @@ -21,14 +27,14 @@ steps: - bash: | cd $(build.sourcesdirectory)/Uno.Gallery echo "BUILD_SOURCEBRANCH: $BUILD_SOURCEBRANCH" - dotnet $(BuildCommand) -f $(BuildTargetFramework) -c Release /p:ArchiveOnBuild=true /bl:$(build.artifactstagingdirectory)/build-$(BuildTargetFramework).binlog "/p:InformationalVersion=$(GitVersion.InformationalVersion)" + dotnet $(BuildCommand) -v:n -f $(BuildTargetFramework) -p:TargetFrameworkOverride=$(BuildTargetFramework) -c Release /p:ArchiveOnBuild=true /bl:$(build.artifactstagingdirectory)/build-$(BuildTargetFramework).binlog "/p:InformationalVersion=$(GitVersion.InformationalVersion)" displayName: Build project for Release - $(BuildTargetFramework) condition: eq(variables['System.PullRequest.IsFork'],'False') - bash: | cd $(build.sourcesdirectory)/Uno.Gallery echo "BUILD_SOURCEBRANCH: $BUILD_SOURCEBRANCH" - dotnet build -f $(BuildTargetFramework) -c Release /bl:$(build.artifactstagingdirectory)/build-$(BuildTargetFramework).binlog "/p:InformationalVersion=$(GitVersion.InformationalVersion)" + dotnet build -f $(BuildTargetFramework) -p:TargetFrameworkOverride=$(BuildTargetFramework) -c Release /bl:$(build.artifactstagingdirectory)/build-$(BuildTargetFramework).binlog "/p:InformationalVersion=$(GitVersion.InformationalVersion)" displayName: Build project for Release - $(BuildTargetFramework) condition: eq(variables['System.PullRequest.IsFork'],'True') diff --git a/build/stage-build-skia-desktop.yml b/build/stage-build-skia-desktop.yml index 9dae36f94..5b495cf7a 100644 --- a/build/stage-build-skia-desktop.yml +++ b/build/stage-build-skia-desktop.yml @@ -1,15 +1,16 @@ steps: - template: templates/gitversion.yml +- template: templates/dotnet-install-windows.yml - template: templates/canary-updater.yml - bash: | - dotnet build Uno.Gallery/Uno.Gallery.csproj -p:TargetFrameworkOverride=net8.0-desktop -c Release -p:InformationalVersion=$(GitVersion.InformationalVersion) -bl:$(build.artifactstagingdirectory)/build.binlog + dotnet build Uno.Gallery/Uno.Gallery.csproj -p:TargetFrameworkOverride=net9.0-desktop -c Release -p:InformationalVersion=$(GitVersion.InformationalVersion) -bl:$(build.artifactstagingdirectory)/build.binlog - task: CopyFiles@2 displayName: Copy Skia output inputs: - SourceFolder: Uno.Gallery/bin/Release/net8.0-desktop + SourceFolder: Uno.Gallery/bin/Release/net9.0-desktop Contents: '**/*.*' TargetFolder: $(Build.ArtifactStagingDirectory)/bin diff --git a/build/stage-build-wasm.yml b/build/stage-build-wasm.yml index 8aeda6bac..213bbff03 100644 --- a/build/stage-build-wasm.yml +++ b/build/stage-build-wasm.yml @@ -7,21 +7,19 @@ - template: templates/gitversion.yml -- task: UseDotNet@2 - retryCountOnTaskFailure: 3 - inputs: - packageType: sdk - version: 8.0.100 +- template: templates/dotnet-install-linux.yml + parameters: + UnoCheckParameters: '--tfm net9.0-browserwasm' - template: templates/canary-updater.yml - bash: | - dotnet build Uno.Gallery/Uno.Gallery.csproj -c Release -p:TargetFrameworkOverride=net8.0-browserwasm -p:InformationalVersion=$(GitVersion.InformationalVersion) -bl:$(Build.ArtifactStagingDirectory)/wasm.binlog + dotnet publish Uno.Gallery/Uno.Gallery.csproj -c Release -f net9.0-browserwasm -p:InformationalVersion=$(GitVersion.InformationalVersion) -bl:$(Build.ArtifactStagingDirectory)/wasm.binlog - task: CopyFiles@2 displayName: Copy Wasm output inputs: - SourceFolder: Uno.Gallery/bin/Release/net8.0-browserwasm/dist + SourceFolder: Uno.Gallery/bin/Release/net9.0-browserwasm/publish/wwwroot Contents: '**/*.*' TargetFolder: $(Build.ArtifactStagingDirectory) diff --git a/build/stage-build-windows.yml b/build/stage-build-windows.yml index 23a2f8b3d..6fe0b3052 100644 --- a/build/stage-build-windows.yml +++ b/build/stage-build-windows.yml @@ -14,11 +14,12 @@ steps: displayName: 'Use .NET' inputs: packageType: 'sdk' - version: '8.0.100' + version: '9.0.100-rc.2.24474.11' + includePreviewVersions: true - script: | cd $(build.sourcesdirectory)/Uno.Gallery - dotnet publish -c Release -f net8.0-windows10.0.19041 -p:TargetFrameworkOverride=net8.0-windows10.0.19041 /p:Platform=$(ApplicationPlatform) /p:AppxPackageDir="Packages/" /p:AppxBundle=Never /p:UapAppxPackageBuildMode=SideloadOnly /p:GenerateAppxPackageOnBuild=true /bl:$(build.artifactstagingdirectory)/build.binlog "/p:InformationalVersion=$(GitVersion.InformationalVersion)" + dotnet publish -c Release -f net9.0-windows10.0.19041 -p:TargetFrameworkOverride=net9.0-windows10.0.19041 /p:Platform=$(ApplicationPlatform) /p:AppxPackageDir="Packages/" /p:AppxBundle=Never /p:UapAppxPackageBuildMode=SideloadOnly /p:GenerateAppxPackageOnBuild=true /bl:$(build.artifactstagingdirectory)/build.binlog "/p:InformationalVersion=$(GitVersion.InformationalVersion)" displayName: Build project for Release - task: CopyFiles@2 diff --git a/build/stage-uitests-android.yml b/build/stage-uitests-android.yml index 491d196a9..e9eebb928 100644 --- a/build/stage-uitests-android.yml +++ b/build/stage-uitests-android.yml @@ -1,6 +1,42 @@ jobs: +- job: Android_Tests_Build + displayName: 'Android UI Tests' + timeoutInMinutes: 60 + variables: + CI_Build: true + SourceLinkEnabled: false + + pool: + vmImage: 'macos-14' + + steps: + - checkout: self + clean: true + + - template: templates/dotnet-install-mac.yml + - template: templates/canary-updater.yml + + - bash: | + chmod +x $(build.sourcesdirectory)/build/scripts/android-uitest-build.sh + $(build.sourcesdirectory)/build/scripts/android-uitest-build.sh + displayName: Build Android Tests + env: + BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)" + BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)" + + - task: CopyFiles@2 + displayName: Copy Build Output + inputs: + SourceFolder: $(build.sourcesdirectory)/Uno.Gallery/bin/Release/net8.0-android/android-x64 + Contents: '**/*.apk' + TargetFolder: $(Build.ArtifactStagingDirectory) + + - publish: $(Build.ArtifactStagingDirectory) + artifact: Android_UITest + - job: Android_Tests displayName: 'Android UI Tests' + dependsOn: Android_Tests_Build timeoutInMinutes: 60 variables: CI_Build: true @@ -13,13 +49,20 @@ - checkout: self clean: true + - download: current + artifact: Android_UITest + - template: templates/dotnet-install-mac.yml + parameters: + UnoCheckParameters: '--tfm net9.0-android' + - template: templates/canary-updater.yml - bash: | + export UNO_UITEST_ANDROIDAPK_PATH=$(Pipeline.Workspace)/Android_UITest/com.nventive.uno.ui.demo-Signed.apk chmod +x $(build.sourcesdirectory)/build/scripts/android-uitest-run.sh $(build.sourcesdirectory)/build/scripts/android-uitest-run.sh - displayName: Build and Run Android Tests + displayName: Run Android Tests env: BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)" BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)" diff --git a/build/stage-uitests-ios.yml b/build/stage-uitests-ios.yml index 7395ebacd..82089da45 100644 --- a/build/stage-uitests-ios.yml +++ b/build/stage-uitests-ios.yml @@ -1,18 +1,20 @@ jobs: -- job: iOS_Tests - displayName: 'iOS UI Tests' +- job: iOS_Tests_Build + displayName: 'Build iOS UI Tests' variables: CI_Build: true SourceLinkEnabled: false pool: - vmImage: 'macos-14' + vmImage: 'macos-15' steps: - checkout: self clean: true - template: templates/dotnet-install-mac.yml + parameters: + UnoCheckParameters: '--tfm net9.0-ios' - template: templates/xcode-select.yml parameters: @@ -21,9 +23,57 @@ - template: templates/canary-updater.yml - bash: | + chmod +x $(build.sourcesdirectory)/build/scripts/ios-uitest-build.sh + $(build.sourcesdirectory)/build/scripts/ios-uitest-build.sh + displayName: Build iOS Test + env: + BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)" + BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)" + + - task: CopyFiles@2 + displayName: Copy Build Output + inputs: + SourceFolder: $(build.sourcesdirectory)/Uno.Gallery/bin/Release/net9.0-ios/iossimulator-x64/Uno.Gallery.app + Contents: '**' + TargetFolder: $(Build.ArtifactStagingDirectory)/Uno.Gallery.app + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Build.ArtifactStagingDirectory)' + artifact: iOS_UITest + parallel: true + +- job: iOS_Tests + dependsOn: iOS_Tests_Build + displayName: 'Run iOS UI Tests' + variables: + CI_Build: true + SourceLinkEnabled: false + + pool: + # Keep an older version to avoid https://github.com/actions/runner-images/issues/10925 + vmImage: 'macos-14' + + steps: + - checkout: self + clean: true + + - template: templates/xcode-select.yml + parameters: + xCodeRoot: $(XCODE_ROOT_UITESTS) + + - download: current + artifact: iOS_UITest + + - template: templates/dotnet-install-mac.yml + parameters: + installWorkloads: false + + - bash: | + export UNO_UITEST_IOSBUNDLE_PATH=$(Pipeline.Workspace)/iOS_UITest/Uno.Gallery.app chmod +x $(build.sourcesdirectory)/build/scripts/ios-uitest-run.sh $(build.sourcesdirectory)/build/scripts/ios-uitest-run.sh - displayName: Build and Run iOS Test + displayName: Run iOS Test env: BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)" BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)" @@ -45,11 +95,3 @@ PathtoPublish: $(build.artifactstagingdirectory) ArtifactName: uno-uitest-tests ArtifactType: Container - - - task: PublishBuildArtifacts@1 - condition: always() - retryCountOnTaskFailure: 3 - inputs: - PathtoPublish: $(build.sourcesdirectory)/Uno.Gallery/bin/Release/net8.0-ios/iossimulator-x64/Uno.Gallery.app - ArtifactName: uno-uitest-ios-bin - ArtifactType: Container diff --git a/build/stage-uitests-wasm.yml b/build/stage-uitests-wasm.yml index ca7946519..579300049 100644 --- a/build/stage-uitests-wasm.yml +++ b/build/stage-uitests-wasm.yml @@ -1,8 +1,7 @@ jobs: -- job: Wasm_UITests +- job: Wasm_UITests_Build + displayName: 'Build WebAssembly UI Tests' timeoutInMinutes: 90 - displayName: 'WebAssembly UI Tests' - container: unoplatform/wasm-build:3.0 pool: vmImage: 'ubuntu-latest' @@ -14,29 +13,56 @@ - checkout: self clean: true - - task: UseDotNet@2 - displayName: 'Use .NET SDK' - retryCountOnTaskFailure: 3 - inputs: - packageType: sdk - version: 8.0.100 + - template: templates/dotnet-install-linux.yml + parameters: + UnoCheckParameters: '--tfm net9.0-browserwasm' - template: templates/canary-updater.yml - bash: | - chmod +x build/scripts/wasm-uitest-run.sh - build/scripts/wasm-uitest-run.sh + chmod +x build/scripts/wasm-uitest-build.sh + build/scripts/wasm-uitest-build.sh env: BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)" BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)" displayName: 'Running build' - - task: CopyFiles@2 - displayName: Copy Wasm output + - publish: $(System.DefaultWorkingDirectory)/Uno.Gallery/bin/Release/net9.0-browserwasm/publish/wwwroot + artifact: Wasm_UITest + +- job: Wasm_UITests + timeoutInMinutes: 90 + dependsOn: Wasm_UITests_Build + displayName: 'Run WebAssembly UI Tests' + + pool: + vmImage: 'ubuntu-latest' + + steps: + - checkout: self + clean: true + + - task: NodeTool@0 inputs: - SourceFolder: Uno.Gallery/bin/Release/net8.0-browserwasm/dist - Contents: '**/*.*' - TargetFolder: $(Build.ArtifactStagingDirectory)/bin + versionSource: 'spec' + versionSpec: '20.x' + + - download: current + artifact: Wasm_UITest + + - template: templates/dotnet-install-linux.yml + parameters: + installJava: false + installWorkloads: false + + - bash: | + export UNO_UITEST_WASM_OUTPUT_PATH=$(Pipeline.Workspace)/Wasm_UITest + chmod +x build/scripts/wasm-uitest-run.sh + build/scripts/wasm-uitest-run.sh + env: + BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)" + BUILD_ARTIFACTSTAGINGDIRECTORY: "$(build.artifactstagingdirectory)" + displayName: 'Running tests' - task: PublishTestResults@2 condition: always() @@ -49,8 +75,8 @@ failTaskOnMissingResultsFile: true - task: PublishBuildArtifacts@1 - retryCountOnTaskFailure: 3 condition: always() + retryCountOnTaskFailure: 3 inputs: PathtoPublish: $(build.artifactstagingdirectory) ArtifactName: uno-uitest-tests diff --git a/build/templates/dotnet-install-linux.yml b/build/templates/dotnet-install-linux.yml new file mode 100644 index 000000000..abb300b2c --- /dev/null +++ b/build/templates/dotnet-install-linux.yml @@ -0,0 +1,33 @@ +parameters: + DotNetVersion: '9.0.100-rc.2.24474.11' + UnoCheck_Version: '1.27.0-dev.4' + installJava: true + installWorkloads: true + UnoCheckParameters: '' + +steps: + - task: UseDotNet@2 + displayName: 'Use .NET Core SDK ${{ parameters.DotNetVersion }}' + retryCountOnTaskFailure: 3 + inputs: + packageType: sdk + version: ${{ parameters.DotNetVersion }} + includePreviewVersions: true + + - bash: | + ubuntu_release=`lsb_release -rs` + wget https://packages.microsoft.com/config/ubuntu/${ubuntu_release}/packages-microsoft-prod.deb -O packages-microsoft-prod.deb + sudo dpkg -i packages-microsoft-prod.deb + sudo apt-get install apt-transport-https + sudo apt-get update + sudo apt-get install -y msopenjdk-11 + sudo update-java-alternatives --set msopenjdk-11-amd64 + displayName: Install OpenJDK 11 + retryCountOnTaskFailure: 3 + condition: eq('${{ parameters.installJava }}', 'true') + + - bash: | + dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json + uno-check --verbose --ci --non-interactive --fix --skip gtk3 --skip androidsdk --pre-major ${{ parameters.UnoCheckParameters }} + displayName: Install .NET Workloads + condition: and( eq(variables['Agent.OS'], 'Linux'), eq('${{ parameters.installWorkloads }}', 'true') ) diff --git a/build/templates/dotnet-install-mac.yml b/build/templates/dotnet-install-mac.yml index dbff93a0f..e1e128d99 100644 --- a/build/templates/dotnet-install-mac.yml +++ b/build/templates/dotnet-install-mac.yml @@ -1,6 +1,9 @@ parameters: - DotNetVersion: '8.0.301' - UnoCheck_Version: '1.23.0' + DotNetVersion: '9.0.100-rc.2.24474.11' + UnoCheck_Version: '1.27.0-dev.4' + installWorkloads: true + UnoCheckParameters: '' + steps: # Required until .NET 6 installs properly using UseDotnet # using preview builds @@ -26,6 +29,6 @@ steps: - bash: | dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json - uno-check --ci --non-interactive --fix --skip androidsdk --skip gtk3 --skip xcode --skip vswin --skip vsmac + uno-check --ci --non-interactive --fix --skip gtk3 --skip xcode --skip vswin --skip androidemulator --skip vsmac --pre-major ${{ parameters.UnoCheckParameters }} displayName: Install .NET Workloads - condition: eq(variables['Agent.OS'], 'Darwin') + condition: and( eq(variables['Agent.OS'], 'Darwin'), eq('${{ parameters.installWorkloads }}', 'true') ) diff --git a/build/templates/dotnet-install-windows.yml b/build/templates/dotnet-install-windows.yml index c5b94a8e1..b791162da 100644 --- a/build/templates/dotnet-install-windows.yml +++ b/build/templates/dotnet-install-windows.yml @@ -1,6 +1,8 @@ parameters: - DotNetVersion: '8.0.301' - UnoCheck_Version: '1.23.0' + DotNetVersion: '9.0.100-rc.2.24474.11' + UnoCheck_Version: '1.27.0-dev.4' + UnoCheckParameters: '' + steps: # Required until .NET 6 installs properly on Windows using UseDotnet @@ -24,7 +26,7 @@ steps: - powershell: | & dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json - & uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip androidemulator --skip androidsdk --skip vsmac + & uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip androidemulator --skip androidsdk --skip vsmac --pre-major ${{ parameters.UnoCheckParameters }} displayName: Install .NET Workloads errorActionPreference: continue ignoreLASTEXITCODE: true diff --git a/global.json b/global.json index 4f3f68429..1eee6682e 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { - "sdk": { - "allowPrerelease": false - }, - // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information. - "msbuild-sdks": { - "Uno.Sdk": "5.3.96" - } + "sdk": { + "allowPrerelease": true + }, + // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information. + "msbuild-sdks": { + "Uno.Sdk": "5.6.0-dev.130" + } }