Skip to content

Commit b914258

Browse files
committed
WIP: JetBrains integration
1 parent 8fee312 commit b914258

File tree

210 files changed

+2076707
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+2076707
-73
lines changed
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
name: JetBrains Integration Build
2+
3+
on:
4+
push:
5+
paths:
6+
- 'jetbrains/**'
7+
- 'deps/patches/vscode/jetbrains.patch'
8+
- '.github/workflows/jetbrains-build.yml'
9+
pull_request:
10+
paths:
11+
- 'jetbrains/**'
12+
- 'deps/patches/vscode/jetbrains.patch'
13+
- '.github/workflows/jetbrains-build.yml'
14+
workflow_dispatch:
15+
16+
jobs:
17+
check-dependencies:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
submodules: recursive
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20.19.2'
29+
30+
- name: Setup Java
31+
uses: actions/setup-java@v4
32+
with:
33+
distribution: 'temurin'
34+
java-version: '17'
35+
36+
- name: Check JetBrains dependencies
37+
run: node jetbrains/scripts/check-dependencies.js
38+
39+
build-host:
40+
runs-on: ubuntu-latest
41+
needs: check-dependencies
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
with:
46+
submodules: recursive
47+
48+
- name: Setup Node.js
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: '20.19.2'
52+
53+
- name: Setup pnpm
54+
uses: pnpm/action-setup@v4
55+
with:
56+
version: 10.8.1
57+
run_install: false
58+
59+
- name: Get pnpm store directory
60+
shell: bash
61+
run: |
62+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
63+
64+
- name: Setup pnpm cache
65+
uses: actions/cache@v4
66+
with:
67+
path: ${{ env.STORE_PATH }}
68+
key: ${{ runner.os }}-pnpm-store-jetbrains-${{ hashFiles('**/pnpm-lock.yaml') }}
69+
restore-keys: |
70+
${{ runner.os }}-pnpm-store-jetbrains-
71+
72+
- name: Install host dependencies
73+
working-directory: jetbrains/host
74+
run: npm install
75+
76+
- name: Apply VSCode patches
77+
working-directory: jetbrains/host
78+
run: npm run deps:patch
79+
continue-on-error: true
80+
81+
- name: Build host
82+
working-directory: jetbrains/host
83+
run: npm run build
84+
85+
- name: Upload host artifacts
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: jetbrains-host-build
89+
path: jetbrains/host/dist/
90+
91+
build-plugin:
92+
runs-on: ubuntu-latest
93+
needs: check-dependencies
94+
steps:
95+
- name: Checkout repository
96+
uses: actions/checkout@v4
97+
98+
- name: Setup Java
99+
uses: actions/setup-java@v4
100+
with:
101+
distribution: 'temurin'
102+
java-version: '17'
103+
104+
- name: Setup Gradle
105+
uses: gradle/actions/setup-gradle@v3
106+
107+
- name: Cache Gradle packages
108+
uses: actions/cache@v4
109+
with:
110+
path: |
111+
~/.gradle/caches
112+
~/.gradle/wrapper
113+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
114+
restore-keys: |
115+
${{ runner.os }}-gradle-
116+
117+
- name: Build plugin
118+
working-directory: jetbrains/plugin
119+
run: ./gradlew buildPlugin
120+
121+
- name: Run plugin tests
122+
working-directory: jetbrains/plugin
123+
run: ./gradlew test
124+
125+
- name: Upload plugin artifacts
126+
uses: actions/upload-artifact@v4
127+
with:
128+
name: jetbrains-plugin-build
129+
path: jetbrains/plugin/build/distributions/*.zip
130+
131+
test-integration:
132+
runs-on: ubuntu-latest
133+
needs: [build-host, build-plugin]
134+
if: github.event_name == 'pull_request'
135+
steps:
136+
- name: Checkout repository
137+
uses: actions/checkout@v4
138+
139+
- name: Download host artifacts
140+
uses: actions/download-artifact@v4
141+
with:
142+
name: jetbrains-host-build
143+
path: jetbrains/host/dist/
144+
145+
- name: Download plugin artifacts
146+
uses: actions/download-artifact@v4
147+
with:
148+
name: jetbrains-plugin-build
149+
path: jetbrains/plugin/build/distributions/
150+
151+
- name: Setup Node.js
152+
uses: actions/setup-node@v4
153+
with:
154+
node-version: '20.19.2'
155+
156+
- name: Run integration tests
157+
run: |
158+
echo "Integration tests would run here"
159+
# Add actual integration test commands when available
160+
161+
create-release:
162+
runs-on: ubuntu-latest
163+
needs: [build-host, build-plugin]
164+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
165+
steps:
166+
- name: Checkout repository
167+
uses: actions/checkout@v4
168+
169+
- name: Download host artifacts
170+
uses: actions/download-artifact@v4
171+
with:
172+
name: jetbrains-host-build
173+
path: jetbrains/host/dist/
174+
175+
- name: Download plugin artifacts
176+
uses: actions/download-artifact@v4
177+
with:
178+
name: jetbrains-plugin-build
179+
path: jetbrains/plugin/build/distributions/
180+
181+
- name: Create platform.zip
182+
run: |
183+
cd jetbrains
184+
zip -r platform.zip host/dist plugin/build/distributions
185+
echo "Platform package created"
186+
187+
- name: Upload platform package
188+
uses: actions/upload-artifact@v4
189+
with:
190+
name: jetbrains-platform-package
191+
path: jetbrains/platform.zip
192+
retention-days: 30

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "deps/vscode"]
2+
path = deps/vscode
3+
url = https://github.com/microsoft/vscode.git
4+
ignore = dirty

0 commit comments

Comments
 (0)