Jelajahi Sumber

fix: 32bits builds (#1535)

Baptiste Augrain 2 tahun lalu
induk
melakukan
443107bfa5
4 mengubah file dengan 31 tambahan dan 19 penghapusan
  1. 5 5
      .github/workflows/stable-linux.yml
  2. 1 1
      .github/workflows/stable-windows.yml
  3. 1 1
      .nvmrc
  4. 24 12
      prepare_vscode.sh

+ 5 - 5
.github/workflows/stable-linux.yml

@@ -84,7 +84,7 @@ jobs:
       - name: Setup Node.js environment
         uses: actions/setup-node@v3
         with:
-          node-version: 16.17
+          node-version: '16.20'
 
       - name: Install Yarn
         run: npm install -g yarn
@@ -129,9 +129,9 @@ jobs:
         - vscode_arch: arm64
           npm_arch: arm64
           image: vscodium/vscodium-linux-build-agent:buster-arm64
-        # - vscode_arch: armhf
-        #   npm_arch: armv7l
-        #   image: vscodium/vscodium-linux-build-agent:buster-armhf
+        - vscode_arch: armhf
+          npm_arch: arm
+          image: vscodium/vscodium-linux-build-agent:buster-armhf
     container:
       image: ${{ matrix.image }}
       env:
@@ -154,7 +154,7 @@ jobs:
       - name: Setup Node.js environment
         uses: actions/setup-node@v3
         with:
-          node-version: 16.17
+          node-version: '16.20'
 
       - name: Install Yarn
         run: npm install -g yarn

+ 1 - 1
.github/workflows/stable-windows.yml

@@ -41,7 +41,7 @@ jobs:
       matrix:
         vscode_arch:
           - x64
-          # - ia32
+          - ia32
           - arm64
     outputs:
       RELEASE_VERSION: ${{ env.RELEASE_VERSION }}

+ 1 - 1
.nvmrc

@@ -1 +1 @@
-16.17
+16.20

+ 24 - 12
prepare_vscode.sh

@@ -54,21 +54,33 @@ done
 
 set -x
 
+export ELECTRON_SKIP_BINARY_DOWNLOAD=1
+export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
+
 if [[ "${OS_NAME}" == "osx" ]]; then
-  CHILD_CONCURRENCY=1 yarn --frozen-lockfile
+  CHILD_CONCURRENCY=1 yarn --frozen-lockfile --network-timeout 180000
+
   yarn postinstall
-elif [[ "${npm_config_arch}" == "armv7l" || "${npm_config_arch}" == "ia32" ]]; then
-  # node-gyp@9.0.0 shipped with node@16.15.0 starts using config.gypi
-  # from the custom headers path if dist-url option was set, instead of
-  # using the config value from the process. Electron builds with pointer compression
-  # enabled for x64 and arm64, but incorrectly ships a single copy of config.gypi
-  # with v8_enable_pointer_compression option always set for all target architectures.
-  # We use the force_process_config option to use the config.gypi from the
-  # nodejs process executing npm for 32-bit architectures.
-  export npm_config_force_process_config="true"
-  CHILD_CONCURRENCY=1 yarn --frozen-lockfile
 else
-  CHILD_CONCURRENCY=1 yarn --frozen-lockfile
+  if [[ "${npm_config_arch}" == "arm" ]]; then
+    export npm_config_arm_version=7
+  elif [[ "${npm_config_arch}" == "ia32" ]]; then
+    # TODO: Should be replaced with upstream URL once https://github.com/nodejs/node-gyp/pull/2825
+    # gets merged.
+    rm -rf .build/node-gyp
+    mkdir -p .build/node-gyp
+    cd .build/node-gyp
+
+    git clone https://github.com/rzhao271/node-gyp.git .
+    git checkout 102b347da0c92c29f9c67df22e864e70249cf086
+    npm install
+
+    export npm_config_node_gyp=`pwd`
+
+    cd ../..
+  fi
+
+  CHILD_CONCURRENCY=1 yarn --frozen-lockfile --network-timeout 180000
 fi
 
 setpath() {