Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 30 additions & 9 deletions docs/DevelopmentTips.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To build and run Blazor Desktop samples, check out the [Blazor Desktop](https://

### Compile using a local `.dotnet\dotnet` via `build.*` scripts on the root folder

This method uses the arcade build infraestructure. For more information you can look [here](https://github.com/dotnet/arcade/blob/main/Documentation/ArcadeSdk.md#build-scripts-and-extensibility-points)
This method uses the Arcade build infrastructure. For more information, you can look [here](https://github.com/dotnet/arcade/blob/main/Documentation/ArcadeSdk.md#build-scripts-and-extensibility-points)

```
./build.sh -restore -pack
Expand Down Expand Up @@ -216,15 +216,17 @@ Check available queues at [helix.dot.net](https://helix.dot.net). The current co

### Running Device Tests Locally

#### Step 1: Build Build Tasks
The following commands assume you are on the root of the maui repository.

#### Step 1: Build MSBuild Tasks
First, restore tools and build the required MSBuild tasks:

```bash
# Restore dotnet tools
dotnet tool restore

# Build the Build tasks (required)
./build.sh -restore -build -configuration Release -projects './Microsoft.Maui.BuildTasks.slnf' /bl:BuildBuildTasks.binlog -warnAsError false
# Build the MSBuild tasks (required)
./build.sh -restore -build -configuration Release -projects $(PWD)/Microsoft.Maui.BuildTasks.slnf /bl:BuildBuildTasks.binlog -warnAsError false
```

#### Step 2: Build Device Tests
Expand All @@ -238,23 +240,42 @@ Build the device test projects:
#### Step 3: Send to Helix
Submit the tests to Helix for execution:

We need to set some variables. More info about Helix can be found [here](https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Helix/Sdk/Readme.md)


```bash
export BUILD_REASON=pr
export BUILD_REPOSITORY_NAME=maui
export BUILD_SOURCEBRANCH=main
export SYSTEM_TEAMPROJECT=dnceng
export SYSTEM_ACCESSTOKEN=''
```

```bash
# Send to Helix for Android
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=android /bl:sendhelix.binlog -verbosity:diag
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=android /bl:sendhelix_android.binlog -verbosity:diag

# Send to Helix for iOS
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=ios /bl:sendhelix.binlog -verbosity:diag
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=ios /bl:sendhelix_ios.binlog -verbosity:diag

# Send to Helix for Mac Catalyst
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=maccatalyst /bl:sendhelix.binlog -verbosity:diag
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=maccatalyst /bl:sendhelix_catalyst.binlog -verbosity:diag
```

### Windows Commands

For Windows development, use the corresponding `.cmd` files:

```cmd
REM Build Build tasks
set BUILD_REASON=pr
set BUILD_REPOSITORY_NAME=maui
set BUILD_SOURCEBRANCH=main
set SYSTEM_TEAMPROJECT=dnceng
set SYSTEM_ACCESSTOKEN=
```

```cmd
REM Build MSBuild tasks
.\build.cmd -restore -build -configuration Release -projects ".\Microsoft.Maui.BuildTasks.slnf" /bl:BuildBuildTasks.binlog -warnAsError false

REM Build device tests
Expand All @@ -278,7 +299,7 @@ The Helix configuration is defined in `eng/helix_xharness.proj` and includes:

#### Common Issues

1. **Build failures**: Ensure you've built the BuildTasks first
1. **Build failures**: Ensure you've built the MSBuild tasks first
2. **Missing devices**: Check queue availability at [helix.dot.net](https://helix.dot.net)
3. **Authentication**: For CI scenarios, ensure proper Azure DevOps access tokens
4. **Timeouts**: Tests have generous timeouts but may need adjustment for complex scenarios
Expand Down
5 changes: 3 additions & 2 deletions eng/helix_xharness.proj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<HelixTargetQueues Condition="'$(TargetOS)' == 'ios'">osx.15.arm64.Open</HelixTargetQueues>
<HelixTargetQueues Condition="'$(TargetOS)' == 'maccatalyst'">osx.15.arm64.Open</HelixTargetQueues>
<HelixTargetQueues Condition="'$(TargetOS)' == 'android'">ubuntu.2204.amd64.android.33.open</HelixTargetQueues>
<TargetsAppleMobile Condition="'$(TargetOS)' == 'ios'">true</TargetsAppleMobile>
<Creator Condition="'$(HelixAccessToken)' == ''">maui</Creator>
<IncludeDotNetCli>true</IncludeDotNetCli>
<DotNetCliPackageType>sdk</DotNetCliPackageType>
Expand All @@ -24,9 +25,9 @@
<HelixBuild>t001</HelixBuild>
</PropertyGroup>

<PropertyGroup>
<PropertyGroup Condition="'$(SYSTEM_ACCESSTOKEN)' != ''">
<ScenariosDir>$(BUILD_SOURCESDIRECTORY)/artifacts/bin/</ScenariosDir>
<TargetsAppleMobile Condition="'$(TargetOS)' == 'ios'">true</TargetsAppleMobile>

</PropertyGroup>

<PropertyGroup>
Expand Down
Loading