From c2802f84d10ec3731a5167fc7e7409d447080d8e Mon Sep 17 00:00:00 2001 From: Daniel Paoliello Date: Wed, 12 Jun 2024 09:36:34 -0700 Subject: [PATCH] DRAFT: Add an aarch64-msvc build running on ARM64 Windows --- .github/workflows/ci.yml | 16 +++++++++++++--- src/ci/github-actions/jobs.yml | 18 ++++++++---------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 521f8ef0f5ae5..213a2fb8258ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,10 +81,12 @@ jobs: include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }} steps: - 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, @@ -97,6 +99,14 @@ jobs: make dos2unix diffutils + ${{ contains(matrix.os, 'windows') && contains(matrix.os, 'arm64') && 'git' || '' }} + + - 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' + &'${{ 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 diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 1db763735e6ed..98b5d0c91b151 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -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 @@ -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