Skip to content

Commit fb4f64d

Browse files
authored
Merge branch 'main' into native-glob
2 parents 7dd14d6 + ce40aa2 commit fb4f64d

365 files changed

Lines changed: 17895 additions & 3458 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/auto-start-ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This action uses the following secrets:
2+
# JENKINS_USER: GitHub user whose Jenkins token is defined below
3+
# JENKINS_TOKEN: Jenkins token, to be used to start CI
14
name: Auto Start CI
25

36
on:
@@ -36,11 +39,13 @@ jobs:
3639
-t '{{ range . }}{{ .number }} {{ end }}' \
3740
--limit 5)" >> "$GITHUB_OUTPUT"
3841
env:
39-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
GH_TOKEN: ${{ github.token }}
4043
start-ci:
4144
permissions:
45+
checks: read
4246
contents: read
4347
pull-requests: write
48+
statuses: read
4449
needs: get-prs-for-ci
4550
if: needs.get-prs-for-ci.outputs.numbers != ''
4651
runs-on: ubuntu-slim
@@ -59,16 +64,15 @@ jobs:
5964
ncu-config set token "$GH_TOKEN"
6065
ncu-config set jenkins_token "$JENKINS_TOKEN"
6166
ncu-config set owner "$GITHUB_REPOSITORY_OWNER"
62-
ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)"
67+
ncu-config set repo "${GITHUB_REPOSITORY#*/}"
6368
env:
6469
USERNAME: ${{ secrets.JENKINS_USER }}
65-
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
70+
GH_TOKEN: ${{ github.token }}
6671
JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }}
6772

6873
- name: Start the CI
6974
run: |
7075
curl -fsSL "https://github.com/${GITHUB_REPOSITORY}/raw/${GITHUB_SHA}/tools/actions/start-ci.sh" \
7176
| sh -s -- ${{ needs.get-prs-for-ci.outputs.numbers }}
7277
env:
73-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74-
GH_REPO: ${{ github.repository }}
78+
GH_TOKEN: ${{ github.token }}

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
--arg devTools '[]' \
142142
--arg benchmarkTools '[]' \
143143
--run '
144-
make -j4 V=1
144+
make build-ci -j4 V=1
145145
'
146146
147147
- name: Run benchmark

.github/workflows/build-tarball.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
- tools/eslint-rules/**
2424
- tools/eslint/**
2525
- tools/lint-md/**
26+
- tools/nix/**
2627
- typings/**
2728
- vcbuild.bat
2829
- .**
@@ -52,6 +53,7 @@ on:
5253
- tools/eslint-rules/**
5354
- tools/eslint/**
5455
- tools/lint-md/**
56+
- tools/nix/**
5557
- typings/**
5658
- vcbuild.bat
5759
- .**

.github/workflows/commit-queue.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
jq -r -s 'reduce .[] as $pr ([]; if index($pr) then . else . + [$pr] end) | join(" ")')
5353
echo "candidates=$candidates" >> "$GITHUB_OUTPUT"
5454
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
GH_TOKEN: ${{ github.token }}
5656
commitQueue:
5757
needs: get_candidate_prs
5858
if: needs.get_candidate_prs.outputs.candidates != ''
@@ -63,18 +63,14 @@ jobs:
6363
statuses: read
6464
runs-on: ubuntu-slim
6565
steps:
66-
# Install dependencies
6766
- name: Install Node.js
6867
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
6968
with:
7069
node-version: ${{ env.NODE_VERSION }}
70+
7171
- name: Install @node-core/utils
7272
run: npm install -g @node-core/utils
7373

74-
- name: Set variables
75-
run: |
76-
echo "REPOSITORY=$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)" >> "$GITHUB_ENV"
77-
7874
- name: Configure @node-core/utils
7975
run: |
8076
# Keep the config outside the workspace so checkout does not remove it.
@@ -83,7 +79,7 @@ jobs:
8379
ncu-config --global set username "$USERNAME"
8480
ncu-config --global set token "$GH_TOKEN"
8581
ncu-config --global set jenkins_token "$JENKINS_TOKEN"
86-
ncu-config --global set repo "${REPOSITORY}"
82+
ncu-config --global set repo "${GITHUB_REPOSITORY#*/}"
8783
ncu-config --global set owner "${GITHUB_REPOSITORY_OWNER}"
8884
env:
8985
USERNAME: ${{ secrets.JENKINS_USER }}
@@ -102,8 +98,6 @@ jobs:
10298
metadata="${RUNNER_TEMP}/metadata-${pr}.json"
10399
output="${RUNNER_TEMP}/metadata-${pr}.txt"
104100
if git node metadata "$pr" \
105-
--owner "$GITHUB_REPOSITORY_OWNER" \
106-
--repo "$REPOSITORY" \
107101
--readme "$readme" \
108102
--json > "$metadata" 2> "$output"; then
109103
metadata_status=0
@@ -171,7 +165,9 @@ jobs:
171165
- name: Start the Commit Queue
172166
if: steps.get_mergeable_prs.outputs.numbers != ''
173167
run: |
168+
git config --local user.email "github-bot@iojs.org"
169+
git config --local user.name "Node.js GitHub Bot"
174170
ncu-config set token "$GH_TOKEN"
175-
./tools/actions/commit-queue.sh "${GITHUB_REPOSITORY_OWNER}" "${REPOSITORY}" ${{ steps.get_mergeable_prs.outputs.numbers }}
171+
./tools/actions/commit-queue.sh ${{ steps.get_mergeable_prs.outputs.numbers }}
176172
env:
177173
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}

.github/workflows/coverage-windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
- tools/eslint-rules/**
2424
- tools/eslint/**
2525
- tools/lint-md/**
26+
- tools/nix/**
2627
- typings/**
2728
- .**
2829
- '!.github/workflows/coverage-windows.yml'
@@ -49,6 +50,7 @@ on:
4950
- tools/eslint-rules/**
5051
- tools/eslint/**
5152
- tools/lint-md/**
53+
- tools/nix/**
5254
- typings/**
5355
- .**
5456
- '!.github/workflows/coverage-windows.yml'

.github/workflows/nix-changes.yml

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ on:
1111
- v[0-9]+.x
1212
paths:
1313
- '**.nix'
14+
- tools/nix/**
1415
- .github/workflows/nix-changes.yml
1516
pull_request:
1617
paths:
1718
- '**.nix'
19+
- tools/nix/**
1820
- .github/workflows/nix-changes.yml
1921
types: [opened, synchronize, reopened, ready_for_review]
2022

@@ -47,7 +49,9 @@ jobs:
4749
with:
4850
fetch-depth: 2
4951
persist-credentials: false
50-
sparse-checkout: '*.nix'
52+
sparse-checkout: |
53+
shell.nix
54+
tools/nix/
5155
sparse-checkout-cone-mode: false
5256

5357
- uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0
@@ -60,39 +64,14 @@ jobs:
6064
name: nodejs
6165

6266
- name: Compute requisites after change
63-
shell: bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option.
64-
run: |
65-
nix-store --query --references "$(
66-
nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \
67-
--arg devTools "
68-
(import ./tools/nix/devTools.nix {})
69-
++ builtins.attrValues (
70-
{ inherit (import <nixpkgs> {}) nixfmt-tree sccache; }
71-
// import ./tools/nix/openssl-matrix.nix {}
72-
// import ./tools/nix/pkcs11.nix {}
73-
)")" \
74-
| xargs nix-store --realise \
75-
| xargs nix-store --query --requisites \
76-
| sort -k1.45 \
77-
> requisites-${{ matrix.system }}-after.list
67+
run: ./tools/nix/list-requisites.sh > requisites-${{ matrix.system }}-after.list
7868

7969
- name: Compute requisites before change
80-
shell: bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option.
8170
run: |
8271
git reset HEAD^ --hard
83-
nix-store --query --references "$(
84-
nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \
85-
--arg devTools "
86-
(import ./tools/nix/devTools.nix {})
87-
++ builtins.attrValues (
88-
{ inherit (import <nixpkgs> {}) nixfmt-tree sccache; }
89-
// import ./tools/nix/openssl-matrix.nix {}
90-
// import ./tools/nix/pkcs11.nix {}
91-
)")" \
92-
| xargs nix-store --realise \
93-
| xargs nix-store --query --requisites \
94-
| sort -k1.45 \
95-
> requisites-${{ matrix.system }}-before.list
72+
# TODO(aduh95): remove this once list-requisites.sh has reached `main`
73+
[ -f tools/nix/list-requisites.sh ] || git checkout FETCH_HEAD -- tools/nix/list-requisites.sh
74+
./tools/nix/list-requisites.sh > requisites-${{ matrix.system }}-before.list
9675
9776
- name: Output diff
9877
run: |

.github/workflows/test-linux.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- tools/actions/**
1010
- tools/clang-format/**
1111
- tools/dep_updaters/**
12+
- tools/nix/**
1213
- test/internet/**
1314
- '**.nix'
1415
- .github/**
@@ -27,6 +28,7 @@ on:
2728
- tools/actions/**
2829
- tools/clang-format/**
2930
- tools/dep_updaters/**
31+
- tools/nix/**
3032
- test/internet/**
3133
- '**.nix'
3234
- .github/**

.github/workflows/test-macos.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
- tools/eslint-rules/**
2424
- tools/eslint/**
2525
- tools/lint-md/**
26+
- tools/nix/**
2627
- typings/**
2728
- vcbuild.bat
2829
- .**
@@ -53,6 +54,7 @@ on:
5354
- tools/eslint-rules/**
5455
- tools/eslint/**
5556
- tools/lint-md/**
57+
- tools/nix/**
5658
- typings/**
5759
- vcbuild.bat
5860
- .**

.github/workflows/test-shared.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ on:
4444
- '!tools/nix/**'
4545
- '!tools/v8/**'
4646
- '!tools/v8_gypfiles/**'
47+
- tools/nix/list-requisites.sh
4748
- typings/**
4849
- vcbuild.bat
4950
- .**
@@ -96,6 +97,7 @@ on:
9697
- '!tools/nix/**'
9798
- '!tools/v8/**'
9899
- '!tools/v8_gypfiles/**'
100+
- tools/nix/list-requisites.sh
99101
- typings/**
100102
- vcbuild.bat
101103
- .**

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ install_manifest.txt
163163

164164
# === Rules for AI assistants ===
165165
CLAUDE.md
166-
AGENTS.md
167166

168167
# === Global Rules ===
169168
# Keep last to avoid being excluded

0 commit comments

Comments
 (0)