From fcdbd3e26d20fc8d3fade086f09fc94b06efe2b8 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 15 Apr 2025 14:12:15 +0200 Subject: [PATCH 1/7] check windows-11-arm runner --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87e28d87f..65852da5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,6 +111,8 @@ jobs: TEST_X86: 1 - name: Windows (latest) os: windows-latest + - name: Windows arm64 + os: windows-11-arm - name: Windows ClangCL (latest) os: windows-latest VS_GENERATOR_TOOLSET: ClangCL From 60dbd2891ee1285d322191b47e2d681080930119 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 15 Apr 2025 17:37:46 +0200 Subject: [PATCH 2/7] install rust on win11 --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65852da5a..cdd9c9182 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,6 +174,17 @@ jobs: make sudo make install + - name: Install rust (Windows 11 ARM64 until the image has it) + if: ${{ matrix.os == 'windows-11-arm' }} + shell: pwsh + run: | + Invoke-WebRequest -Uri "https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe" -OutFile rustup-init.exe + .\rustup-init.exe --default-toolchain none -y + "$env:USERPROFILE\.cargo\bin" | Out-File -Append -Encoding ascii $env:GITHUB_PATH + "CARGO_HOME=$env:USERPROFILE\.cargo" | Out-File -Append -Encoding ascii $env:GITHUB_ENV + rustup install stable + rustup target add aarch64-pc-windows-msvc + - name: Installing Linux GCC 9.4.0 Dependencies if: ${{ runner.os == 'Linux' && matrix.os == 'ubuntu-22.04' && !env['TEST_X86'] }} run: | From 9fe08ad1b808a0518596dd1bde50896a0018b12f Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 15 Apr 2025 17:42:56 +0200 Subject: [PATCH 3/7] separate rust install steps so seconds step pick up env --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cdd9c9182..b205c827e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,7 +174,7 @@ jobs: make sudo make install - - name: Install rust (Windows 11 ARM64 until the image has it) + - name: Install rustup on Windows 11 ARM64 (until the image has it) if: ${{ matrix.os == 'windows-11-arm' }} shell: pwsh run: | @@ -182,6 +182,11 @@ jobs: .\rustup-init.exe --default-toolchain none -y "$env:USERPROFILE\.cargo\bin" | Out-File -Append -Encoding ascii $env:GITHUB_PATH "CARGO_HOME=$env:USERPROFILE\.cargo" | Out-File -Append -Encoding ascii $env:GITHUB_ENV + + - name: Install rust on Windows 11 ARM64 (until the image has it) + if: ${{ matrix.os == 'windows-11-arm' }} + shell: pwsh + run: | rustup install stable rustup target add aarch64-pc-windows-msvc From 32258e31fb1b2b52c715d3c0e441015b074f55f2 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 15 Apr 2025 21:11:04 +0200 Subject: [PATCH 4/7] do not install clang-format via pip when on ARM64 windows --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 50002c903..d8e819f36 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,6 +3,6 @@ pytest==8.1.1 pytest-httpserver==1.0.10 msgpack==1.0.8 pytest-xdist==3.5.0 -clang-format==19.1.3 +clang-format==19.1.3; not (sys_platform == "win32" and platform_machine == "ARM64") pywin32==308; sys_platform == "win32" mitmproxy==11.0.0 From 4fcb3366b34e9eb189ebcfda7955f600208f1447 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 15 Apr 2025 21:16:24 +0200 Subject: [PATCH 5/7] use DeMorgan do bypass the PEP508 expression limit --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index d8e819f36..5e2756462 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,6 +3,6 @@ pytest==8.1.1 pytest-httpserver==1.0.10 msgpack==1.0.8 pytest-xdist==3.5.0 -clang-format==19.1.3; not (sys_platform == "win32" and platform_machine == "ARM64") +clang-format==19.1.3; sys_platform != "win32" or platform_machine != "ARM64" pywin32==308; sys_platform == "win32" mitmproxy==11.0.0 From 008b420a5003f3354f063b6f39ddd869d3f9aeb6 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 15 Apr 2025 21:40:08 +0200 Subject: [PATCH 6/7] figure out if OpenSSL was correctly installed --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b205c827e..8d8eb7f4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,6 +182,7 @@ jobs: .\rustup-init.exe --default-toolchain none -y "$env:USERPROFILE\.cargo\bin" | Out-File -Append -Encoding ascii $env:GITHUB_PATH "CARGO_HOME=$env:USERPROFILE\.cargo" | Out-File -Append -Encoding ascii $env:GITHUB_ENV + tree "$env:ProgramFiles\OpenSSL" /F - name: Install rust on Windows 11 ARM64 (until the image has it) if: ${{ matrix.os == 'windows-11-arm' }} From 25eaa970aaf13c81d761cb28e7a88a507c39b067 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Thu, 5 Jun 2025 16:09:22 +0200 Subject: [PATCH 7/7] try clang-format 20.1.5 (which has ARM64 wheels) --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 5e2756462..55a1fcd8f 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,6 +3,6 @@ pytest==8.1.1 pytest-httpserver==1.0.10 msgpack==1.0.8 pytest-xdist==3.5.0 -clang-format==19.1.3; sys_platform != "win32" or platform_machine != "ARM64" +clang-format==20.1.5 pywin32==308; sys_platform == "win32" mitmproxy==11.0.0