Skip to content

Commit 52fce89

Browse files
rami3ldjc
authored andcommittedApr 16, 2025
ci(windows): enable full test suite for ARM64 build
1 parent d67d0e7 commit 52fce89

File tree

2 files changed

+40
-12
lines changed

2 files changed

+40
-12
lines changed
 

‎.github/workflows/ci.yaml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# This is ci/actions-templates/windows-builds-template.yaml
2121
# Do not edit this file in .github/workflows
2222
build-windows-pr: # job-name skip-master skip-stable
23-
runs-on: windows-latest
23+
runs-on: ${{ matrix.os || 'windows-latest' }}
2424
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable
2525
env:
2626
RUSTFLAGS: -Ctarget-feature=+crt-static
@@ -45,6 +45,11 @@ jobs:
4545
arch: x86_64
4646
mingwdir: mingw64
4747
gcc: x86_64-w64-mingw32-gcc
48+
- target: aarch64-pc-windows-msvc
49+
# Architecture of the rustup build that installs Rust in this workflow.
50+
rustup_arch: aarch64
51+
os: windows-11-arm
52+
run_tests: YES
4853
steps:
4954
- uses: actions/checkout@v4
5055
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -106,11 +111,13 @@ jobs:
106111
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
107112
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
108113
- name: Install Rustup using win.rustup.rs
114+
env:
115+
RUSTUP_ARCH: ${{ matrix.rustup_arch || 'x86_64' }}
109116
run: |
110117
# Disable the download progress bar which can cause perf issues
111118
$ProgressPreference = "SilentlyContinue"
112-
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
113-
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
119+
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
120+
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
114121
del rustup-init.exe
115122
shell: powershell
116123
- name: Ensure stable toolchain is up to date
@@ -185,7 +192,7 @@ jobs:
185192
# This is ci/actions-templates/windows-builds-template.yaml
186193
# Do not edit this file in .github/workflows
187194
build-windows-master: # job-name skip-pr skip-stable
188-
runs-on: windows-latest
195+
runs-on: ${{ matrix.os || 'windows-latest' }}
189196
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') }} # skip-pr skip-stable
190197
env:
191198
RUSTFLAGS: -Ctarget-feature=+crt-static
@@ -210,6 +217,11 @@ jobs:
210217
arch: x86_64
211218
mingwdir: mingw64
212219
gcc: x86_64-w64-mingw32-gcc
220+
- target: aarch64-pc-windows-msvc
221+
# Architecture of the rustup build that installs Rust in this workflow.
222+
rustup_arch: aarch64
223+
os: windows-11-arm
224+
run_tests: YES
213225
steps:
214226
- uses: actions/checkout@v4
215227
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -271,11 +283,13 @@ jobs:
271283
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
272284
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
273285
- name: Install Rustup using win.rustup.rs
286+
env:
287+
RUSTUP_ARCH: ${{ matrix.rustup_arch || 'x86_64' }}
274288
run: |
275289
# Disable the download progress bar which can cause perf issues
276290
$ProgressPreference = "SilentlyContinue"
277-
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
278-
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
291+
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
292+
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
279293
del rustup-init.exe
280294
shell: powershell
281295
- name: Ensure stable toolchain is up to date
@@ -350,7 +364,7 @@ jobs:
350364
# This is ci/actions-templates/windows-builds-template.yaml
351365
# Do not edit this file in .github/workflows
352366
build-windows-stable: # job-name skip-master skip-pr
353-
runs-on: windows-latest
367+
runs-on: ${{ matrix.os || 'windows-latest' }}
354368
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-master
355369
env:
356370
RUSTFLAGS: -Ctarget-feature=+crt-static
@@ -377,6 +391,11 @@ jobs:
377391
arch: x86_64
378392
mingwdir: mingw64
379393
gcc: x86_64-w64-mingw32-gcc
394+
- target: aarch64-pc-windows-msvc
395+
# Architecture of the rustup build that installs Rust in this workflow.
396+
rustup_arch: aarch64
397+
os: windows-11-arm
398+
run_tests: YES
380399
- target: i686-pc-windows-gnu # skip-pr skip-master
381400
arch: i686 # skip-pr skip-master
382401
mingwdir: mingw32 # skip-pr skip-master
@@ -442,11 +461,13 @@ jobs:
442461
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
443462
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
444463
- name: Install Rustup using win.rustup.rs
464+
env:
465+
RUSTUP_ARCH: ${{ matrix.rustup_arch || 'x86_64' }}
445466
run: |
446467
# Disable the download progress bar which can cause perf issues
447468
$ProgressPreference = "SilentlyContinue"
448-
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
449-
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
469+
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
470+
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
450471
del rustup-init.exe
451472
shell: powershell
452473
- name: Ensure stable toolchain is up to date

‎ci/actions-templates/windows-builds-template.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs: # skip-master skip-pr skip-stable
55
build-windows-pr: # job-name skip-master skip-stable
66
build-windows-master: # job-name skip-pr skip-stable
77
build-windows-stable: # job-name skip-master skip-pr
8-
runs-on: windows-latest
8+
runs-on: ${{ matrix.os || 'windows-latest' }}
99
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable
1010
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') }} # skip-pr skip-stable
1111
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-master
@@ -34,6 +34,11 @@ jobs: # skip-master skip-pr skip-stable
3434
arch: x86_64
3535
mingwdir: mingw64
3636
gcc: x86_64-w64-mingw32-gcc
37+
- target: aarch64-pc-windows-msvc
38+
# Architecture of the rustup build that installs Rust in this workflow.
39+
rustup_arch: aarch64
40+
os: windows-11-arm
41+
run_tests: YES
3742
- target: i686-pc-windows-gnu # skip-pr skip-master
3843
arch: i686 # skip-pr skip-master
3944
mingwdir: mingw32 # skip-pr skip-master
@@ -99,11 +104,13 @@ jobs: # skip-master skip-pr skip-stable
99104
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
100105
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
101106
- name: Install Rustup using win.rustup.rs
107+
env:
108+
RUSTUP_ARCH: ${{ matrix.rustup_arch || 'x86_64' }}
102109
run: |
103110
# Disable the download progress bar which can cause perf issues
104111
$ProgressPreference = "SilentlyContinue"
105-
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
106-
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
112+
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
113+
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
107114
del rustup-init.exe
108115
shell: powershell
109116
- name: Ensure stable toolchain is up to date

0 commit comments

Comments
 (0)