Skip to content

Commit 2403de5

Browse files
Merge pull request #1838 from pareenaverma/content_review
GitHub Windows Arm runner LP
2 parents c0e00ea + 720c192 commit 2403de5

File tree

11 files changed

+203
-0
lines changed

11 files changed

+203
-0
lines changed
82 KB
Loading
49.4 KB
Loading
17.6 KB
Loading
41.5 KB
Loading
33.4 KB
Loading
22.8 KB
Loading
26.4 KB
Loading
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Automate Windows on Arm Builds with GitHub Arm-hosted Runners
3+
4+
minutes_to_complete: 20
5+
6+
who_is_this_for: This is an introductory tutorial for software developers interested in automating Windows application builds on Arm architecture using GitHub Actions.
7+
8+
learning_objectives:
9+
- Learn about GitHub Arm-hosted Windows runners.
10+
- Understand how to configure workflows for Arm-hosted runners.
11+
- Automate the build process of Windows applications using GitHub Actions.
12+
13+
prerequisites:
14+
- A GitHub account
15+
- Basic knowledge of GitHub Actions
16+
17+
author:
18+
- Pareena Verma
19+
20+
### Tags
21+
skilllevels: Introducory
22+
subjects: CI-CD
23+
armips:
24+
- Cortex-A
25+
operatingsystems:
26+
- Windows
27+
tools_software_languages:
28+
- GitHub
29+
- Visual Studio
30+
- MSBuild
31+
- Arm Performance Libraries
32+
33+
further_reading:
34+
- resource:
35+
title: GitHub Actions Partner Images Repository
36+
link: https://github.com/actions/partner-runner-images/
37+
type: documentation
38+
- resource:
39+
title: GitHub Actions now supports Windows on Arm runners for all public repos
40+
link: https://blogs.windows.com/windowsdeveloper/2025/04/14/github-actions-now-supports-windows-on-arm-runners-for-all-public-repos/
41+
type: blog
42+
43+
### FIXED, DO NOT MODIFY
44+
# ================================================================================
45+
weight: 1
46+
layout: "learningpathall"
47+
learning_path_main_page: "yes"
48+
---
49+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: Automate the Build of Windows Applications
3+
4+
weight: 3
5+
6+
### FIXED, DO NOT MODIFY
7+
layout: learningpathall
8+
---
9+
In this section, you will learn how to automate the build process of a Windows application using GitHub Arm-hosted runners. You will use the application in the [Optimize Windows applications using Arm Performance Libraries Learning Path](/learning-paths/laptops-and-desktops/windows_armpl/).
10+
11+
### Overview of the Windows Application
12+
13+
A basic overview of the application is provided here but for details on building the application refer to the [Optimize Windows applications using Arm Performance Libraries Learning Path](/learning-paths/laptops-and-desktops/windows_armpl/2-multithreading/).
14+
15+
The source code for the application that renders a rotating 3D cube to perform the calculations using different programming options is provided in this GitHub repository.
16+
17+
```console
18+
https://github.com/odincodeshen/SpinTheCubeInGDI.git
19+
```
20+
21+
The application implements a spinning cube and consists of four key components:
22+
- **Shape Generation**: Generates vertices for a sphere using a golden ratio-based algorithm.
23+
- **Rotation Calculation**: Uses a rotation matrix to rotate the 3D shape around the X, Y, and Z axes.
24+
- **Drawing**: Draws the transformed vertices of the shapes on the screen using a Windows API.
25+
- **Performance Measurement**: Measures and displays the number of transforms per second.
26+
27+
The code has two options to calculate the rotation:
28+
29+
1. Multithreading: the application utilizes multithreading to improve performance by distributing the rotation calculations across multiple threads.
30+
2. Arm Performance Libraries: the application utilizes optimized math library functions for the rotation calculations.
31+
32+
You will learn how to automate the build process for this application by using GitHub Actions that leverages the Arm-hosted Windows runners.
33+
34+
### Automate the Build Process
35+
36+
This GitHub Actions workflow [`msbuild.yml`](https://github.com/odincodeshen/SpinTheCubeInGDI/blob/main/.github/workflows/msbuild.yml) that automates the build process for this project using MSBuild for Windows on Arm is included in this repository.
37+
38+
Below is an explanation of the steps in the workflow:
39+
40+
41+
**Trigger Events**: The workflow runs when there is a push or pull_request event on the main branch.
42+
43+
**Job Definition**: A single job named build is defined. It runs on the GitHub Arm-hosted Windows runner (`windows-11-arm`) as shown:
44+
45+
```console
46+
jobs:
47+
build:
48+
runs-on: windows-11-arm
49+
```
50+
**Checkout Repository**: Uses the `actions/checkout@v4` action to fetch the code.
51+
52+
**Add MSBuild to PATH**: Adds MSBuild tools for the build process using `microsoft/[email protected]`.
53+
54+
**Restore Dependencies**: Runs `nuget restore` to restore NuGet packages required by the solution.
55+
56+
**Create Download Directory**: Creates a directory to store downloaded files and verifies the Python version.
57+
58+
**Download ARM Performance Libraries**: Downloads the Windows installer for ARM Performance Libraries (APL) and verifies the downloaded files.
59+
60+
**Install ARM Performance Libraries**: Installs the downloaded ARM Performance Libraries using `msiexec.exe` with a quiet mode and logs the process.
61+
62+
**Check Installation Success**: Verifies the success of the APL installation by checking the exit code and logs.
63+
64+
**Build the Solution**: Runs MSBuild to build the solution with the specified configuration (Debug) and platform (ARM64).
65+
66+
**Upload Build Artifact**: Uploads the built executable as an artifact using `actions/upload-artifact@v4`.
67+
68+
This workflow automates the process of dependency management, environment setup, building your Windows on Arm project, and storing the final artifact all using GitHub Arm-hosted runner. You can view the `Actions` logs on the repository for each step.
69+
![action #center](_images/actions.png)
70+
71+
You have successfully built your Windows application and uploaded the application as an artifact of your workflow using the GitHub Arm-hosted Windows runner.

0 commit comments

Comments
 (0)