3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 04:03:39 +00:00

automatically release wasm build (#5997)

This commit is contained in:
Kevin Gibbons 2022-04-24 10:06:36 -07:00 committed by GitHub
parent 24baf56e27
commit dc18b47967
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View file

@ -2,6 +2,8 @@ name: WebAssembly Publish
on: on:
workflow_dispatch: workflow_dispatch:
release:
types: [published]
defaults: defaults:
run: run:

View file

@ -56,7 +56,6 @@ import { init, Z3_error_code } from './build/node-wrapper';
} }
console.log('confirming error messages work:', Z3.get_error_msg(ctx, Z3.get_error_code(ctx))); console.log('confirming error messages work:', Z3.get_error_msg(ctx, Z3.get_error_code(ctx)));
Z3.dec_ref(ctx, strAst); Z3.dec_ref(ctx, strAst);
Z3.del_context(ctx); Z3.del_context(ctx);

View file

@ -422,9 +422,9 @@ export async function init(initModule: any) {
return ctx; return ctx;
}, },
${functions ${functions
.map(wrapFunction) .map(wrapFunction)
.filter(f => f != null) .filter(f => f != null)
.join(',\n')} .join(',\n')}
} }
}; };

View file

@ -121,7 +121,6 @@ for (let file of files) {
throw new Error(`extra text in parameter list ${JSON.stringify(text)}`); throw new Error(`extra text in parameter list ${JSON.stringify(text)}`);
} }
if (name in defApis) { if (name in defApis) {
throw new Error(`multiple defApi calls for ${name}`); throw new Error(`multiple defApi calls for ${name}`);
} }
@ -132,11 +131,11 @@ for (let file of files) {
types[match.groups.type] = match.groups.type; types[match.groups.type] = match.groups.type;
} }
// we don't have to pre-populate the types map with closure types // we don't have to pre-populate the types map with closure types
// use the Z3_DECLARE_CLOSURE to identify closure types // use the Z3_DECLARE_CLOSURE to identify closure types
// for (let match of contents.matchAll(/Z3_DECLARE_CLOSURE\((?<type>[A-Za-z0-9_]+),/g)) { // for (let match of contents.matchAll(/Z3_DECLARE_CLOSURE\((?<type>[A-Za-z0-9_]+),/g)) {
// types[match.groups.type] = match.groups.type // types[match.groups.type] = match.groups.type
// } // }
// parse enum declarations // parse enum declarations
for (let idx = 0; idx < contents.length; ) { for (let idx = 0; idx < contents.length; ) {