Skip to content

Commit ec9a18a

Browse files
committed
add native module loader
1 parent 1bbcf06 commit ec9a18a

19 files changed

+4405
-2066
lines changed

.github/workflows/build.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build Extension
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
include:
16+
- os: ubuntu-latest
17+
platform: linux
18+
- os: windows-latest
19+
platform: win32
20+
- os: macos-latest
21+
platform: darwin
22+
23+
runs-on: ${{ matrix.os }}
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: '16'
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Build native modules
37+
run: node ./scripts/prepare-native-modules.js
38+
39+
- name: Upload build artifacts
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: native-modules-${{ matrix.platform }}
43+
path: build/${{ matrix.platform }}-*
44+
45+
package:
46+
needs: build
47+
runs-on: ubuntu-latest
48+
49+
steps:
50+
- uses: actions/checkout@v3
51+
52+
- name: Setup Node.js
53+
uses: actions/setup-node@v3
54+
with:
55+
node-version: '16'
56+
57+
- name: Install dependencies
58+
run: npm ci
59+
60+
- name: Download all artifacts
61+
uses: actions/download-artifact@v3
62+
with:
63+
path: build
64+
65+
- name: Reorganize artifacts
66+
run: |
67+
mkdir -p build/win32-x64
68+
mkdir -p build/darwin-x64
69+
mkdir -p build/darwin-arm64
70+
mkdir -p build/linux-x64
71+
72+
# Move artifacts to their correct locations
73+
find build/native-modules-win32 -name "*.node" -exec cp {} build/win32-x64/ \;
74+
find build/native-modules-darwin -name "*.node" -exec cp {} build/darwin-x64/ \;
75+
find build/native-modules-linux -name "*.node" -exec cp {} build/linux-x64/ \;
76+
77+
- name: Package extension
78+
run: npx vsce package
79+
80+
- name: Upload VSIX
81+
uses: actions/upload-artifact@v3
82+
with:
83+
name: vibe-coder-extension
84+
path: "*.vsix"

.vscodeignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ vsc-extension-quickstart.md
1212
**/*.map
1313
**/*.ts
1414
**/.vscode-test.*
15+
!node_modules/node-microphone/**
16+
!node_modules/speaker/**
17+
!node_modules/speex-resampler/**
18+
!build/**
19+
!native-module-loader.js

0 commit comments

Comments
 (0)