Skip to content

ci(windows): enable full test suite for ARM64 build #4290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 36 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# This is ci/actions-templates/windows-builds-template.yaml
# Do not edit this file in .github/workflows
build-windows-pr: # job-name skip-master skip-stable
runs-on: windows-latest
runs-on: ${{ matrix.os || 'windows-latest' }}
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
Expand All @@ -45,6 +45,11 @@ jobs:
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
- target: aarch64-pc-windows-msvc
# Architecture of the rustup build that installs Rust in this workflow.
rustup_arch: aarch64
os: windows-11-arm
run_tests: YES
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand Down Expand Up @@ -80,7 +85,7 @@ jobs:
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "${env:USERPROFILE}\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Skip tests
if: matrix.run_tests == '' || matrix.mode == 'release'
Expand All @@ -106,11 +111,13 @@ jobs:
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rustup using win.rustup.rs
env:
RUSTUP_ARCH: ${{ matrix.rustup_arch || 'x86_64' }}
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
del rustup-init.exe
shell: powershell
- name: Ensure stable toolchain is up to date
Expand All @@ -137,6 +144,7 @@ jobs:
env:
TARGET: ${{ matrix.target }}
run: |
rustup component add clippy
cargo clippy --all-targets --all-features -- -D warnings
- name: Upload the built artifact
if: matrix.mode == 'release'
Expand Down Expand Up @@ -184,7 +192,7 @@ jobs:
# This is ci/actions-templates/windows-builds-template.yaml
# Do not edit this file in .github/workflows
build-windows-master: # job-name skip-pr skip-stable
runs-on: windows-latest
runs-on: ${{ matrix.os || 'windows-latest' }}
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') }} # skip-pr skip-stable
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
Expand All @@ -209,6 +217,11 @@ jobs:
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
- target: aarch64-pc-windows-msvc
# Architecture of the rustup build that installs Rust in this workflow.
rustup_arch: aarch64
os: windows-11-arm
run_tests: YES
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand Down Expand Up @@ -244,7 +257,7 @@ jobs:
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "${env:USERPROFILE}\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Skip tests
if: matrix.run_tests == '' || matrix.mode == 'release'
Expand All @@ -270,11 +283,13 @@ jobs:
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rustup using win.rustup.rs
env:
RUSTUP_ARCH: ${{ matrix.rustup_arch || 'x86_64' }}
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
del rustup-init.exe
shell: powershell
- name: Ensure stable toolchain is up to date
Expand All @@ -301,6 +316,7 @@ jobs:
env:
TARGET: ${{ matrix.target }}
run: |
rustup component add clippy
cargo clippy --all-targets --all-features -- -D warnings
- name: Upload the built artifact
if: matrix.mode == 'release'
Expand Down Expand Up @@ -348,7 +364,7 @@ jobs:
# This is ci/actions-templates/windows-builds-template.yaml
# Do not edit this file in .github/workflows
build-windows-stable: # job-name skip-master skip-pr
runs-on: windows-latest
runs-on: ${{ matrix.os || 'windows-latest' }}
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-master
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
Expand All @@ -375,6 +391,11 @@ jobs:
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
- target: aarch64-pc-windows-msvc
# Architecture of the rustup build that installs Rust in this workflow.
rustup_arch: aarch64
os: windows-11-arm
run_tests: YES
- target: i686-pc-windows-gnu # skip-pr skip-master
arch: i686 # skip-pr skip-master
mingwdir: mingw32 # skip-pr skip-master
Expand Down Expand Up @@ -414,7 +435,7 @@ jobs:
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "${env:USERPROFILE}\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Skip tests
if: matrix.run_tests == '' || matrix.mode == 'release'
Expand All @@ -440,11 +461,13 @@ jobs:
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rustup using win.rustup.rs
env:
RUSTUP_ARCH: ${{ matrix.rustup_arch || 'x86_64' }}
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
del rustup-init.exe
shell: powershell
- name: Ensure stable toolchain is up to date
Expand All @@ -471,6 +494,7 @@ jobs:
env:
TARGET: ${{ matrix.target }}
run: |
rustup component add clippy
cargo clippy --all-targets --all-features -- -D warnings
- name: Upload the built artifact
if: matrix.mode == 'release'
Expand Down
16 changes: 12 additions & 4 deletions ci/actions-templates/windows-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs: # skip-master skip-pr skip-stable
build-windows-pr: # job-name skip-master skip-stable
build-windows-master: # job-name skip-pr skip-stable
build-windows-stable: # job-name skip-master skip-pr
runs-on: windows-latest
runs-on: ${{ matrix.os || 'windows-latest' }}
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') }} # skip-pr skip-stable
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-master
Expand Down Expand Up @@ -34,6 +34,11 @@ jobs: # skip-master skip-pr skip-stable
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
- target: aarch64-pc-windows-msvc
# Architecture of the rustup build that installs Rust in this workflow.
rustup_arch: aarch64
os: windows-11-arm
run_tests: YES
- target: i686-pc-windows-gnu # skip-pr skip-master
arch: i686 # skip-pr skip-master
mingwdir: mingw32 # skip-pr skip-master
Expand Down Expand Up @@ -73,7 +78,7 @@ jobs: # skip-master skip-pr skip-stable
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "${env:USERPROFILE}\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Skip tests
if: matrix.run_tests == '' || matrix.mode == 'release'
Expand All @@ -99,11 +104,13 @@ jobs: # skip-master skip-pr skip-stable
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rustup using win.rustup.rs
env:
RUSTUP_ARCH: ${{ matrix.rustup_arch || 'x86_64' }}
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
Invoke-WebRequest "https://win.rustup.rs/${env:RUSTUP_ARCH}" -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=${env:RUSTUP_ARCH}-pc-windows-msvc --profile=minimal
del rustup-init.exe
shell: powershell
- name: Ensure stable toolchain is up to date
Expand All @@ -130,6 +137,7 @@ jobs: # skip-master skip-pr skip-stable
env:
TARGET: ${{ matrix.target }}
run: |
rustup component add clippy
cargo clippy --all-targets --all-features -- -D warnings
- name: Upload the built artifact
if: matrix.mode == 'release'
Expand Down