feat: establish reproducible FreeCAD web compatibility baseline
This commit is contained in:
@@ -19,6 +19,9 @@ const sourceCppFiles = (await run('git', ['-C', sourcePath, 'ls-tree', '-r', '--
|
||||
if (sourceCppFiles.length !== 0) throw new Error(`Bitbybit source snapshot unexpectedly contains native source files (${sourceCppFiles.length}); review the custom binding build inputs.`)
|
||||
const declarationPath = resolve(root, 'node_modules/@bitbybit-dev/occt/bitbybit-dev-occt/bitbybit-dev-occt.d.ts')
|
||||
const declarations = await readFile(declarationPath, 'utf8')
|
||||
const wasmArtifactPath = resolve(root, matrix.bitbybitSource.wasmArtifact.path)
|
||||
const wasmArtifactHash = createHash('sha256').update(await readFile(wasmArtifactPath)).digest('hex')
|
||||
if (wasmArtifactHash !== matrix.bitbybitSource.wasmArtifact.sha256) throw new Error(`Bitbybit OCCT WASM hash mismatch: expected ${matrix.bitbybitSource.wasmArtifact.sha256}, got ${wasmArtifactHash}.`)
|
||||
|
||||
const interfaceBody = (name) => {
|
||||
const match = declarations.match(new RegExp(`export interface ${name} extends ClassHandle \\{([\\s\\S]*?)\\n\\}`))
|
||||
@@ -57,6 +60,7 @@ console.log(JSON.stringify({
|
||||
version: packageJson.version,
|
||||
sourceCommit,
|
||||
sourceForm: matrix.bitbybitSource.sourceForm,
|
||||
wasmArtifact: { status: matrix.bitbybitSource.wasmArtifact.status, path: matrix.bitbybitSource.wasmArtifact.path, sha256: wasmArtifactHash },
|
||||
missingBuildInputs: matrix.bitbybitSource.missingBuildInputs,
|
||||
declarationPath: 'node_modules/@bitbybit-dev/occt/bitbybit-dev-occt/bitbybit-dev-occt.d.ts',
|
||||
nativeBooleanHistory: { generated: false, modified: false, deleted: false },
|
||||
|
||||
Reference in New Issue
Block a user