Skip to content
Open
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
93 changes: 87 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
- x86_64-pc-windows-msvc
- aarch64-pc-windows-msvc
- x86_64-pc-windows-gnu
- aarch64-pc-windows-gnullvm
include:
- target: x86_64-pc-windows-msvc
run_tests: YES
Expand All @@ -52,6 +53,11 @@ jobs:
rustup_arch: aarch64
os: windows-11-arm
run_tests: YES
- target: aarch64-pc-windows-gnullvm
rustup_arch: aarch64
os: windows-11-arm
llvm_mingw_version: 20260616
gcc: aarch64-w64-mingw32-clang
steps:
- uses: actions/checkout@v6
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -73,15 +79,36 @@ jobs:
# Building `aws-lc-rs` for Windows MSVC depends on `NASM`.
# See: https://aws.github.io/aws-lc-rs/requirements/windows.html
uses: ilammy/setup-nasm@v1
if: matrix.mingwdir == ''
if: contains(matrix.target, 'msvc')
- name: Install mingw
uses: bwoodsend/setup-winlibs-action@v1.16
if: matrix.mingwdir != ''
with:
architecture: ${{ matrix.arch }}
- name: Install llvm-mingw
shell: powershell
if: matrix.llvm_mingw_version != ''
run: |
$version = "${{ matrix.llvm_mingw_version }}"
$archive = "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}.zip"
$url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$version/$archive"
$destination = Join-Path $env:RUNNER_TEMP $archive
$installDir = Join-Path $env:RUNNER_TEMP "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}"

Write-Host "Downloading $archive with aria2c"
& aria2c --max-connection-per-server=8 --split=8 --dir="$env:RUNNER_TEMP" --out="$archive" "$url"

Write-Host "Extracting $archive with 7-Zip"
& 7z x "$destination" "-o$env:RUNNER_TEMP" -y

$targetEnvUpper = "${{ matrix.target }}".Replace('-', '_').ToUpperInvariant()

"$installDir\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
"CC_${targetEnvUpper}=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
"CARGO_TARGET_${targetEnvUpper}_LINKER=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
if: matrix.gcc != ''
run: |
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
Expand Down Expand Up @@ -212,6 +239,7 @@ jobs:
- x86_64-pc-windows-msvc
- aarch64-pc-windows-msvc
- x86_64-pc-windows-gnu
- aarch64-pc-windows-gnullvm
include:
- target: x86_64-pc-windows-msvc
run_tests: YES
Expand All @@ -224,6 +252,11 @@ jobs:
rustup_arch: aarch64
os: windows-11-arm
run_tests: YES
- target: aarch64-pc-windows-gnullvm
rustup_arch: aarch64
os: windows-11-arm
llvm_mingw_version: 20260616
gcc: aarch64-w64-mingw32-clang
steps:
- uses: actions/checkout@v6
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -245,15 +278,36 @@ jobs:
# Building `aws-lc-rs` for Windows MSVC depends on `NASM`.
# See: https://aws.github.io/aws-lc-rs/requirements/windows.html
uses: ilammy/setup-nasm@v1
if: matrix.mingwdir == ''
if: contains(matrix.target, 'msvc')
- name: Install mingw
uses: bwoodsend/setup-winlibs-action@v1.16
if: matrix.mingwdir != ''
with:
architecture: ${{ matrix.arch }}
- name: Install llvm-mingw
shell: powershell
if: matrix.llvm_mingw_version != ''
run: |
$version = "${{ matrix.llvm_mingw_version }}"
$archive = "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}.zip"
$url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$version/$archive"
$destination = Join-Path $env:RUNNER_TEMP $archive
$installDir = Join-Path $env:RUNNER_TEMP "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}"

Write-Host "Downloading $archive with aria2c"
& aria2c --max-connection-per-server=8 --split=8 --dir="$env:RUNNER_TEMP" --out="$archive" "$url"

Write-Host "Extracting $archive with 7-Zip"
& 7z x "$destination" "-o$env:RUNNER_TEMP" -y

$targetEnvUpper = "${{ matrix.target }}".Replace('-', '_').ToUpperInvariant()

"$installDir\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
"CC_${targetEnvUpper}=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
"CARGO_TARGET_${targetEnvUpper}_LINKER=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
if: matrix.gcc != ''
run: |
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
Expand Down Expand Up @@ -386,6 +440,7 @@ jobs:
- aarch64-pc-windows-msvc
- x86_64-pc-windows-gnu
- i686-pc-windows-gnu # skip-pr skip-main
- aarch64-pc-windows-gnullvm
include:
- target: x86_64-pc-windows-msvc
run_tests: YES
Expand All @@ -398,6 +453,11 @@ jobs:
rustup_arch: aarch64
os: windows-11-arm
run_tests: YES
- target: aarch64-pc-windows-gnullvm
rustup_arch: aarch64
os: windows-11-arm
llvm_mingw_version: 20260616
gcc: aarch64-w64-mingw32-clang
- target: i686-pc-windows-gnu # skip-pr skip-main
arch: i686 # skip-pr skip-main
mingwdir: mingw32 # skip-pr skip-main
Expand All @@ -423,15 +483,36 @@ jobs:
# Building `aws-lc-rs` for Windows MSVC depends on `NASM`.
# See: https://aws.github.io/aws-lc-rs/requirements/windows.html
uses: ilammy/setup-nasm@v1
if: matrix.mingwdir == ''
if: contains(matrix.target, 'msvc')
- name: Install mingw
uses: bwoodsend/setup-winlibs-action@v1.16
if: matrix.mingwdir != ''
with:
architecture: ${{ matrix.arch }}
- name: Install llvm-mingw
shell: powershell
if: matrix.llvm_mingw_version != ''
run: |
$version = "${{ matrix.llvm_mingw_version }}"
$archive = "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}.zip"
$url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$version/$archive"
$destination = Join-Path $env:RUNNER_TEMP $archive
$installDir = Join-Path $env:RUNNER_TEMP "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}"

Write-Host "Downloading $archive with aria2c"
& aria2c --max-connection-per-server=8 --split=8 --dir="$env:RUNNER_TEMP" --out="$archive" "$url"

Write-Host "Extracting $archive with 7-Zip"
& 7z x "$destination" "-o$env:RUNNER_TEMP" -y

$targetEnvUpper = "${{ matrix.target }}".Replace('-', '_').ToUpperInvariant()

"$installDir\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
"CC_${targetEnvUpper}=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
"CARGO_TARGET_${targetEnvUpper}_LINKER=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
if: matrix.gcc != ''
run: |
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
Expand Down
31 changes: 29 additions & 2 deletions ci/actions-templates/windows-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs: # skip-main skip-pr skip-stable
- aarch64-pc-windows-msvc
- x86_64-pc-windows-gnu
- i686-pc-windows-gnu # skip-pr skip-main
- aarch64-pc-windows-gnullvm
include:
- target: x86_64-pc-windows-msvc
run_tests: YES
Expand All @@ -39,6 +40,11 @@ jobs: # skip-main skip-pr skip-stable
rustup_arch: aarch64
os: windows-11-arm
run_tests: YES
- target: aarch64-pc-windows-gnullvm
rustup_arch: aarch64
os: windows-11-arm
llvm_mingw_version: 20260616
gcc: aarch64-w64-mingw32-clang
- target: i686-pc-windows-gnu # skip-pr skip-main
arch: i686 # skip-pr skip-main
mingwdir: mingw32 # skip-pr skip-main
Expand All @@ -64,15 +70,36 @@ jobs: # skip-main skip-pr skip-stable
# Building `aws-lc-rs` for Windows MSVC depends on `NASM`.
# See: https://aws.github.io/aws-lc-rs/requirements/windows.html
uses: ilammy/setup-nasm@v1
if: matrix.mingwdir == ''
if: contains(matrix.target, 'msvc')
- name: Install mingw
uses: bwoodsend/setup-winlibs-action@v1.16
if: matrix.mingwdir != ''
with:
architecture: ${{ matrix.arch }}
- name: Install llvm-mingw
shell: powershell
if: matrix.llvm_mingw_version != ''
run: |
$version = "${{ matrix.llvm_mingw_version }}"
$archive = "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}.zip"
$url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$version/$archive"
$destination = Join-Path $env:RUNNER_TEMP $archive
$installDir = Join-Path $env:RUNNER_TEMP "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}"

Write-Host "Downloading $archive with aria2c"
& aria2c --max-connection-per-server=8 --split=8 --dir="$env:RUNNER_TEMP" --out="$archive" "$url"

Write-Host "Extracting $archive with 7-Zip"
& 7z x "$destination" "-o$env:RUNNER_TEMP" -y

$targetEnvUpper = "${{ matrix.target }}".Replace('-', '_').ToUpperInvariant()

"$installDir\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
"CC_${targetEnvUpper}=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
"CARGO_TARGET_${targetEnvUpper}_LINKER=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
if: matrix.gcc != ''
run: |
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
Expand Down
2 changes: 2 additions & 0 deletions ci/cloudfront-invalidation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ rustup/dist/aarch64-apple-darwin/rustup-init
rustup/dist/aarch64-apple-darwin/rustup-init.sha256
rustup/dist/aarch64-linux-android/rustup-init
rustup/dist/aarch64-linux-android/rustup-init.sha256
rustup/dist/aarch64-pc-windows-gnullvm/rustup-init.exe
rustup/dist/aarch64-pc-windows-gnullvm/rustup-init.exe.sha256
rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe.sha256
rustup/dist/aarch64-unknown-linux-gnu/rustup-init
Expand Down
2 changes: 2 additions & 0 deletions doc/user-guide/src/installation/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ You can manually download `rustup-init` for a given target from
- [sha256 file](https://static.rust-lang.org/rustup/dist/aarch64-apple-darwin/rustup-init.sha256)
- [aarch64-linux-android](https://static.rust-lang.org/rustup/dist/aarch64-linux-android/rustup-init)
- [sha256 file](https://static.rust-lang.org/rustup/dist/aarch64-linux-android/rustup-init.sha256)
- [aarch64-pc-windows-gnullvm](https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-gnullvm/rustup-init.exe)
- [sha256 file](https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-gnullvm/rustup-init.exe.sha256)
- [aarch64-pc-windows-msvc](https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe)
- [sha256 file](https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe.sha256)
- [aarch64-unknown-linux-gnu](https://static.rust-lang.org/rustup/dist/aarch64-unknown-linux-gnu/rustup-init)
Expand Down
4 changes: 4 additions & 0 deletions rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ get_architecture() {

aarch64 | arm64)
_cputype=aarch64
# Windows aarch64 uses gnullvm instead of gnu
if [ "$_ostype" = "pc-windows-gnu" ]; then
_ostype=pc-windows-gnullvm
fi
;;

x86_64 | x86-64 | x64 | amd64)
Expand Down
Loading