fix CI
This commit is contained in:
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -20,6 +20,8 @@ jobs:
|
|||||||
node-version: 18
|
node-version: 18
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
|
apt update
|
||||||
|
apt-get install -y zip
|
||||||
pack install contrib
|
pack install contrib
|
||||||
make
|
make
|
||||||
cd playground
|
cd playground
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { shim } from "./emul";
|
|||||||
import { archive, preload } from "./preload";
|
import { archive, preload } from "./preload";
|
||||||
import { CompileReq, CompileRes } from "./types";
|
import { CompileReq, CompileRes } from "./types";
|
||||||
|
|
||||||
const handleMessage = async function (ev: {data: CompileReq}) {
|
const handleMessage = async function (ev: { data: CompileReq }) {
|
||||||
console.log("message", ev.data);
|
console.log("message", ev.data);
|
||||||
await preload;
|
await preload;
|
||||||
shim.archive = archive;
|
shim.archive = archive;
|
||||||
@@ -27,13 +27,13 @@ const handleMessage = async function (ev: {data: CompileReq}) {
|
|||||||
shim.stdout += "\n" + String(e);
|
shim.stdout += "\n" + String(e);
|
||||||
}
|
}
|
||||||
let duration = +new Date() - start;
|
let duration = +new Date() - start;
|
||||||
console.log(`shim.process ${fn} in ${duration} ms`);
|
console.log(`process ${fn} in ${duration} ms`);
|
||||||
let javascript = new TextDecoder().decode(shim.files[outfile]);
|
let javascript = new TextDecoder().decode(shim.files[outfile]);
|
||||||
let output = shim.stdout;
|
let output = shim.stdout;
|
||||||
sendResponse({ javascript, output, duration });
|
sendResponse({ javascript, output, duration });
|
||||||
};
|
};
|
||||||
|
|
||||||
// hooks for worker.html to override
|
// hooks for worker.html to override
|
||||||
let sendResponse : (_: CompileRes) => void = postMessage;
|
let sendResponse: (_: CompileRes) => void = postMessage;
|
||||||
onmessage = handleMessage;
|
onmessage = handleMessage;
|
||||||
importScripts("newt.js");
|
importScripts("newt.js");
|
||||||
|
|||||||
Reference in New Issue
Block a user