From 6f51d98b6bfb9f23a0ff1ec70354d34c02915420 Mon Sep 17 00:00:00 2001 From: Alvin Wong Date: Thu, 20 Oct 2022 17:02:18 +0800 Subject: [PATCH 1/5] Change ARM64 build to run the x86 prebuild binary This is the only way to make cross compiling to ARM64 possible. --- cppwinrt/cppwinrt.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cppwinrt/cppwinrt.vcxproj b/cppwinrt/cppwinrt.vcxproj index c107e2fbe..aa876effa 100644 --- a/cppwinrt/cppwinrt.vcxproj +++ b/cppwinrt/cppwinrt.vcxproj @@ -236,7 +236,7 @@ Console - $(OutputPath)prebuild.exe ..\strings $(OutputPath) + $(CppWinRTDir)prebuild.exe ..\strings $(OutputPath) @@ -319,7 +319,7 @@ /DEBUGTYPE:CV,FIXUP %(AdditionalOptions) - $(OutputPath)prebuild.exe ..\strings $(OutputPath) + $(CppWinRTDir)prebuild.exe ..\strings $(OutputPath) From 404d57db4770748c61923a23785a103bd3555b8f Mon Sep 17 00:00:00 2001 From: Alvin Wong Date: Thu, 20 Oct 2022 17:06:15 +0800 Subject: [PATCH 2/5] Change test builds to run x86 wincpprt when cross compiling to ARM64 --- test/old_tests/Component/Component.vcxproj | 4 ++-- test/old_tests/Composable/Composable.vcxproj | 2 +- test/test/test.vcxproj | 16 ++++++++-------- test/test_win7/test_win7.vcxproj | 16 ++++++++-------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/old_tests/Component/Component.vcxproj b/test/old_tests/Component/Component.vcxproj index 2ce8c8005..9041c9f06 100644 --- a/test/old_tests/Component/Component.vcxproj +++ b/test/old_tests/Component/Component.vcxproj @@ -1,4 +1,4 @@ - + @@ -166,7 +166,7 @@ - $(OutputPath)cppwinrt.exe -in $(OutputPath)Component.winmd -comp $(ProjectDir) -out "$(ProjectDir)Generated Files" -ref sdk $(OutputPath)Composable.winmd -verbose + $(CppWinRTDir)cppwinrt.exe -in $(OutputPath)Component.winmd -comp $(ProjectDir) -out "$(ProjectDir)Generated Files" -ref sdk $(OutputPath)Composable.winmd -verbose C++/WinRT compiler Generated Files\module.g.cpp $(OutputPath)Component.winmd diff --git a/test/old_tests/Composable/Composable.vcxproj b/test/old_tests/Composable/Composable.vcxproj index b4b29d968..cd9ef3f4a 100644 --- a/test/old_tests/Composable/Composable.vcxproj +++ b/test/old_tests/Composable/Composable.vcxproj @@ -166,7 +166,7 @@ - $(OutDir)cppwinrt.exe -in $(OutDir)Composable.winmd -comp $(ProjectDir) -out "$(ProjectDir)Generated Files" -ref sdk -verbose -pch precomp.hpp -name Composable + $(CppWinRTDir)cppwinrt.exe -in $(OutDir)Composable.winmd -comp $(ProjectDir) -out "$(ProjectDir)Generated Files" -ref sdk -verbose -pch precomp.hpp -name Composable C++/WinRT compiler Generated Files\module.g.cpp $(OutDir)Composable.winmd diff --git a/test/test/test.vcxproj b/test/test/test.vcxproj index 8a570d258..69c307ebf 100644 --- a/test/test/test.vcxproj +++ b/test/test/test.vcxproj @@ -122,7 +122,7 @@ true - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -140,7 +140,7 @@ Console - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -158,7 +158,7 @@ Console - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -176,7 +176,7 @@ Console - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -194,7 +194,7 @@ Console - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -216,7 +216,7 @@ true - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -238,7 +238,7 @@ true - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -260,7 +260,7 @@ true - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi diff --git a/test/test_win7/test_win7.vcxproj b/test/test_win7/test_win7.vcxproj index b85b6a448..831c0c1d1 100644 --- a/test/test_win7/test_win7.vcxproj +++ b/test/test_win7/test_win7.vcxproj @@ -122,7 +122,7 @@ true - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -140,7 +140,7 @@ Console - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -158,7 +158,7 @@ Console - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -176,7 +176,7 @@ Console - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -194,7 +194,7 @@ Console - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -216,7 +216,7 @@ true - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -238,7 +238,7 @@ true - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi @@ -260,7 +260,7 @@ true - $(OutputPath)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi + $(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose -fastabi From d2d8809a118cad7d3433967b24f93de7736da1b7 Mon Sep 17 00:00:00 2001 From: Alvin Wong Date: Thu, 20 Oct 2022 17:09:00 +0800 Subject: [PATCH 3/5] Use the ARM64 cross compiler to build ARM64 tests --- test/old_tests/Component/Component.vcxproj | 4 ++-- test/old_tests/Composable/Composable.vcxproj | 4 ++-- test/test_component/test_component.vcxproj | 4 ++-- test/test_component_base/test_component_base.vcxproj | 4 ++-- test/test_component_derived/test_component_derived.vcxproj | 4 ++-- test/test_component_fast/test_component_fast.vcxproj | 4 ++-- test/test_component_folders/test_component_folders.vcxproj | 4 ++-- test/test_component_no_pch/test_component_no_pch.vcxproj | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/test/old_tests/Component/Component.vcxproj b/test/old_tests/Component/Component.vcxproj index 9041c9f06..9af296c51 100644 --- a/test/old_tests/Component/Component.vcxproj +++ b/test/old_tests/Component/Component.vcxproj @@ -131,7 +131,7 @@ false false - ..\..;$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + ..\..;$(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl @@ -149,7 +149,7 @@ false false - ..\..;$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + ..\..;$(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl diff --git a/test/old_tests/Composable/Composable.vcxproj b/test/old_tests/Composable/Composable.vcxproj index cd9ef3f4a..d13d779b9 100644 --- a/test/old_tests/Composable/Composable.vcxproj +++ b/test/old_tests/Composable/Composable.vcxproj @@ -131,7 +131,7 @@ false false - ..\..;$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + ..\..;$(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl @@ -149,7 +149,7 @@ false false - ..\..;$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + ..\..;$(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl diff --git a/test/test_component/test_component.vcxproj b/test/test_component/test_component.vcxproj index 55096520a..d1f668509 100644 --- a/test/test_component/test_component.vcxproj +++ b/test/test_component/test_component.vcxproj @@ -125,7 +125,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl @@ -137,7 +137,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl diff --git a/test/test_component_base/test_component_base.vcxproj b/test/test_component_base/test_component_base.vcxproj index 8bf804684..d8768de47 100644 --- a/test/test_component_base/test_component_base.vcxproj +++ b/test/test_component_base/test_component_base.vcxproj @@ -125,7 +125,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl @@ -137,7 +137,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl diff --git a/test/test_component_derived/test_component_derived.vcxproj b/test/test_component_derived/test_component_derived.vcxproj index d444a2111..e80ab4af1 100644 --- a/test/test_component_derived/test_component_derived.vcxproj +++ b/test/test_component_derived/test_component_derived.vcxproj @@ -125,7 +125,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl @@ -137,7 +137,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl diff --git a/test/test_component_fast/test_component_fast.vcxproj b/test/test_component_fast/test_component_fast.vcxproj index 8cc4739b1..b9d54604b 100644 --- a/test/test_component_fast/test_component_fast.vcxproj +++ b/test/test_component_fast/test_component_fast.vcxproj @@ -126,7 +126,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl @@ -138,7 +138,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl diff --git a/test/test_component_folders/test_component_folders.vcxproj b/test/test_component_folders/test_component_folders.vcxproj index b552d147f..0270ca257 100644 --- a/test/test_component_folders/test_component_folders.vcxproj +++ b/test/test_component_folders/test_component_folders.vcxproj @@ -125,7 +125,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl @@ -137,7 +137,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl diff --git a/test/test_component_no_pch/test_component_no_pch.vcxproj b/test/test_component_no_pch/test_component_no_pch.vcxproj index b4ad8741f..594e85592 100644 --- a/test/test_component_no_pch/test_component_no_pch.vcxproj +++ b/test/test_component_no_pch/test_component_no_pch.vcxproj @@ -125,7 +125,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl @@ -137,7 +137,7 @@ Midl - $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); + $(VC_ExecutablePath_x86_ARM64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH); Midl From 7d19a966d19fb21e9138cec0d1d47f4824c7dda3 Mon Sep 17 00:00:00 2001 From: Alvin Wong Date: Thu, 20 Oct 2022 17:09:57 +0800 Subject: [PATCH 4/5] CI: Build cppwinrt and tests for ARM64 --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f09b518d5..462355c97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,13 +72,16 @@ jobs: run: | cmd /c "$env:VSDevCmd" "&" msbuild /m /clp:ForceConsoleColor "$env:msbuild_config_props" cppwinrt.sln /t:fast_fwd + - name: Build x86 prebuild tool + if: matrix.arch == 'arm64' + run: | + cmd /c "$env:VSDevCmd" "&" msbuild /m /clp:ForceConsoleColor "$env:msbuild_config_props" /p:Platform=x86 cppwinrt.sln /t:cppwinrt + - name: Build cppwinrt - if: matrix.arch != 'arm64' run: | cmd /c "$env:VSDevCmd" "&" msbuild /m /clp:ForceConsoleColor "$env:msbuild_config_props" cppwinrt.sln /t:cppwinrt - name: Upload built executables - if: matrix.arch != 'arm64' uses: actions/upload-artifact@v3 with: name: msvc-build-${{ matrix.arch }}-${{ matrix.config }}-bin @@ -103,10 +106,14 @@ jobs: fail-fast: false matrix: compiler: [MSVC, clang-cl] - arch: [x86, x64] + arch: [x86, x64, arm64] config: [Debug, Release] test_exe: [test, test_cpp20, test_win7, test_fast, test_slow, test_old, test_module_lock_custom, test_module_lock_none] exclude: + - arch: arm64 + config: Debug + - compiler: clang-cl + arch: arm64 - compiler: clang-cl config: Release runs-on: windows-latest @@ -131,11 +138,19 @@ jobs: cmd /c "LLVM_VS2017\install.bat" 1 - name: Fetch cppwinrt executables + if: matrix.arch != 'arm64' uses: actions/download-artifact@v3 with: name: msvc-build-${{ matrix.arch }}-${{ matrix.config }}-bin path: _build/${{ matrix.arch }}/${{ matrix.config }}/ + - name: Fetch x86 cppwinrt executables (arm64 only) + if: matrix.arch == 'arm64' + uses: actions/download-artifact@v3 + with: + name: msvc-build-x86-Release-bin + path: _build/x86/Release/ + - name: Download nuget run: | mkdir ".\.nuget" @@ -186,7 +201,11 @@ jobs: run: | $target_configuration = "${{ matrix.config }}" $target_platform = "${{ matrix.arch }}" - & "_build\$target_platform\$target_configuration\cppwinrt.exe" -in local -out _build\$target_platform\$target_configuration -verbose + $cppwinrt_path = "_build\$target_platform\$target_configuration\cppwinrt.exe" + if ($target_platform -eq "arm64") { + $cppwinrt_path = "_build\x86\Release\cppwinrt.exe" + } + & $cppwinrt_path -in local -out _build\$target_platform\$target_configuration -verbose - name: Build test '${{ matrix.test_exe }}' run: | @@ -230,6 +249,7 @@ jobs: } - name: Run test '${{ matrix.test_exe }}' + if: matrix.arch != 'arm64' run: | $target_configuration = "${{ matrix.config }}" $target_platform = "${{ matrix.arch }}" From df23ee114186fa91bbbb1d8eaa1c80a1b45d31b9 Mon Sep 17 00:00:00 2001 From: Alvin Wong Date: Thu, 20 Oct 2022 17:20:58 +0800 Subject: [PATCH 5/5] Upload arm64 test executables We can't run the tests on the runner, so provide a download for others with an ARM64 Windows system to verify the tests locally. --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 462355c97..8336eee12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -261,6 +261,18 @@ jobs: } & $test_path --use-colour yes + - name: Upload arm64 test executables + if: matrix.arch == 'arm64' + uses: actions/upload-artifact@v3 + with: + name: msvc-tests-${{ matrix.arch }}-${{ matrix.config }}-bin + path: | + _build/${{ matrix.arch }}/${{ matrix.config }}/*.exe + _build/${{ matrix.arch }}/${{ matrix.config }}/*.dll + _build/${{ matrix.arch }}/${{ matrix.config }}/*.winmd + _build/${{ matrix.arch }}/${{ matrix.config }}/*.lib + _build/${{ matrix.arch }}/${{ matrix.config }}/*.pdb + build-msvc-natvis: name: 'Build natvis' strategy: