Skip to content

Commit ea99fea

Browse files
authored
feat(gyp): update gyp to v0.18.1 (#3039)
* feat(gyp): update gyp to v0.18.1 * ci: setup ninja * ci: visual-studio job use python 3.12
1 parent c495083 commit ea99fea

34 files changed

+3669
-89
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
python-version: ${{ matrix.python }}
116116
env:
117117
PYTHON_VERSION: ${{ matrix.python }} # Why do this?
118+
- uses: seanmiddleditch/gha-setup-ninja@v4
118119
- name: Install Dependencies
119120
run: |
120121
npm install

.github/workflows/visual-studio.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ jobs:
2525
steps:
2626
- name: Checkout Repository
2727
uses: actions/checkout@v4
28+
- name: Use Python 3.12
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: "3.12"
2832
- name: Install Dependencies
2933
run: npm install
3034
- name: Run Node tests
3135
shell: pwsh
32-
run: |
33-
$pythonLocation = (Get-Command python).Source
34-
npm run test --python="${pythonLocation}" --msvs-version="${{ matrix.msvs-version }}"
36+
run: npm run test --python="${env:pythonLocation}\\python.exe" --msvs-version="${{ matrix.msvs-version }}"

gyp/.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Keep GitHub Actions up to date with Dependabot...
2+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
3+
version: 2
4+
updates:
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
groups:
8+
GitHub_Actions:
9+
patterns:
10+
- "*" # Group all Actions updates into a single larger pull request
11+
schedule:
12+
interval: weekly
13+
- package-ecosystem: "pip"
14+
directory: "/"
15+
groups:
16+
pip:
17+
patterns:
18+
- "*" # Group all pip updates into a single larger pull request
19+
schedule:
20+
interval: weekly

gyp/.github/workflows/Python_tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ jobs:
1515
fail-fast: false
1616
max-parallel: 5
1717
matrix:
18-
os: [macos-latest, ubuntu-latest] # , windows-latest]
19-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
18+
os: [macos-13, macos-14, ubuntu-latest] # , windows-latest]
19+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2020
steps:
2121
- uses: actions/checkout@v4
2222
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
allow-prereleases: true
27+
- uses: seanmiddleditch/gha-setup-ninja@v4
2728
- name: Install dependencies
2829
run: |
2930
python -m pip install --upgrade pip setuptools
@@ -35,3 +36,7 @@ jobs:
3536
run: pytest
3637
# - name: Run doctests with pytest
3738
# run: pytest --doctest-modules
39+
- name: Test CLI commands on a pipx install
40+
run: |
41+
pipx run --no-cache --spec ./ gyp --help
42+
pipx run --no-cache --spec ./ gyp --version

gyp/.github/workflows/node-gyp.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [macos-latest, ubuntu-latest, windows-latest]
14-
python: ["3.8", "3.10", "3.12"]
15-
13+
node-version: ["22"]
14+
os: [macos-13, macos-14, ubuntu-latest, windows-latest]
15+
python-version: ["3.8", "3.10", "3.12", "3.13"]
1616
runs-on: ${{ matrix.os }}
1717
steps:
1818
- name: Clone gyp-next
@@ -24,12 +24,12 @@ jobs:
2424
with:
2525
repository: nodejs/node-gyp
2626
path: node-gyp
27-
- uses: actions/setup-node@v3
27+
- uses: actions/setup-node@v4
2828
with:
29-
node-version: 18.x
30-
- uses: actions/setup-python@v4
29+
node-version: ${{ matrix.node-version }}
30+
- uses: actions/setup-python@v5
3131
with:
32-
python-version: ${{ matrix.python }}
32+
python-version: ${{ matrix.python-version }}
3333
allow-prereleases: true
3434
- name: Install Python dependencies
3535
run: |

gyp/.github/workflows/release-please.yml

Lines changed: 87 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,91 @@ name: release-please
77
jobs:
88
release-please:
99
runs-on: ubuntu-latest
10+
outputs:
11+
release_created: ${{ steps.release.outputs.release_created }}
12+
tag_name: ${{ steps.release.outputs.tag_name }}
13+
permissions:
14+
contents: write
15+
pull-requests: write
1016
steps:
11-
- uses: google-github-actions/release-please-action@v3
12-
with:
13-
token: ${{ secrets.GITHUB_TOKEN }}
14-
release-type: python
15-
package-name: gyp-next
16-
bump-minor-pre-major: true
17+
- uses: google-github-actions/release-please-action@v4
18+
id: release
19+
20+
build:
21+
name: Build distribution
22+
needs:
23+
- release-please
24+
if: ${{ needs.release-please.outputs.release_created }} # only publish on release
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: "3.12"
32+
- name: Install pypa/build
33+
run: >-
34+
python3 -m pip install build --user
35+
- name: Build a binary wheel and a source tarball
36+
run: python3 -m build
37+
- name: Store the distribution packages
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: python-package-distributions
41+
path: dist/
42+
43+
publish-to-pypi:
44+
name: >-
45+
Publish Python distribution to PyPI
46+
needs:
47+
- release-please
48+
- build
49+
if: ${{ needs.release-please.outputs.release_created }} # only publish on release
50+
runs-on: ubuntu-latest
51+
environment:
52+
name: pypi
53+
url: https://pypi.org/p/gyp-next
54+
permissions:
55+
id-token: write # IMPORTANT: mandatory for trusted publishing
56+
steps:
57+
- name: Download all the dists
58+
uses: actions/download-artifact@v4
59+
with:
60+
name: python-package-distributions
61+
path: dist/
62+
- name: Publish distribution to PyPI
63+
uses: pypa/gh-action-pypi-publish@release/v1
64+
65+
github-release:
66+
name: >-
67+
Publish Python distribution to GitHub Release
68+
needs:
69+
- release-please
70+
- build
71+
if: ${{ needs.release-please.outputs.release_created }} # only publish on release
72+
runs-on: ubuntu-latest
73+
permissions:
74+
contents: write # IMPORTANT: mandatory for making GitHub Releases
75+
id-token: write # IMPORTANT: mandatory for sigstore
76+
steps:
77+
- name: Download all the dists
78+
uses: actions/download-artifact@v4
79+
with:
80+
name: python-package-distributions
81+
path: dist/
82+
- name: Sign the dists with Sigstore
83+
uses: sigstore/[email protected]
84+
with:
85+
inputs: >-
86+
./dist/*.tar.gz
87+
./dist/*.whl
88+
- name: Upload artifact signatures to GitHub Release
89+
env:
90+
GITHUB_TOKEN: ${{ github.token }}
91+
# Upload to GitHub Release using the `gh` CLI.
92+
# `dist/` contains the built packages, and the
93+
# sigstore-produced signatures and certificates.
94+
run: >-
95+
gh release upload
96+
${{ needs.release-please.outputs.tag_name }} dist/**
97+
--repo '${{ github.repository }}'

gyp/.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.18.1"
3+
}

gyp/CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# Changelog
22

3+
## [0.18.1](https://github.com/nodejs/gyp-next/compare/v0.18.0...v0.18.1) (2024-05-26)
4+
5+
6+
### Bug Fixes
7+
8+
* **ci:** add Python 3.13 pre-release to test matrix ([#257](https://github.com/nodejs/gyp-next/issues/257)) ([8597203](https://github.com/nodejs/gyp-next/commit/8597203b687325c7516367135e026586279d0583))
9+
10+
11+
### Documentation
12+
13+
* vendor docs from gyp.gsrc.io ([#254](https://github.com/nodejs/gyp-next/issues/254)) ([8d7ba6e](https://github.com/nodejs/gyp-next/commit/8d7ba6e784dedf1122a0456150c739d2a09ecf57))
14+
15+
## [0.18.0](https://github.com/nodejs/gyp-next/compare/v0.17.0...v0.18.0) (2024-05-08)
16+
17+
18+
### Features
19+
20+
* support language standard keys in msvs_settings ([#252](https://github.com/nodejs/gyp-next/issues/252)) ([322f6d5](https://github.com/nodejs/gyp-next/commit/322f6d5d5233967522f3e55c623a8e7d7281e024))
21+
22+
## [0.17.0](https://github.com/nodejs/gyp-next/compare/v0.16.2...v0.17.0) (2024-04-29)
23+
24+
25+
### Features
26+
27+
* generate compile_commands.json with ninja ([#228](https://github.com/nodejs/gyp-next/issues/228)) ([7b20b46](https://github.com/nodejs/gyp-next/commit/7b20b4673d8cf46ff61898eb19569007d55c854a))
28+
29+
30+
### Bug Fixes
31+
32+
* failed to detect flavor if compiler path include white spaces ([#240](https://github.com/nodejs/gyp-next/issues/240)) ([f3b9753](https://github.com/nodejs/gyp-next/commit/f3b9753e7526377020e7d40e66b624db771cf84a))
33+
* support cross compiling for wasm with make generator ([#222](https://github.com/nodejs/gyp-next/issues/222)) ([de0e1c9](https://github.com/nodejs/gyp-next/commit/de0e1c9a5791d1bf4bc3103f878ab74814864ab4))
34+
* support empty dictionary keys in input ([#245](https://github.com/nodejs/gyp-next/issues/245)) ([178459f](https://github.com/nodejs/gyp-next/commit/178459ff343a2771d5f30f04467d2f032d6b3565))
35+
* update Ruff to 0.3.1 ([876ccaf](https://github.com/nodejs/gyp-next/commit/876ccaf5629e1b95e13aaa2b0eb6cbd08fa80593))
36+
37+
## [0.16.2](https://github.com/nodejs/gyp-next/compare/v0.16.1...v0.16.2) (2024-03-07)
38+
39+
40+
### Bug Fixes
41+
42+
* avoid quoting cflag name and parameter with space separator ([#223](https://github.com/nodejs/gyp-next/issues/223)) ([2b9703d](https://github.com/nodejs/gyp-next/commit/2b9703dbd5b3b8a935faf257c6103033b47bf8bf))
43+
344
## [0.16.1](https://github.com/nodejs/gyp-next/compare/v0.16.0...v0.16.1) (2023-10-25)
445

546

gyp/CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Contributing to gyp-next
22

3+
## Start contributing
4+
5+
Read the docs at [`./docs/Hacking.md`](./docs/Hacking.md) to get started.
6+
37
## Code of Conduct
48

59
This project is bound to the [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md).

gyp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GYP can Generate Your Projects.
22
===================================
33

4-
Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
4+
Documents are available at [`./docs`](./docs).
55

66
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
77
* `python3 -m pip install gyp-next`

0 commit comments

Comments
 (0)