action.yml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. name: 'Fix Sync'
  2. description: 'Checks out Electron and stores it in the AKS Cache'
  3. inputs:
  4. target-arch:
  5. description: 'Target arch'
  6. required: true
  7. target-platform:
  8. description: 'Target platform'
  9. required: true
  10. runs:
  11. using: "composite"
  12. steps:
  13. - name: Fix Sync
  14. shell: bash
  15. # This step is required to correct for differences between "gclient sync"
  16. # on Linux and the expected state. This requires:
  17. # 1. Fixing Clang Install (wrong binary)
  18. # 2. Fixing esbuild (wrong binary)
  19. # 3. Fixing rustc (wrong binary)
  20. # 4. Fixing gn (wrong binary)
  21. # 5. Fix reclient (wrong binary)
  22. # 6. Fixing dsymutil (wrong binary)
  23. # 7. Ensuring we are using the correct ninja and adding it to PATH
  24. # 8. Fixing angle (wrong remote)
  25. run : |
  26. SEDOPTION="-i"
  27. if [ "${{ inputs.target-platform }}" = "macos" ]; then
  28. SEDOPTION="-i ''"
  29. rm -rf src/third_party/llvm-build
  30. python3 src/tools/clang/scripts/update.py
  31. echo 'infra/3pp/tools/esbuild/${platform}' `gclient getdep --deps-file=src/third_party/devtools-frontend/src/DEPS -r 'third_party/esbuild:infra/3pp/tools/esbuild/${platform}'` > esbuild_ensure_file
  32. # Remove extra output from calling gclient getdep which always calls update_depot_tools
  33. sed -i '' "s/Updating depot_tools... //g" esbuild_ensure_file
  34. cipd ensure --root src/third_party/devtools-frontend/src/third_party/esbuild -ensure-file esbuild_ensure_file
  35. rm -rf src/third_party/rust-toolchain
  36. python3 src/tools/rust/update_rust.py
  37. # Prevent calling gclient getdep which always calls update_depot_tools
  38. echo 'gn/gn/mac-${arch}' `gclient getdep --deps-file=src/DEPS -r 'src/buildtools/mac:gn/gn/mac-${arch}'` > gn_ensure_file
  39. sed -i '' "s/Updating depot_tools... //g" gn_ensure_file
  40. cipd ensure --root src/buildtools/mac -ensure-file gn_ensure_file
  41. # Prevent calling gclient getdep which always calls update_depot_tools
  42. echo 'infra/rbe/client/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/buildtools/reclient:infra/rbe/client/${platform}'` > gn_ensure_file
  43. sed -i '' "s/Updating depot_tools... //g" gn_ensure_file
  44. cipd ensure --root src/buildtools/reclient -ensure-file gn_ensure_file
  45. python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
  46. if [ "${{ inputs.target-arch }}" == "arm64" ]; then
  47. DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.arm64.sha1
  48. else
  49. DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.x64.sha1
  50. fi
  51. python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
  52. fi
  53. echo 'infra/3pp/tools/ninja/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/third_party/ninja:infra/3pp/tools/ninja/${platform}'` > ninja_ensure_file
  54. sed $SEDOPTION "s/Updating depot_tools... //g" ninja_ensure_file
  55. cipd ensure --root src/third_party/ninja -ensure-file ninja_ensure_file
  56. echo "$(pwd)/src/third_party/ninja" >> $GITHUB_PATH
  57. cd src/third_party/angle
  58. rm -f .git/objects/info/alternates
  59. git remote set-url origin https://chromium.googlesource.com/angle/angle.git
  60. cp .git/config .git/config.backup
  61. git remote remove origin
  62. mv .git/config.backup .git/config
  63. git fetch