Skip to content

Commit

Permalink
DRAFT: Add an aarch64-msvc build running on ARM64 Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaoliello committed Jun 14, 2024
1 parent 0285dab commit d9e0359
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,23 @@ jobs:
# Check the `calculate_matrix` job to see how is the matrix defined.
include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
steps:
- if: contains(matrix.os, 'windows') && contains(matrix.os, 'arm64')
name: install Git on Windows Arm64
shell: powershell
run: |
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'
&'${{ runner.temp }}\gitinstaller.exe' /SP- /VERYSILENT /SUPPRESSMSGBOXES /NOCANCEL /NORESTART /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /o:PathOption=CmdTools /o:BashTerminalOption=ConHost /o:EnableSymlinks=Enabled
$currentPath = [System.Environment]::GetEnvironmentVariable("PATH", "Machine")
$newPath = $currentPath + ';C:\Program Files\Git\bin'
[Environment]::SetEnvironmentVariable("PATH", $newPath, "Machine")
- if: contains(matrix.os, 'windows')
uses: msys2/setup-msys2@v2.22.0
uses: msys2/setup-msys2@v2.21.0
with:
# i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64.
msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}
# i686 jobs use mingw32.
# aarch64 runners use clangarm64.
# x86_64 and cross-compile jobs use mingw64.
msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || contains(matrix.os, 'arm64') && 'clangarm64' || 'mingw64' }}
# don't try to download updates for already installed packages
update: false
# don't try to use the msys that comes built-in to the github runner,
Expand All @@ -98,8 +110,17 @@ jobs:
dos2unix
diffutils
# - if: contains(matrix.os, 'windows') && contains(matrix.os, 'arm64')
# name: install VS on Windows Arm64
# shell: powershell
# run: |
# Invoke-WebRequest -Uri https://aka.ms/vs/17/release/vs_buildtools.exe -OutFile '${{ runner.temp }}\vs_buildtools.exe'
# cmd /c "${{ runner.temp }}\vs_buildtools.exe --quiet --norestart --wait --nocache --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.Windows11SDK.22621"

- name: disable git crlf conversion
run: git config --global core.autocrlf false
run: |
echo $PATH
git config --global core.autocrlf false
- name: checkout the source code
uses: actions/checkout@v4
Expand Down
18 changes: 8 additions & 10 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ runners:
os: windows-2022-16core-64gb
<<: *base-job

- &job-windows-aarch64
os: windows-11-arm64-8core-32gb
<<: *base-job

- &job-aarch64-linux
os: ubuntu-22.04-arm64-8core-32gb

Expand Down Expand Up @@ -80,17 +84,11 @@ envs:
# These jobs automatically inherit envs.pr, to avoid repeating
# it in each job definition.
pr:
- image: mingw-check
<<: *job-linux-4c
- image: mingw-check-tidy
continue_on_error: true
<<: *job-linux-4c
- image: x86_64-gnu-llvm-17
- image: aarch64-msvc
env:
ENABLE_GCC_CODEGEN: "1"
<<: *job-linux-16c
- image: x86_64-gnu-tools
<<: *job-linux-16c
RUST_CONFIGURE_ARGS: --build=aarch64-pc-windows-msvc
SCRIPT: make ci-msvc
<<: *job-windows-aarch64

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

0 comments on commit d9e0359

Please sign in to comment.