webmachinelearning/webnn-native

[CI] Recent CI failed on Windows platform

BruceDai opened this issue · 1 comments

Current the Windows-latest environment of CI has upgraded from Windows Server 2019 to Windows Server 2022, then there is following error:

ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
  File "D:/a/webnn-native/webnn-native/baseline/build/vs_toolchain.py", line 577, in <module>
      exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope")
    sys.exit(main())
      ^----------
  File "D:/a/webnn-native/webnn-native/baseline/build/vs_toolchain.py", line 573, in main
Current dir: D:/a/webnn-native/webnn-native/baseline/out/Release/
    return commands[sys.argv[1]](*sys.argv[2:])
Command: D:/a/webnn-native/depot_tools/bootstrap-2@3_8_10_chromium_23_bin/python/bin/python.exe D:/a/webnn-native/webnn-native/baseline/build/vs_toolchain.py get_toolchain_dir
  File "D:/a/webnn-native/webnn-native/baseline/build/vs_toolchain.py", line 550, in GetToolchainDir
Returned 1.
    runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs()
See //build/toolchain/win/BUILD.gn:8:1: whence it was imported.
  File "D:/a/webnn-native/webnn-native/baseline/build/vs_toolchain.py", line 93, in SetEnvironmentAndGetRuntimeDllDirs
import("//build/config/win/visual_studio_version.gni")
    os.environ['GYP_MSVS_OVERRIDE_PATH'] = DetectVisualStudioPath()
^----------------------------------------------------
  File "D:/a/webnn-native/webnn-native/baseline/build/vs_toolchain.py", line 184, in DetectVisualStudioPath
See //BUILD.gn:19:1: which caused the file to be included.
    version_as_year = GetVisualStudioVersion()
group("all") {
  File "D:/a/webnn-native/webnn-native/baseline/build/vs_toolchain.py", line [17](https://github.com/webmachinelearning/webnn-native/runs/5298152058?check_suite_focus=true#step:9:17)4, in GetVisualStudioVersion
^-------------
    ' Supported versions are: %s.' % supported_versions_str)
Exception: No supported Visual Studio can be found. Supported versions are: 16.0 (2019), 15.0 (2017).

the root cause is that Windows Server 2022 is with Visual Studio 2022.

I will configure CI with Windows Server 2019 first to let CI run PASS.

I checked that the latest chromium/src/build repo has supported VS2022 by vs_toolchain.py script,

@fujunwei @huningxin Any suggestion for upgrading chromium/src/build of DEPS file?