Skip to content

Commit dc66580

Browse files
committed
DRAFT: Add an aarch64-msvc build running on ARM64 Windows
1 parent 6cab15c commit dc66580

File tree

7 files changed

+54
-9
lines changed

7 files changed

+54
-9
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ jobs:
145145
- name: show the current environment
146146
run: src/ci/scripts/dump-environment.sh
147147

148+
- name: install rust
149+
run: src/ci/scripts/install-rust.sh
150+
148151
- name: install awscli
149152
run: src/ci/scripts/install-awscli.sh
150153

src/ci/github-actions/jobs.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ runners:
4949
os: windows-2025-8core-32gb
5050
<<: *base-job
5151

52+
- &job-windows-aarch64
53+
os: windows-11-arm
54+
<<: *base-job
55+
5256
- &job-aarch64-linux
5357
# Free some disk space to avoid running out of space during the build.
5458
free_disk: true
@@ -509,6 +513,19 @@ auto:
509513
SCRIPT: make ci-msvc-ps1
510514
<<: *job-windows
511515

516+
# aarch64-msvc is split into two jobs to run tests in parallel.
517+
- name: aarch64-msvc-1
518+
env:
519+
RUST_CONFIGURE_ARGS: --build=aarch64-pc-windows-msvc
520+
SCRIPT: make ci-msvc-py
521+
<<: *job-windows-aarch64
522+
523+
- name: aarch64-msvc-2
524+
env:
525+
RUST_CONFIGURE_ARGS: --build=aarch64-pc-windows-msvc
526+
SCRIPT: make ci-msvc-ps1
527+
<<: *job-windows-aarch64
528+
512529
# x86_64-msvc-ext is split into multiple jobs to run tests in parallel.
513530
- name: x86_64-msvc-ext1
514531
env:
@@ -602,14 +619,14 @@ auto:
602619
- name: dist-aarch64-msvc
603620
env:
604621
RUST_CONFIGURE_ARGS: >-
605-
--build=x86_64-pc-windows-msvc
622+
--build=aarch64-pc-windows-msvc
606623
--host=aarch64-pc-windows-msvc
607624
--target=aarch64-pc-windows-msvc,arm64ec-pc-windows-msvc
608625
--enable-full-tools
609626
--enable-profiler
610627
SCRIPT: python x.py dist bootstrap --include-default-paths
611628
DIST_REQUIRE_ALL_TOOLS: 1
612-
<<: *job-windows
629+
<<: *job-windows-aarch64
613630

614631
- name: dist-i686-mingw
615632
env:

src/ci/scripts/install-clang.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
1111

1212
# Update both macOS's and Windows's tarballs when bumping the version here.
1313
# Try to keep this in sync with src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh
14-
LLVM_VERSION="18.1.4"
14+
LLVM_VERSION="20.1.3"
1515

1616
if isMacOS; then
1717
# FIXME: This is the latest pre-built version of LLVM that's available for
@@ -56,9 +56,19 @@ elif isWindows && ! isKnownToBeMingwBuild; then
5656

5757
mkdir -p citools/clang-rust
5858
cd citools
59-
retry curl -f "${MIRRORS_BASE}/LLVM-${LLVM_VERSION}-win64.exe" \
60-
-o "LLVM-${LLVM_VERSION}-win64.exe"
61-
7z x -oclang-rust/ "LLVM-${LLVM_VERSION}-win64.exe"
59+
60+
if [[ "${CI_JOB_NAME}" = *aarch64* ]]; then
61+
suffix=woa64
62+
63+
# On Arm64, the Ring crate requires that Clang be on the PATH.
64+
# https://github.com/briansmith/ring/blob/main/BUILDING.md
65+
ciCommandAddPath "$(cygpath -m "$(pwd)/clang-rust/bin")"
66+
else
67+
suffix=win64
68+
fi
69+
retry curl -f "${MIRRORS_BASE}/LLVM-${LLVM_VERSION}-${suffix}.exe" \
70+
-o "LLVM-${LLVM_VERSION}-${suffix}.exe"
71+
7z x -oclang-rust/ "LLVM-${LLVM_VERSION}-${suffix}.exe"
6272
ciCommandSetEnv RUST_CONFIGURE_ARGS \
6373
"${RUST_CONFIGURE_ARGS} --set llvm.clang-cl=$(pwd)/clang-rust/bin/clang-cl.exe"
6474

src/ci/scripts/install-rust.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# The Arm64 Windows Runner does not have Rust already installed
4+
# https://github.com/actions/partner-runner-images/issues/77
5+
6+
set -euo pipefail
7+
IFS=$'\n\t'
8+
9+
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
10+
11+
if [[ "${CI_JOB_NAME}" = *aarch64* ]] && isWindows; then
12+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
13+
sh -s -- -y -q --default-host aarch64-pc-windows-msvc
14+
ciCommandAddPath "${USERPROFILE}/.cargo/bin"
15+
fi

src/doc/book

Submodule book updated 29 files

0 commit comments

Comments
 (0)