diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d3a1b1..b20da3e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,6 +69,10 @@ jobs: if: startsWith(matrix.config.os, 'windows') uses: microsoft/setup-msbuild@v2 + - name: Add setup Windows SDK + if: startsWith(matrix.config.os, 'windows') + uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 + - name: Install dependencies on ubuntu if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC') run: | @@ -80,7 +84,7 @@ jobs: - name: Install dependencies on macos if: startsWith(matrix.config.os, 'macos') run: | - brew install cmake + brew install cmake libxrandr-dev libxinerama-dev libxcursor-dev mesa-common-dev libx11-xcb-dev pkg-config nodejs npm cmake --version - name: Build diff --git a/test/tests/basic-tests.js b/test/tests/basic-tests.js index d90e336..ac3d2f9 100644 --- a/test/tests/basic-tests.js +++ b/test/tests/basic-tests.js @@ -1,7 +1,12 @@ import { createRequire } from 'module'; const require = createRequire(import.meta.url); -const { create, globals } = require(`${process.cwd()}/third_party/dawn/out/cmake-release/dawn.node`); +const isWin = process.platform === 'win32'; +const dawnNodePath = isWin + ? `${process.cwd()}/third_party/dawn/out/cmake-release/gen/node/NapiSymbols.def`.replaceAll('\\', '/') + : `${process.cwd()}/third_party/dawn/out/cmake-release/dawn.node`; + +const { create, globals } = require(dawnNodePath); Object.assign(globalThis, globals); const navigator = { gpu: create([]) };