💚 download pre-built esbuilt for apple silicon

This commit is contained in:
Nate Sesti 2023-12-14 19:27:58 -08:00
parent 237b2e766e
commit 7f73d3707c
2 changed files with 20 additions and 1 deletions

View file

@ -91,12 +91,26 @@ jobs:
cd core
npm ci --legacy-peer-deps
# 3. Run tests for the extension
# 2.5. Pre package and download anything that needs to be built on Apple Silicon
- name: Prepare the extension
run: |
cd extensions/vscode
npm run prepackage
- name: Download node_modules for esbuild on Apple Silicon
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
run: curl -o extensions/vscode/out/node_modules https://continue-server-binaries.s3.us-west-1.amazonaws.com/node_modules.zip
- name: Unzip node_modules for esbuild on Apple Silicon
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
run: unzip extensions/vscode/out/node_modules
- name: Remove node_modules.zip for esbuild on Apple Silicon
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
run: rm extensions/vscode/out/node_modules.zip
# 3. Run tests for the extension
# - name: Install Xvfb for Linux and run tests
# run: |
# sudo apt-get install -y xvfb # Install Xvfb

View file

@ -18,6 +18,11 @@ const fs = require("fs");
},
});
// Return instead of copying if on ARM Mac
if (process.platform === "darwin" && process.arch === "arm64") {
return;
}
fs.mkdirSync("out/node_modules", { recursive: true });
ncp.ncp("node_modules/esbuild", "out/node_modules/esbuild", function (err) {