💚 download pre-built esbuilt for apple silicon
This commit is contained in:
parent
237b2e766e
commit
7f73d3707c
2 changed files with 20 additions and 1 deletions
16
.github/workflows/preview.yaml
vendored
16
.github/workflows/preview.yaml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue