Skip to content

Commit db06fc2

Browse files
committed
DRAFT: Add an aarch64-msvc build running on ARM64 Windows
1 parent 0285dab commit db06fc2

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

.github/workflows/ci.yml

+22-3
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,12 @@ jobs:
8181
include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
8282
steps:
8383
- if: contains(matrix.os, 'windows')
84-
uses: msys2/setup-msys2@v2.22.0
84+
uses: msys2/setup-msys2@v2.21.0
8585
with:
86-
# i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64.
87-
msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}
86+
# i686 jobs use mingw32.
87+
# aarch64 runners use clangarm64.
88+
# x86_64 and cross-compile jobs use mingw64.
89+
msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || contains(matrix.os, 'arm64') && 'clangarm64' || 'mingw64' }}
8890
# don't try to download updates for already installed packages
8991
update: false
9092
# don't try to use the msys that comes built-in to the github runner,
@@ -98,6 +100,23 @@ jobs:
98100
dos2unix
99101
diffutils
100102
103+
- if: contains(matrix.os, 'windows') && contains(matrix.os, 'arm64')
104+
name: install VS on Windows Arm64
105+
shell: powershell
106+
run: |
107+
Invoke-WebRequest -Uri https://aka.ms/vs/17/release/vs_buildtools.exe -OutFile '${{ runner.temp }}\vs_buildtools.exe'
108+
&'${{ runner.temp }}\vs_buildtools.exe' --quiet --norestart --wait --nocache --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.Windows11SDK.22621
109+
110+
- if: contains(matrix.os, 'windows') && contains(matrix.os, 'arm64')
111+
name: install Git on Windows Arm64
112+
shell: powershell
113+
run: |
114+
Invoke-WebRequest -Uri https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/Git-2.45.2-64-bit.exe -OutFile '${{ runner.temp }}\gitinstaller.exe'
115+
&'${{ runner.temp }}\gitinstaller.exe' /SP- /VERYSILENT /SUPPRESSMSGBOXES /NOCANCEL /NORESTART /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /o:PathOption=CmdTools /o:BashTerminalOption=ConHost /o:EnableSymlinks=Enabled
116+
$currentPath = [System.Environment]::GetEnvironmentVariable("PATH", "Machine")
117+
$newPath = $currentPath + ';C:\Program Files\Git\bin'
118+
[Environment]::SetEnvironmentVariable("PATH", $newPath, "Machine")
119+
101120
- name: disable git crlf conversion
102121
run: git config --global core.autocrlf false
103122

src/ci/github-actions/jobs.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ runners:
3232
os: windows-2022-16core-64gb
3333
<<: *base-job
3434

35+
- &job-windows-aarch64
36+
os: windows-11-arm64-8core-32gb
37+
<<: *base-job
38+
3539
- &job-aarch64-linux
3640
os: ubuntu-22.04-arm64-8core-32gb
3741

@@ -80,17 +84,11 @@ envs:
8084
# These jobs automatically inherit envs.pr, to avoid repeating
8185
# it in each job definition.
8286
pr:
83-
- image: mingw-check
84-
<<: *job-linux-4c
85-
- image: mingw-check-tidy
86-
continue_on_error: true
87-
<<: *job-linux-4c
88-
- image: x86_64-gnu-llvm-17
87+
- image: aarch64-msvc
8988
env:
90-
ENABLE_GCC_CODEGEN: "1"
91-
<<: *job-linux-16c
92-
- image: x86_64-gnu-tools
93-
<<: *job-linux-16c
89+
RUST_CONFIGURE_ARGS: --build=aarch64-pc-windows-msvc
90+
SCRIPT: make ci-msvc
91+
<<: *job-windows-aarch64
9492

9593
# Jobs that run when you perform a try build (@bors try)
9694
# These jobs automatically inherit envs.try, to avoid repeating

0 commit comments

Comments
 (0)