appveyor-bake.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # The config is used to bake appveyor images, not for running CI jobs.
  2. # The config expects the following environment variables to be set:
  3. # - "APPVEYOR_BAKE_IMAGE" e.g. 'electron-99.0.4767.0'. Name of the image to be baked.
  4. # Typically named after the Chromium version on which the image is built.
  5. # This can be set dynamically in the prepare-appveyor script.
  6. version: 1.0.{build}
  7. build_cloud: electronhq-16-core
  8. image: e-112.0.5615.29
  9. environment:
  10. GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
  11. ELECTRON_OUT_DIR: Default
  12. ELECTRON_ENABLE_STACK_DUMPING: 1
  13. MOCHA_REPORTER: mocha-multi-reporters
  14. MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap
  15. GOMA_FALLBACK_ON_AUTH_FAILURE: true
  16. DEPOT_TOOLS_WIN_TOOLCHAIN: 0
  17. PYTHONIOENCODING: UTF-8
  18. # The following lines are needed when baking from a completely new image (eg MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest via image: base-windows-server2019)
  19. # init:
  20. # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
  21. # - appveyor version
  22. # - ps: $ErrorActionPreference = 'Stop'
  23. # - ps: 'Write-Host "OS Build: $((Get-CimInstance Win32_OperatingSystem).BuildNumber)"'
  24. # clone_folder: '%USERPROFILE%\image-bake-scripts'
  25. # clone_script:
  26. # - ps: Invoke-WebRequest "https://github.com/appveyor/build-images/archive/1f90d94e74c8243c909a09b994e527584dfcb838.zip" -OutFile "$env:temp\scripts.zip"
  27. # - ps: Expand-Archive -Path "$env:temp\scripts.zip" -DestinationPath "$env:temp\scripts" -Force
  28. # - ps: Copy-Item -Path "$env:temp\scripts\build-images-1f90d94e74c8243c909a09b994e527584dfcb838\scripts\Windows\*" -Destination $env:APPVEYOR_BUILD_FOLDER -Recurse
  29. build_script:
  30. # The following lines are needed when baking from a completely new image (eg MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest via image: base-windows-server2019)
  31. # - ps: .\init_server.ps1
  32. # - ps: .\extend_system_volume.ps1
  33. # # Restart VM
  34. # - ps: Start-Sleep -s 5; Restart-Computer
  35. # - ps: Start-Sleep -s 5
  36. # - appveyor version
  37. # - ps: .\install_path_utils.ps1
  38. # - ps: .\install_powershell_core.ps1
  39. # - ps: .\install_powershell_get.ps1
  40. # - ps: .\install_7zip.ps1
  41. # - ps: .\install_chocolatey.ps1
  42. # - ps: .\install_webpi.ps1
  43. # - ps: .\install_nuget.ps1
  44. # - ps: .\install_pstools.ps1
  45. # - ps: .\install_git.ps1
  46. # - ps: .\install_git_lfs.ps1
  47. # # Restart VM
  48. # - ps: Start-Sleep -s 5; Restart-Computer
  49. # - ps: Start-Sleep -s 5
  50. # END LINES FOR COMPLETELY NEW IMAGE
  51. - git config --global core.longpaths true
  52. - ps: >-
  53. if (-not (Test-Path -Path C:\projects\src)) {
  54. New-Item -Path C:\projects\src -ItemType Directory
  55. }
  56. - cd C:\projects\
  57. - git clone -q --branch=%APPVEYOR_REPO_BRANCH% https://github.com/electron/electron.git C:\projects\src\electron
  58. - git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
  59. - ps: $env:PATH="$pwd\depot_tools;$env:PATH"
  60. - update_depot_tools.bat
  61. # Uncomment the following line if windows deps change
  62. # - src\electron\script\setup-win-for-dev.bat
  63. - >-
  64. gclient config
  65. --name "src\electron"
  66. --unmanaged
  67. %GCLIENT_EXTRA_ARGS%
  68. "https://github.com/electron/electron"
  69. - ps: cd src\electron
  70. - ps: node script\generate-deps-hash.js
  71. - ps: $depshash = Get-Content .\.depshash -Raw
  72. - ps: Copy-Item -path .\.depshash -destination ..\.depshash
  73. - ps: cd ..\..
  74. - gclient sync --with_branch_heads --with_tags --nohooks
  75. - ps: regsvr32 /s "C:\Program Files\Microsoft Visual Studio\2022\Community\DIA SDK\bin\amd64\msdia140.dll"
  76. - ps: set vs2022_install="C:\Program Files\Microsoft Visual Studio\2022\Community"
  77. # The following lines are needed when baking from a completely new image (eg MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest via image: base-windows-server2019)
  78. # # Restart VM
  79. # - ps: Start-Sleep -s 5; Restart-Computer
  80. # - ps: Start-Sleep -s 5
  81. # - cd %USERPROFILE%\image-bake-scripts
  82. # - appveyor version
  83. # - ps: .\optimize_dotnet_runtime.ps1
  84. # - ps: .\disable_windows_background_services.ps1
  85. # - ps: .\enforce_windows_firewall.ps1
  86. # - ps: .\cleanup_windows.ps1
  87. # END LINES FOR COMPLETELY NEW IMAGE
  88. on_image_bake:
  89. - ps: >-
  90. echo "Baking image: $env:APPVEYOR_BAKE_IMAGE at dir $PWD"
  91. - ps: Remove-Item -Recurse -Force C:\projects\depot_tools
  92. - ps: Remove-Item -Recurse -Force C:\projects\src\electron
  93. # Uncomment these lines and set APPVEYOR_RDP_PASSWORD in project settings to enable RDP after bake is done
  94. # # on_finish:
  95. # - ps: >-
  96. # $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))