From b2b140f7d33643f78282d9111dfb4d8ca2f8adb0 Mon Sep 17 00:00:00 2001 From: Donovan Hutchence Date: Thu, 18 Sep 2025 16:34:51 +0100 Subject: [PATCH 1/2] latest --- .github/workflows/build.yml | 2 +- build/build.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 15d273f..5d718cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,7 +80,7 @@ jobs: if: startsWith(matrix.config.os, 'windows') uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 with: - s dk-version: 26100 + sdk-version: 26100 - name: Install dependencies on ubuntu if: startsWith(matrix.config.name, 'Ubuntu') diff --git a/build/build.js b/build/build.js index 9e020bf..84dc536 100644 --- a/build/build.js +++ b/build/build.js @@ -10,6 +10,7 @@ const kDepotToolsPath = path.join(kCwd, 'third_party', 'depot_tools'); const kDawnPath = `${kCwd}/third_party/dawn`; const kOutDir = 'out/cmake-release'; const kBuildPath = `${kDawnPath}/${kOutDir}` +const kConfig = process.env.CMAKE_BUILD_TYPE ?? 'Release'; const isMac = process.platform === 'darwin'; const isWin = process.platform === 'win32'; @@ -31,7 +32,7 @@ async function compile() { await processThenRestoreCWD(async () => { process.chdir(kBuildPath); if (isWin) { - await execute('cmake', ['--build', '.', '--target', 'dawn_node']) + await execute('cmake', ['--build', '.', '--target', 'dawn_node', '--config', kConfig]); } else { await execute('ninja', ['dawn.node']); } @@ -56,7 +57,7 @@ async function createProject() { ...addElemIf(!isWin, '-GNinja'), '-DDAWN_BUILD_NODE_BINDINGS=1', '-DDAWN_USE_X11=OFF', - `-DCMAKE_BUILD_TYPE=${process.env.CMAKE_BUILD_TYPE ?? 'Release'}`, + `-DCMAKE_BUILD_TYPE=${kConfig}`, ...addElemIf(isWin, '-DCMAKE_SYSTEM_VERSION=10.0.26100.0'), ...addElemIf(isMac, '-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'), ]); @@ -64,7 +65,7 @@ async function createProject() { } async function copyResult(filepath, target) { - const srcFilename = path.join(...[filepath, ...addElemIf(isWin, 'Debug'), 'dawn.node']); + const srcFilename = path.join(...[filepath, ...addElemIf(isWin, 'Release'), 'dawn.node']); const dstFilename = path.join('dist', `${target}.dawn.node`); fs.mkdirSync(path.dirname(dstFilename), {recursive: true}); fs.copyFileSync(srcFilename, dstFilename); From 5e5d003f2fc33f207aaffbd2e291b33f9ed6947d Mon Sep 17 00:00:00 2001 From: Donovan Hutchence Date: Fri, 19 Sep 2025 08:41:08 +0100 Subject: [PATCH 2/2] latest --- build/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.js b/build/build.js index 84dc536..a89764d 100644 --- a/build/build.js +++ b/build/build.js @@ -65,7 +65,7 @@ async function createProject() { } async function copyResult(filepath, target) { - const srcFilename = path.join(...[filepath, ...addElemIf(isWin, 'Release'), 'dawn.node']); + const srcFilename = path.join(...[filepath, ...addElemIf(isWin, kConfig), 'dawn.node']); const dstFilename = path.join('dist', `${target}.dawn.node`); fs.mkdirSync(path.dirname(dstFilename), {recursive: true}); fs.copyFileSync(srcFilename, dstFilename);