Skip to content

Commit 90ead2d

Browse files
committed
ci(windows): enable full test suite for ARM64 build
1 parent 569028a commit 90ead2d

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 installing Rust 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
@@ -184,7 +191,7 @@ jobs:
184191
# This is ci/actions-templates/windows-builds-template.yaml
185192
# Do not edit this file in .github/workflows
186193
build-windows-master: # job-name skip-pr skip-stable
187-
runs-on: windows-latest
194+
runs-on: ${{ matrix.os || 'windows-latest' }}
188195
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') }} # skip-pr skip-stable
189196
env:
190197
RUSTFLAGS: -Ctarget-feature=+crt-static
@@ -209,6 +216,11 @@ jobs:
209216
arch: x86_64
210217
mingwdir: mingw64
211218
gcc: x86_64-w64-mingw32-gcc
219+
- target: aarch64-pc-windows-msvc
220+
# Architecture of the rustup build installing Rust this workflow.
221+
rustup_arch: aarch64
222+
os: windows-11-arm
223+
run_tests: YES
212224
steps:
213225
- uses: actions/checkout@v4
214226
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -270,11 +282,13 @@ jobs:
270282
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
271283
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
272284
- name: Install Rustup using win.rustup.rs
285+
env:
286+
RUSTUP_ARCH: ${{ matrix.rustup_arch | 'x86_64' }}
273287
run: |
274288
# Disable the download progress bar which can cause perf issues
275289
$ProgressPreference = "SilentlyContinue"
276-
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
277-
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
290+
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
291+
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
278292
del rustup-init.exe
279293
shell: powershell
280294
- name: Ensure stable toolchain is up to date
@@ -348,7 +362,7 @@ jobs:
348362
# This is ci/actions-templates/windows-builds-template.yaml
349363
# Do not edit this file in .github/workflows
350364
build-windows-stable: # job-name skip-master skip-pr
351-
runs-on: windows-latest
365+
runs-on: ${{ matrix.os || 'windows-latest' }}
352366
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-master
353367
env:
354368
RUSTFLAGS: -Ctarget-feature=+crt-static
@@ -375,6 +389,11 @@ jobs:
375389
arch: x86_64
376390
mingwdir: mingw64
377391
gcc: x86_64-w64-mingw32-gcc
392+
- target: aarch64-pc-windows-msvc
393+
# Architecture of the rustup build installing Rust this workflow.
394+
rustup_arch: aarch64
395+
os: windows-11-arm
396+
run_tests: YES
378397
- target: i686-pc-windows-gnu # skip-pr skip-master
379398
arch: i686 # skip-pr skip-master
380399
mingwdir: mingw32 # skip-pr skip-master
@@ -440,11 +459,13 @@ jobs:
440459
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
441460
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
442461
- name: Install Rustup using win.rustup.rs
462+
env:
463+
RUSTUP_ARCH: ${{ matrix.rustup_arch | 'x86_64' }}
443464
run: |
444465
# Disable the download progress bar which can cause perf issues
445466
$ProgressPreference = "SilentlyContinue"
446-
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
447-
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
467+
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
468+
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
448469
del rustup-init.exe
449470
shell: powershell
450471
- 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 installing Rust 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)