Skip to content

DRAFT: Add an aarch64-msvc build running on ARM64 Windows #140136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ jobs:
- name: show the current environment
run: src/ci/scripts/dump-environment.sh

- name: install rust
run: src/ci/scripts/install-rust.sh

- name: install awscli
run: src/ci/scripts/install-awscli.sh

Expand Down
21 changes: 19 additions & 2 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ runners:
os: windows-2025-8core-32gb
<<: *base-job

- &job-windows-aarch64
os: windows-11-arm
<<: *base-job

- &job-aarch64-linux
# Free some disk space to avoid running out of space during the build.
free_disk: true
Expand Down Expand Up @@ -509,6 +513,19 @@ auto:
SCRIPT: make ci-msvc-ps1
<<: *job-windows

# aarch64-msvc is split into two jobs to run tests in parallel.
- name: aarch64-msvc-1
env:
RUST_CONFIGURE_ARGS: --build=aarch64-pc-windows-msvc
SCRIPT: make ci-msvc-py
<<: *job-windows-aarch64

- name: aarch64-msvc-2
env:
RUST_CONFIGURE_ARGS: --build=aarch64-pc-windows-msvc
SCRIPT: make ci-msvc-ps1
<<: *job-windows-aarch64

# x86_64-msvc-ext is split into multiple jobs to run tests in parallel.
- name: x86_64-msvc-ext1
env:
Expand Down Expand Up @@ -602,14 +619,14 @@ auto:
- name: dist-aarch64-msvc
env:
RUST_CONFIGURE_ARGS: >-
--build=x86_64-pc-windows-msvc
--build=aarch64-pc-windows-msvc
--host=aarch64-pc-windows-msvc
--target=aarch64-pc-windows-msvc,arm64ec-pc-windows-msvc
--enable-full-tools
--enable-profiler
SCRIPT: python x.py dist bootstrap --include-default-paths
DIST_REQUIRE_ALL_TOOLS: 1
<<: *job-windows
<<: *job-windows-aarch64

- name: dist-i686-mingw
env:
Expand Down
16 changes: 13 additions & 3 deletions src/ci/scripts/install-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,19 @@ elif isWindows && ! isKnownToBeMingwBuild; then

mkdir -p citools/clang-rust
cd citools
retry curl -f "${MIRRORS_BASE}/LLVM-${LLVM_VERSION}-win64.exe" \
-o "LLVM-${LLVM_VERSION}-win64.exe"
7z x -oclang-rust/ "LLVM-${LLVM_VERSION}-win64.exe"

if [[ "${CI_JOB_NAME}" = *aarch64* ]]; then
suffix=woa64

# On Arm64, the Ring crate requires that Clang be on the PATH.
# https://github.com/briansmith/ring/blob/main/BUILDING.md
ciCommandAddPath "$(cygpath -m "$(pwd)/clang-rust/bin")"
else
suffix=win64
fi
retry curl -f "${MIRRORS_BASE}/LLVM-${LLVM_VERSION}-${suffix}.exe" \
-o "LLVM-${LLVM_VERSION}-${suffix}.exe"
7z x -oclang-rust/ "LLVM-${LLVM_VERSION}-${suffix}.exe"
ciCommandSetEnv RUST_CONFIGURE_ARGS \
"${RUST_CONFIGURE_ARGS} --set llvm.clang-cl=$(pwd)/clang-rust/bin/clang-cl.exe"

Expand Down
15 changes: 15 additions & 0 deletions src/ci/scripts/install-rust.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# The Arm64 Windows Runner does not have Rust already installed
# https://github.com/actions/partner-runner-images/issues/77

set -euo pipefail
IFS=$'\n\t'

source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"

if [[ "${CI_JOB_NAME}" = *aarch64* ]] && isWindows; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y -q --default-host aarch64-pc-windows-msvc
ciCommandAddPath "${USERPROFILE}/.cargo/bin"
fi
2 changes: 1 addition & 1 deletion src/doc/book
Submodule book updated 29 files
+1 −1 listings/ch04-understanding-ownership/listing-04-01/src/main.rs
+4 −4 listings/ch04-understanding-ownership/listing-04-03/src/main.rs
+3 −2 listings/ch04-understanding-ownership/listing-04-08/src/main.rs
+1 −1 listings/ch04-understanding-ownership/no-listing-01-can-mutate-string/src/main.rs
+1 −1 listings/ch04-understanding-ownership/no-listing-08-reference-with-annotations/src/main.rs
+2 −2 listings/ch04-understanding-ownership/no-listing-10-multiple-mut-not-allowed/output.txt
+1 −1 listings/ch04-understanding-ownership/no-listing-10-multiple-mut-not-allowed/src/main.rs
+2 −2 listings/ch04-understanding-ownership/no-listing-12-immutable-and-mutable-not-allowed/output.txt
+1 −1 listings/ch04-understanding-ownership/no-listing-12-immutable-and-mutable-not-allowed/src/main.rs
+1 −1 listings/ch04-understanding-ownership/no-listing-15-dangling-reference-annotated/src/main.rs
+3 −3 listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt
+1 −1 listings/ch05-using-structs-to-structure-related-data/listing-05-11/src/main.rs
+22 −26 nostarch/chapter03.md
+34 −36 nostarch/chapter04.md
+28 −32 nostarch/chapter05.md
+54 −49 nostarch/chapter06.md
+ nostarch/docx/chapter03.docx
+ nostarch/docx/chapter04.docx
+ nostarch/docx/chapter05.docx
+ nostarch/docx/chapter06.docx
+12 −12 src/ch03-02-data-types.md
+4 −6 src/ch03-03-how-functions-work.md
+5 −8 src/ch03-05-control-flow.md
+10 −10 src/ch04-01-what-is-ownership.md
+11 −14 src/ch04-03-slices.md
+5 −6 src/ch05-01-defining-structs.md
+5 −5 src/ch06-01-defining-an-enum.md
+17 −19 src/ch06-03-if-let.md
+8 −4 tools/docx-to-md.xsl
2 changes: 1 addition & 1 deletion src/doc/rust-by-example
Loading