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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Automate Windows on Arm Builds with GitHub Arm-hosted Runners

minutes_to_complete: 20

who_is_this_for: This is an introductory tutorial for software developers interested in automating Windows application builds on Arm architecture using GitHub Actions.

learning_objectives:
- Learn about GitHub Arm-hosted Windows runners.
- Understand how to configure workflows for Arm-hosted runners.
- Automate the build process of Windows applications using GitHub Actions.

prerequisites:
- A GitHub account
- Basic knowledge of GitHub Actions

author:
- Pareena Verma

### Tags
skilllevels: Introducory
subjects: CI-CD
armips:
- Cortex-A
operatingsystems:
- Windows
tools_software_languages:
- GitHub
- Visual Studio
- MSBuild
- Arm Performance Libraries

further_reading:
- resource:
title: GitHub Actions Partner Images Repository
link: https://github.com/actions/partner-runner-images/
type: documentation
- resource:
title: GitHub Actions now supports Windows on Arm runners for all public repos
link: https://blogs.windows.com/windowsdeveloper/2025/04/14/github-actions-now-supports-windows-on-arm-runners-for-all-public-repos/
type: blog

### FIXED, DO NOT MODIFY
# ================================================================================
weight: 1
layout: "learningpathall"
learning_path_main_page: "yes"
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# ================================================================================
# FIXED, DO NOT MODIFY THIS FILE
# ================================================================================
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
title: "Next Steps" # Always the same, html page title.
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Automate the Build of Windows Applications

weight: 3

### FIXED, DO NOT MODIFY
layout: learningpathall
---
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/).

### Overview of the Windows Application

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/).

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.

```console
https://github.com/odincodeshen/SpinTheCubeInGDI.git
```

The application implements a spinning cube and consists of four key components:
- **Shape Generation**: Generates vertices for a sphere using a golden ratio-based algorithm.
- **Rotation Calculation**: Uses a rotation matrix to rotate the 3D shape around the X, Y, and Z axes.
- **Drawing**: Draws the transformed vertices of the shapes on the screen using a Windows API.
- **Performance Measurement**: Measures and displays the number of transforms per second.

The code has two options to calculate the rotation:

1. Multithreading: the application utilizes multithreading to improve performance by distributing the rotation calculations across multiple threads.
2. Arm Performance Libraries: the application utilizes optimized math library functions for the rotation calculations.

You will learn how to automate the build process for this application by using GitHub Actions that leverages the Arm-hosted Windows runners.

### Automate the Build Process

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.

Below is an explanation of the steps in the workflow:


**Trigger Events**: The workflow runs when there is a push or pull_request event on the main branch.

**Job Definition**: A single job named build is defined. It runs on the GitHub Arm-hosted Windows runner (`windows-11-arm`) as shown:

```console
jobs:
build:
runs-on: windows-11-arm
```
**Checkout Repository**: Uses the `actions/checkout@v4` action to fetch the code.

**Add MSBuild to PATH**: Adds MSBuild tools for the build process using `microsoft/setup-msbuild@v1.0.2`.

**Restore Dependencies**: Runs `nuget restore` to restore NuGet packages required by the solution.

**Create Download Directory**: Creates a directory to store downloaded files and verifies the Python version.

**Download ARM Performance Libraries**: Downloads the Windows installer for ARM Performance Libraries (APL) and verifies the downloaded files.

**Install ARM Performance Libraries**: Installs the downloaded ARM Performance Libraries using `msiexec.exe` with a quiet mode and logs the process.

**Check Installation Success**: Verifies the success of the APL installation by checking the exit code and logs.

**Build the Solution**: Runs MSBuild to build the solution with the specified configuration (Debug) and platform (ARM64).

**Upload Build Artifact**: Uploads the built executable as an artifact using `actions/upload-artifact@v4`.

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.
![action #center](_images/actions.png)

You have successfully built your Windows application and uploaded the application as an artifact of your workflow using the GitHub Arm-hosted Windows runner.
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: Introduction to GitHub Arm-hosted Runners

weight: 2

### FIXED, DO NOT MODIFY
layout: learningpathall
---
GitHub Arm-hosted runners for Windows are now available in public preview, providing a powerful and efficient way to build, test and deploy your Windows applications on Arm without the need for virtualization. These runners come with a Windows 11 Desktop image, equipped with many tools to get started with your workflows.

### What are GitHub Arm-hosted Runners?

Runners are the machines that execute jobs in a GitHub Actions workflow. An Arm-hosted runner is managed by GitHub and uses the Arm architecture, meaning you don't need to provide a server to run Actions workflows. GitHub provides the system and runs the Action workflows for you.

Arm-hosted runners are available for public repositories at no cost, subject to [standard usage limits](https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration#usage-limits).

### How to use GitHub Arm-hosted Windows Runners?

To leverage the GitHub Windows Arm64 hosted runners, you will need to use the following label in your public repository workflow runs:

```yaml
runs-on: windows-11-arm
```

Please note that this label will not work in private repositories, the workflow will fail if you add it.

Two types of GitHub-hosted runners are available; standard runners, and larger runners. Larger runners are differentiated from standard runners because users can control the amount of RAM, the number of CPUs, and configure the allocated disk space. You can also use the Windows 11 Desktop Arm Image with larger runners. To use this image on large runners, you will need to create a new runner.

### How can I create an GitHub Arm-hosted Windows large runner?

Arm-hosted runners are created at the organization level.

Navigate to your organization and select the `Settings` tab. On the left pane, select `Actions->Runners`.

On the `Runners` page, select the `New runner` drop-down on the top right, and then select `New GitHub-hosted runner`.

![new-runner #center](_images/new-runner.png)


Specify a name for the runner, this is the `runs-on` field in your workflows so make the name clear for others who use it.

Choose Windows ARM64 for the platform and click `Save`.

![platform #center](_images/platform.png)

Specify the operating system image for the runner, select `Microsoft Windows 11 Desktop by Arm Limited`, and click `Save`.

![image #center](_images/win_image.png)

Select the size of the large runner you need and and click `Save`.

![specifications #center](_images/size.png)

The `Capacity` section includes the maximum concurrency, which is the number of jobs to run at the same time.

You can also set the runner group for this runner. The runner group controls the settings for this runner. Pay attention to the runner group as you may need to return to the runner group settings if any configuration changes are needed.

![capacity #center](_images/capacity.png)

Finally, click `Create runner`.

Your new Arm-hosted runner Windows large runner is ready to use. You will need to remember the runner name for use in your workflows with the `runs-on` label.

### Check the server hardware used by the Arm-hosted Windows Runners
The Arm-hosted runners are powered by Microsoft Azure Cobalt 100 processors, based on the Arm Neoverse N2, with 4 vCPUs and Armv9-A features, including Scalable Vector Extension 2 (SVE2).

The output from running the `wmic` command on the Arm-hosted runner is below.

![Arm-hosted runner info #center](_images/cpuinfo.png)


### Check Installed Software on the Arm-hosted Windows Runners

To find out more about the software installed on the Arm-hosted runners, visit the [GitHub Actions Partner Images repository](https://github.com/actions/partner-runner-images/). Check the [image documentation](https://github.com/actions/partner-runner-images/blob/main/images/arm-windows-11-image.md) for a list of software packages installed on the Windows 11 by Arm Limited image. You can also use this repository to report issues or request additional software.

Loading