@@ -129,17 +129,15 @@ jobs:
129129 name : scramjet
130130 path : |
131131 packages/scramjet/packages/core/dist/*
132- frontend :
133- name : Build Frontend
132+
133+ package-validation :
134+ name : Validate Package Structure
134135 runs-on : ubuntu-latest
135- permissions : write-all
136136 needs : [build]
137137
138138 steps :
139139 - name : Checkout code
140140 uses : actions/checkout@v4
141- with :
142- submodules : recursive
143141
144142 - name : Setup pnpm
145143 uses : pnpm/action-setup@v4
@@ -156,65 +154,21 @@ jobs:
156154 - name : Get artifacts
157155 uses : actions/download-artifact@v4
158156 with :
159- name : scramjet
160- path : packages/scramjet/packages/core/dist
161-
162- - name : Build Dreamland
163- run : pnpm build:dreamland
164-
165- # - name: Get Chii submodule commit hash
166- # id: chii-hash
167- # run: echo "hash=$(git submodule status chii | awk '{print $1}')" >> $GITHUB_OUTPUT
168-
169- # - name: Cache Chii build output
170- # id: chii-cache
171- # uses: actions/cache@v4
172- # with:
173- # path: |
174- # chii/public
175- # chii/front_end/dist
176- # key: chii-${{ runner.os }}-${{ steps.chii-hash.outputs.hash }}
177-
178- # - name: Install Depot Tools
179- # if: steps.chii-cache.outputs.cache-hit != 'true'
180- # uses: newkdev/setup-depot-tools@v1.0.1
181-
182- # - name: Initialize Chii front_end
183- # if: steps.chii-cache.outputs.cache-hit != 'true'
184- # run: |
185- # cd chii
186- # pnpm init:front_end
187-
188- # - name: Build Chii
189- # if: steps.chii-cache.outputs.cache-hit != 'true'
190- # run: |
191- # cd chii
192- # pnpm build
193-
194- - name : Build Frontend
195- run : |
196- SKIP_CORE=1 pnpm build
197- VITE_PUTER_BRANDING=1 VITE_ISOLATION_ORIGIN="https://puter.zone" pnpm build:chrome
157+ name : packaged-scramjet
158+ path : packages/scramjet/packages/core
198159
199- - name : Upload Artifact (dist)
200- uses : actions/upload-artifact@v4
201- with :
202- name : frontend
203- path : |
204- ./packages/chrome/dist
160+ - name : Extract package
161+ run : tar xvf mercuryworkshop-scramjet-*.tgz package --strip-components=1
162+ working-directory : packages/scramjet/packages/core
205163
206- - name : Upload pages artifact
207- uses : actions/upload-pages-artifact@v3
208- with :
209- path : " ./packages/chrome/dist"
164+ - name : Run package validation tests
165+ run : pnpm test:package
166+ working-directory : packages/scramjet/packages/core
210167
211- - name : Deploy to github
212- id : deployment
213- uses : actions/deploy-pages@v4
214168 tests :
215169 name : Run Scramjet Tests
216170 runs-on : ubuntu-latest
217- needs : build
171+ needs : [ build, package-validation]
218172 env :
219173 PLAYWRIGHT_BROWSERS_PATH : .playwright-browsers
220174 steps :
@@ -262,7 +216,7 @@ jobs:
262216 rewritertests :
263217 name : " Run Rewriter Tests"
264218 runs-on : ubuntu-latest
265- needs : [build]
219+ needs : [build, package-validation ]
266220
267221 steps :
268222 - name : Checkout code
@@ -290,3 +244,116 @@ jobs:
290244 - name : Run Tests
291245 run : cargo test
292246 working-directory : packages/scramjet/packages/core/rewriter/native
247+
248+ frontend :
249+ name : Build Frontend
250+ runs-on : ubuntu-latest
251+ permissions : write-all
252+ needs : [build, package-validation]
253+
254+ steps :
255+ - name : Checkout code
256+ uses : actions/checkout@v4
257+ with :
258+ submodules : recursive
259+
260+ - name : Setup pnpm
261+ uses : pnpm/action-setup@v4
262+
263+ - name : Setup Node.js
264+ uses : actions/setup-node@v4
265+ with :
266+ node-version : " 22"
267+ cache : " pnpm"
268+
269+ - name : Install dependencies
270+ run : pnpm install
271+
272+ - name : Get artifacts
273+ uses : actions/download-artifact@v4
274+ with :
275+ name : scramjet
276+ path : packages/scramjet/packages/core/dist
277+
278+ - name : Build Dreamland
279+ run : pnpm build:dreamland
280+
281+ # - name: Get Chii submodule commit hash
282+ # id: chii-hash
283+ # run: echo "hash=$(git submodule status chii | awk '{print $1}')" >> $GITHUB_OUTPUT
284+
285+ # - name: Cache Chii build output
286+ # id: chii-cache
287+ # uses: actions/cache@v4
288+ # with:
289+ # path: |
290+ # chii/public
291+ # chii/front_end/dist
292+ # key: chii-${{ runner.os }}-${{ steps.chii-hash.outputs.hash }}
293+
294+ # - name: Install Depot Tools
295+ # if: steps.chii-cache.outputs.cache-hit != 'true'
296+ # uses: newkdev/setup-depot-tools@v1.0.1
297+
298+ # - name: Initialize Chii front_end
299+ # if: steps.chii-cache.outputs.cache-hit != 'true'
300+ # run: |
301+ # cd chii
302+ # pnpm init:front_end
303+
304+ # - name: Build Chii
305+ # if: steps.chii-cache.outputs.cache-hit != 'true'
306+ # run: |
307+ # cd chii
308+ # pnpm build
309+
310+ - name : Build Frontend
311+ run : |
312+ SKIP_CORE=1 pnpm build
313+ VITE_PUTER_BRANDING=1 VITE_ISOLATION_ORIGIN="https://puter.zone" pnpm build:chrome
314+
315+ - name : Upload Artifact (dist)
316+ uses : actions/upload-artifact@v4
317+ with :
318+ name : frontend
319+ path : |
320+ ./packages/chrome/dist
321+
322+ pages :
323+ name : Upload to Github Pages
324+ runs-on : ubuntu-latest
325+ # make sure to add rewritertests and tests, omitting them due to bugs currently
326+ needs : [frontend]
327+ permissions : write-all
328+ if : github.ref == 'refs/heads/main'
329+
330+ steps :
331+ - name : Checkout code
332+ uses : actions/checkout@v4
333+
334+ - name : Setup pnpm
335+ uses : pnpm/action-setup@v4
336+
337+ - name : Setup Node.js
338+ uses : actions/setup-node@v4
339+ with :
340+ node-version : " 22"
341+ cache : " pnpm"
342+
343+ - name : Install dependencies
344+ run : pnpm install
345+
346+ - name : Get artifacts
347+ uses : actions/download-artifact@v4
348+ with :
349+ name : frontend
350+ path : " ./packages/chrome/dist"
351+
352+ - name : Upload pages artifact
353+ uses : actions/upload-pages-artifact@v3
354+ with :
355+ path : " ./packages/chrome/dist"
356+
357+ - name : Deploy to github
358+ id : deployment
359+ uses : actions/deploy-pages@v4
0 commit comments