Skip to content

Commit 356f99f

Browse files
authored
[ci] Fix helix local (#31796)
* [ci] Update helix locally * Update some language
1 parent 1273c63 commit 356f99f

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

docs/DevelopmentTips.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ To build and run Blazor Desktop samples, check out the [Blazor Desktop](https://
5555

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

58-
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)
58+
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)
5959

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

217217
### Running Device Tests Locally
218218

219-
#### Step 1: Build Build Tasks
219+
The following commands assume you are on the root of the maui repository.
220+
221+
#### Step 1: Build MSBuild Tasks
220222
First, restore tools and build the required MSBuild tasks:
221223

222224
```bash
223225
# Restore dotnet tools
224226
dotnet tool restore
225227

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

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

243+
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)
244+
245+
246+
```bash
247+
export BUILD_REASON=pr
248+
export BUILD_REPOSITORY_NAME=maui
249+
export BUILD_SOURCEBRANCH=main
250+
export SYSTEM_TEAMPROJECT=dnceng
251+
export SYSTEM_ACCESSTOKEN=''
252+
```
253+
241254
```bash
242255
# Send to Helix for Android
243-
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=android /bl:sendhelix.binlog -verbosity:diag
256+
./eng/common/msbuild.sh ./eng/helix_xharness.proj /restore /p:TreatWarningsAsErrors=false /t:Test /p:TargetOS=android /bl:sendhelix_android.binlog -verbosity:diag
244257

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

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

252265
### Windows Commands
253266

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

256269
```cmd
257-
REM Build Build tasks
270+
set BUILD_REASON=pr
271+
set BUILD_REPOSITORY_NAME=maui
272+
set BUILD_SOURCEBRANCH=main
273+
set SYSTEM_TEAMPROJECT=dnceng
274+
set SYSTEM_ACCESSTOKEN=
275+
```
276+
277+
```cmd
278+
REM Build MSBuild tasks
258279
.\build.cmd -restore -build -configuration Release -projects ".\Microsoft.Maui.BuildTasks.slnf" /bl:BuildBuildTasks.binlog -warnAsError false
259280
260281
REM Build device tests
@@ -278,7 +299,7 @@ The Helix configuration is defined in `eng/helix_xharness.proj` and includes:
278299

279300
#### Common Issues
280301

281-
1. **Build failures**: Ensure you've built the BuildTasks first
302+
1. **Build failures**: Ensure you've built the MSBuild tasks first
282303
2. **Missing devices**: Check queue availability at [helix.dot.net](https://helix.dot.net)
283304
3. **Authentication**: For CI scenarios, ensure proper Azure DevOps access tokens
284305
4. **Timeouts**: Tests have generous timeouts but may need adjustment for complex scenarios

eng/helix_xharness.proj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<HelixTargetQueues Condition="'$(TargetOS)' == 'ios'">osx.15.arm64.Open</HelixTargetQueues>
77
<HelixTargetQueues Condition="'$(TargetOS)' == 'maccatalyst'">osx.15.arm64.Open</HelixTargetQueues>
88
<HelixTargetQueues Condition="'$(TargetOS)' == 'android'">ubuntu.2204.amd64.android.33.open</HelixTargetQueues>
9+
<TargetsAppleMobile Condition="'$(TargetOS)' == 'ios'">true</TargetsAppleMobile>
910
<Creator Condition="'$(HelixAccessToken)' == ''">maui</Creator>
1011
<IncludeDotNetCli>true</IncludeDotNetCli>
1112
<DotNetCliPackageType>sdk</DotNetCliPackageType>
@@ -24,9 +25,9 @@
2425
<HelixBuild>t001</HelixBuild>
2526
</PropertyGroup>
2627

27-
<PropertyGroup>
28+
<PropertyGroup Condition="'$(SYSTEM_ACCESSTOKEN)' != ''">
2829
<ScenariosDir>$(BUILD_SOURCESDIRECTORY)/artifacts/bin/</ScenariosDir>
29-
<TargetsAppleMobile Condition="'$(TargetOS)' == 'ios'">true</TargetsAppleMobile>
30+
3031
</PropertyGroup>
3132

3233
<PropertyGroup>

0 commit comments

Comments
 (0)