Browse Source

Add depot_tools to PATH in test

Shelley Vohr 1 year ago
parent
commit
05b902fc93
1 changed files with 19 additions and 2 deletions
  1. 19 2
      .github/workflows/mac-build.yml

+ 19 - 2
.github/workflows/mac-build.yml

@@ -50,7 +50,7 @@ jobs:
       run: |
         cd src/electron
         node script/yarn install
-    - name: Get Depot Tools 
+    - name: Get Depot Tools
       run: |
         git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
         if [ "`uname`" == "Darwin" ]; then
@@ -171,7 +171,7 @@ jobs:
       run: |
         cd src/electron
         node script/yarn install
-    - name: Get Depot Tools 
+    - name: Get Depot Tools
       run: |
         git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
         if [ "`uname`" == "Darwin" ]; then
@@ -460,6 +460,23 @@ jobs:
       run: |
         cd src/electron
         node script/yarn install
+    - name: Get Depot Tools
+      run: |
+        git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
+        if [ "`uname`" == "Darwin" ]; then
+          # remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems
+          sed -i '' '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
+        else
+          sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
+          # Remove swift-format dep from cipd on macOS until we send a patch upstream.
+          cd depot_tools
+          git apply --3way ../src/electron/.github/workflows/config/gclient.diff
+        fi
+        # Ensure depot_tools does not update.
+        test -d depot_tools && cd depot_tools
+        touch .disable_auto_update
+    - name: Add Depot Tools to PATH
+      run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
     - name: Download Generated Artifacts
       uses: actions/download-artifact@v4
       with: