Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ jobs:
./windows/mingw_include_extra.sh
export MINGW_WINDOWS_PATH=$(./windows/mingw_windows_path.sh)
export PATH="/mingw64/bin:/usr/bin:$PATH"
npm install --build-from-source
npm install -g pnpm@11
pnpm install --ignore-scripts
pnpm run build:full

- name: Run tests
run: |
Expand Down Expand Up @@ -129,8 +131,13 @@ jobs:
# Install & cache packages
- run: .github/workflows/install.sh

# Install & Build
- run: npm install --build-from-source
# Install & Build. The source build is explicit (the install lifecycle
# script is skipped): pnpm does not forward --build-from-source or
# inherited npm_config_* env vars to lifecycle scripts, so a plain
# `pnpm install` would silently fetch a stale S3 prebuilt instead.
- run: npm install -g pnpm@11
- run: pnpm install --ignore-scripts
- run: pnpm run build:full

# Run the CI script (tests & publishing)
- run: ./scripts/ci.sh
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test-windows-prebuilt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ jobs:
./windows/mingw_include_extra.sh
export MINGW_WINDOWS_PATH=$(./windows/mingw_windows_path.sh)
export PATH="/mingw64/bin:/usr/bin:$PATH"
npm install --build-from-source
npm install -g pnpm@11
pnpm install --ignore-scripts
pnpm run build:full

- name: Bundle GTK4 runtime (DLLs + typelibs + data)
run: |
Expand Down Expand Up @@ -111,7 +113,9 @@ jobs:
# This is what a user gets when a prebuilt is available: no compiler runs.
- name: Install JS deps (no build)
shell: bash
run: npm install --ignore-scripts
run: |
npm install -g pnpm@11
pnpm install --ignore-scripts

- name: Download prebuilt
uses: actions/download-artifact@v4
Expand Down
13 changes: 8 additions & 5 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ cd node-gtk
# if MSYS2 is NOT installed in C:/msys64 run:
export MINGW_WINDOWS_PATH=$(./windows/mingw_windows_path.sh)

# node-gtk uses pnpm for development
npm install -g pnpm

# first run might take a while
GYP_MSVS_VERSION=2017 npm install
GYP_MSVS_VERSION=2017 pnpm install
```

The `GYP_MSVS_VERSION` could be 2017 or above.
Expand All @@ -141,7 +144,7 @@ If not found, you need to export the platform related binary path:
```sh
# example for the 32bit version
export PATH="/mingw32/bin:$PATH"
npm run install
pnpm run install
```

This should do the trick. You can also check if there is any python at all via `pacman -Qs python`.
Expand All @@ -165,7 +168,7 @@ Try <kbd>Cmd</kbd> + <kbd>Tab</kbd> if you don't see it.
Run the test suite with:

```sh
npm test
pnpm test
```

The suite includes `marshalling__*.js` and `regress__*.js` tests that exercise
Expand All @@ -174,7 +177,7 @@ the GObject-introspection test libraries — **GIMarshallingTests**, **Regress**
and **Utility**.

Those libraries are provided by `scripts/build-test-fixtures.js`, which runs
automatically before `npm test`. To keep the API identical on every machine, it
automatically before `pnpm test`. To keep the API identical on every machine, it
always compiles them from a single pinned revision of the upstream
[`gobject-introspection-tests`](https://gitlab.gnome.org/GNOME/gobject-introspection-tests)
repo (downloaded once and cached), rather than relying on whatever version a
Expand All @@ -185,7 +188,7 @@ skip rather than fail. The generated fixtures live in `tests/gi-fixtures/`
To (re)build manually:

```sh
npm run build:test-fixtures # build if missing
pnpm run build:test-fixtures # build if missing
node scripts/build-test-fixtures.js --force --verbose # force a fresh rebuild
```

Expand Down
Loading
Loading