From 02c6d3e795990501717108a35ab0b452872d0898 Mon Sep 17 00:00:00 2001
From: Jose Quintana <1700322+joseluisq@users.noreply.github.com>
Date: Sun, 5 Nov 2023 22:57:31 +0100
Subject: [PATCH] feat: windows arm64 target (#283)
- aarch64-pc-windows-msvc
---
.github/workflows/devel.yml | 18 ++++++++++++------
.github/workflows/release.yml | 16 +++++++++++-----
docs/content/download-and-install.tmpl.md | 2 ++
docs/content/platforms-architectures.md | 2 +-
4 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml
index 3f815e0..47e773f 100644
--- a/.github/workflows/devel.yml
+++ b/.github/workflows/devel.yml
@@ -56,8 +56,8 @@ jobs:
- macos-arm64
- windows-msvc
- windows-msvc-i686
+ - windows-msvc-arm64
- windows-pc-gnu
- # - windows-msvc-arm64
include:
# Specific Rust channels
- build: pinned
@@ -148,13 +148,13 @@ jobs:
os: windows-2022
rust: stable
target: i686-pc-windows-msvc
+ - build: windows-msvc-arm64
+ os: windows-2022
+ rust: stable
+ target: aarch64-pc-windows-msvc
- build: windows-pc-gnu
os: windows-2022
rust: stable-x86_64-gnu
- # - build: windows-msvc-arm64
- # os: windows-2022
- # rust: stable
- # target: aarch64-pc-windows-msvc
steps:
- name: Checkout repository
@@ -195,9 +195,15 @@ jobs:
echo "target flag is: ${{ env.TARGET_FLAGS }}"
echo "target dir is: ${{ env.TARGET_DIR }}"
+ - name: Setup Windows ARM64
+ if: ${{ contains(matrix.build, 'windows-msvc-arm64') }}
+ run: |
+ # ring crate: add Visual Studio Build Tools "VS 2022 C++ ARM64 build tools" and "clang" components
+ $env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin"
+
- name: Skip tests
shell: bash
- if: ${{ contains(fromJSON('["macos-arm64", "linux-android-arm64", "linux-android-armv7", "netbsd", "illumos"]'), matrix.build) }}
+ if: ${{ contains(fromJSON('["macos-arm64", "linux-android-arm64", "linux-android-armv7", "netbsd", "illumos", "windows-msvc-arm64"]'), matrix.build) }}
run: |
# Can't run tests: cross-compiling
echo "SKIP_TESTS=--no-run" >> $GITHUB_ENV
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8399cc3..681e8a8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -68,8 +68,8 @@ jobs:
- macos-arm64
- windows-msvc
- windows-msvc-i686
+ - windows-msvc-arm64
- windows-pc-gnu
- # - windows-msvc-arm64
include:
- build: linux-musl
os: ubuntu-22.04
@@ -147,14 +147,14 @@ jobs:
os: windows-2022
rust: stable
target: i686-pc-windows-msvc
+ - build: windows-msvc-arm64
+ os: windows-2022
+ rust: stable
+ target: aarch64-pc-windows-msvc
- build: windows-pc-gnu
os: windows-2022
rust: stable-x86_64-gnu
target: x86_64-pc-windows-gnu
- # - build: windows-msvc-arm64
- # os: windows-2022
- # rust: stable
- # target: aarch64-pc-windows-msvc
steps:
- name: Checkout repository
@@ -187,6 +187,12 @@ jobs:
echo "TARGET_FLAGS=--target=${{ matrix.target }}" >> $GITHUB_ENV
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
+ - name: Setup Windows ARM64
+ if: ${{ contains(matrix.build, 'windows-msvc-arm64') }}
+ run: |
+ # ring crate: add Visual Studio Build Tools "VS 2022 C++ ARM64 build tools" and "clang" components
+ $env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin"
+
- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO_BIN }}"
diff --git a/docs/content/download-and-install.tmpl.md b/docs/content/download-and-install.tmpl.md
index a810051..8ddb434 100644
--- a/docs/content/download-and-install.tmpl.md
+++ b/docs/content/download-and-install.tmpl.md
@@ -115,6 +115,8 @@ Pre-compiled binaries grouped by CPU architectures.
**SHA256SUM:** `{{aarch64-apple-darwin.tar.gz}}`
- [static-web-server-{{RELEASE_VERSION}}-aarch64-linux-android.tar.gz](https://github.com/static-web-server/static-web-server/releases/download/{{RELEASE_VERSION}}/static-web-server-{{RELEASE_VERSION}}-aarch64-linux-android.tar.gz)
**SHA256SUM:** `{{aarch64-linux-android.tar.gz}}`
+- [static-web-server-{{RELEASE_VERSION}}-aarch64-pc-windows-msvc.zip](https://github.com/static-web-server/static-web-server/releases/download/{{RELEASE_VERSION}}/static-web-server-{{RELEASE_VERSION}}-aarch64-pc-windows-msvc.zip)
+**SHA256SUM:** `{{aarch64-pc-windows-msvc.zip}}`
### x86
diff --git a/docs/content/platforms-architectures.md b/docs/content/platforms-architectures.md
index c5dee46..9ba6987 100644
--- a/docs/content/platforms-architectures.md
+++ b/docs/content/platforms-architectures.md
@@ -43,7 +43,7 @@ Currently, only the following platforms/architectures are supported.
- `x86_64-pc-windows-gnu`
#### ARM64
- - ~~`aarch64-pc-windows-msvc`~~ (temporarily disabled until [briansmith/ring#1167](https://github.com/briansmith/ring/issues/1167))
+ - `aarch64-pc-windows-msvc`
## FreeBSD
--
libgit2 1.7.2