Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
0f6f5cc
tools: fix redundant conditions in v8.gyp for riscv64 and loong64
JamieMagee Jul 6, 2026
f375bfe
vfs: follow symlinked dirs in recursive mkdir
trivikr Jul 7, 2026
ae675c5
deps: update zlib to 1.3.2.1-motley-8b3aa8a
nodejs-github-bot Jul 7, 2026
f68c234
quic: fix potential crash from unobserved closed
pimterry Jul 7, 2026
9a3e506
quic: fix stall datagrams, if no pending streams
martenrichter Jul 7, 2026
a238e20
stream: speed up async iteration over WHATWG byte streams
mcollina Jul 4, 2026
0942ad9
benchmark: add bytes variant to webstreams async-iterator
mcollina Jul 4, 2026
94c8e10
test: remove impact of tier-up changes in worker stack size test
joyeecheung Jul 7, 2026
b47da64
test: handle null stdio streams in spawnSyncAndAssert helper
joyeecheung Jul 7, 2026
4f232ce
sqlite: read column count after step in StatementSync.all()
araujogui Jul 7, 2026
9403eb7
quic: fix no onstream handler crash quic
efekrskl Jul 7, 2026
47c032d
http2: avoid per-write closures in kWriteGeneric
mcollina Jul 2, 2026
7f054f6
http2: avoid copying the options in respond()
mcollina Jul 3, 2026
644b1a5
doc: remove obsolete --napi-modules doc entry
legendecas Jul 7, 2026
816e34c
test_runner: report `entryFile` in `TestStream` events
MoLow Jul 7, 2026
dbd98ed
deps: V8: backport a05321ebd98e
legendecas Jun 29, 2026
1ee27c2
vm: enable interception on global restricted properties
legendecas Jun 29, 2026
e34b768
test: increase timeout in consumed-timeout test
trivikr Jul 8, 2026
fccb76b
stream: prefer sync iterator in fromSync
trivikr Jul 8, 2026
586996a
tls: match IPv6 hosts against IP-Address SANs
JumpLink Jul 8, 2026
29176fe
meta: move one or more collaborators to emeritus
nodejs-github-bot Jul 8, 2026
7021502
ffi: add getCurrentEventLoop
ShogunPanda Jul 8, 2026
a7cd704
doc: various updates to releases.md
sxa Jun 29, 2026
d878faa
doc: add note about restricted CI to pull-requests.md
sxa Jul 8, 2026
a202b2a
stream: hoist repeated loads in readable paths
anonrig Jul 5, 2026
0cdc215
stream: use ring buffer for WHATWG stream queues
anonrig Jul 5, 2026
b063a01
module: add two tests for eager imports when using `import defer`
MayaLekova Jul 8, 2026
648c359
quic: correct http3 callback and fix revealed errs
martenrichter Jul 8, 2026
52e427d
deps: upgrade npm to 11.18.0
npm-cli-bot Jul 8, 2026
a643e34
quic: extract transport logic from Application to Session
pimterry Jul 8, 2026
bbbe223
deps: update c-ares to 1.34.8
nodejs-github-bot Jul 8, 2026
e029e22
stream: avoid draining merged iter sources
trivikr Jul 8, 2026
a4e664f
buffer: fix Blob.stream() leaking source buffer
semimikoh Jul 9, 2026
c03718d
test: unmark flaky SEA snapshot tests on Windows
PickBas Jul 9, 2026
4ec3d4b
test: unmark flaky http2-large-file for Win
PickBas Jul 9, 2026
9fcafb8
test: normalize Windows crash in debugger test normalization
joyeecheung Jul 9, 2026
9bb5f8a
stream: reject nested async streamables in from()
trivikr Jul 10, 2026
a9a06a6
deps: enable OpenSSL asm support for riscv64
JamieMagee Jul 10, 2026
618b22c
doc: clarify proxy threat model
mcollina Jul 10, 2026
1c3e00b
test: fix flaky watch + cwd + argv test-runner test
pimterry Jul 10, 2026
faf25bc
stream: copy SAB-backed chunks in iter consumers
trivikr Jul 11, 2026
5d9158d
doc: add scope overview tables for TestsStream events
MoLow Jul 11, 2026
a5a1c0d
stream: speed up reads and iteration over default WHATWG streams
mcollina Jul 11, 2026
531f8fe
deps: update ngtcp2 to 1.24.0
nodejs-github-bot Jul 11, 2026
de5b734
http: remove unused n arg from IncomingMessage._read
efekrskl Jul 11, 2026
f89cf33
stream: validate writevSync chunks before queuing
trivikr Jul 12, 2026
6ebda1e
src: fix some typo errors and rename some variables
Archkon Jul 12, 2026
f6509cf
doc: remove duplicate VirtualProvider description
Archkon Jul 12, 2026
417e819
test_runner: add context.log() and test:log event
MoLow Jul 12, 2026
ba12937
tools: add option for `benchmark.yml` to post comment on PR
aduh95 Jul 12, 2026
962c9d9
http: fix perf_hooks detail.req.url port and proxied path
stefanobaghino Jul 12, 2026
a1fcbb7
net: make TCP Server and Socket transferable across worker threads
mcollina Jul 12, 2026
4284ea6
test: fix 2nd flaky blob test case
pimterry Jul 12, 2026
bd1e1d0
tools: add workflow to compare Nix changes
aduh95 Jul 12, 2026
d1567ab
buffer: normalize lone "\r" in Blob native line endings
watilde Jul 12, 2026
ebd7346
util: make MIMEParams accessors case-insensitive
watilde Jul 12, 2026
20b4eb8
test: fix flaky http2 maxOriginSetSize test
pimterry Jul 13, 2026
e4187aa
doc: clarify fixes and refs trailer guidance
trivikr Jul 13, 2026
b5c03aa
events: optimize once() and removeListener()
mcollina Jul 13, 2026
42b4bff
doc: fix typos in documentation
sjungwon03 Jul 13, 2026
6c1dbfb
tools: disable zipping tarballs on GHA
aduh95 Jul 13, 2026
f7a8fc8
inspector: add --cond to node inspect probe mode
joyeecheung Jul 13, 2026
628eab4
doc: update a Dispatcher undici doc link
panva Jul 13, 2026
485d475
src: zero-initialize cap_data in node_credentials.cc
spkapust Jul 13, 2026
3194059
doc: document net Socket server property
efekrskl Jul 13, 2026
3413ab9
stream: use the ring buffer for WHATWG stream request queues
mcollina Jul 13, 2026
92f25d6
events: avoid retaining removed event names
mcollina Jul 13, 2026
71e6570
test: update WPT for WebCryptoAPI to ec2fee39a4
nodejs-github-bot Jul 14, 2026
bce46f2
test: update WPT for urlpattern to 5847ee5cfa
nodejs-github-bot Jul 14, 2026
84fcd9d
deps: update libffi to 3.7.1
nodejs-github-bot Jul 14, 2026
7da09e0
deps: update googletest to 8240fa7d62f73e01c7af27d61ed965d6d66698fa
nodejs-github-bot Jul 14, 2026
8799c12
test: fix stale async-context-frame status entries
PickBas Jul 14, 2026
778d126
deps: V8: cherry-pick 1158ae719749
Renegade334 Jul 14, 2026
15860ff
lib,tools: add `node-core/func-name-matching` lint rule
LiviaMedeiros Jul 14, 2026
6fc05e3
doc,test: widen fsPromises.appendFile()'s data type, add missing tests
hkleungai Jul 14, 2026
e65b2ca
doc: fix typo in tls.md
watilde Jul 14, 2026
630aa4b
doc: clarify PEM format for signing keys
harjothkhara Jul 15, 2026
e223479
stream: simplify nested `PromisePrototypeThen`s
aduh95 Jul 15, 2026
28cb3f6
test: copyedit `test-tls-psk-alpn-callback-exception-handling`
aduh95 Jul 15, 2026
e3909ff
doc: fix spelling in devcontainer guide
manNomi Jul 15, 2026
14955b4
net: support sync connect for BoundSocket
guybedford Jul 16, 2026
78deeba
build: extract temporal_capi crate directory name into gyp variable
Renegade334 Jul 16, 2026
7677b1c
stream: reject push iterator.throw() with error
trivikr Jul 16, 2026
37a3fe1
stream: validate writer options signal
trivikr Jul 16, 2026
15e18a8
fs: fix cp symlink and EEXIST handling on Windows
PickBas Jul 16, 2026
4ef659a
stream: fold desired-size check into WHATWG backpressure update
mcollina Jul 16, 2026
ffa1a26
quic: add support for TLS certificate compression
bjohansebas Jul 16, 2026
586b896
tools: reference 'git node land' in PR-URL: error message in merge.sh
sxa Jul 16, 2026
713b0e5
vfs: fix VirtualReadStream race with async iteration
Y1D7NG Jul 16, 2026
a6f3da4
doc: document TLS alpnProtocol and servername fields
pimterry Jul 17, 2026
d2956fe
src: fix comment typos
sjungwon03 Jul 17, 2026
86f27e2
quic: preserve session stats after close
manNomi Jul 17, 2026
fec90a3
lib: use `assignFunctionName` util where it makes sense
aduh95 Jul 17, 2026
2af4b94
doc: fix typos in contributing docs
HoonDongKang Jul 17, 2026
1371b14
test: keep finalization before-exit ref alive
pimterry Jul 17, 2026
f0b8a83
vfs: make lchmod update symlink mode
trivikr Jul 17, 2026
9ac1b68
path: add benchmarks for path.matchesGlob()
beeequeue Jun 14, 2026
17face6
fs: add pattern cache for matchGlobPattern()
beeequeue Jun 13, 2026
9a1a67e
doc: fix typo in embedding.md
greenheadHQ Jul 18, 2026
7bfcd28
http2: don't throw when destroying socket proxy
mcollina Jul 11, 2026
1f22791
assert,util: fix TypeError on Maps with null keys
bitpshr Jul 18, 2026
02f9d52
test: apply correction to comment
Trott Jul 18, 2026
ae95123
stream: resume flow when an errored pipe destination is removed
MahinAnowar Jul 18, 2026
351646e
timers: do not retain a reference to the async store after firing
mcollina Jul 19, 2026
1409bb6
cli: style node --help output with util.styleText
edsadr Jul 19, 2026
d5dbde0
doc: note --env-file is not applied to --run
bitpshr Jul 19, 2026
a5d676d
ffi: evaluate function signatures once
trivikr Jul 20, 2026
caaf5f7
meta: lower stale to 3 months
avivkeller Jul 20, 2026
f303f47
doc: replace large tables in crypto.md and webcrypto.md with lists
panva Jul 20, 2026
b4a0419
doc: fix socket.readyState state descriptions
samuel871211 Jul 20, 2026
ddf7798
stream: fix drop-newest behavior in share()
trivikr Jul 21, 2026
4548969
deps: update timezone to 2026c
nodejs-github-bot Jul 21, 2026
e8658af
build: merge multiple on download artifact
legendecas Jul 21, 2026
1aa1f91
src,permission: do not throw on denied access in audit mode
edsadr Jul 21, 2026
612a828
zlib: reject truncated zstd input
Archkon Jul 21, 2026
c770d35
doc: update sea example by fixing wrong code example
saint-james-fr Jul 21, 2026
de554dd
vfs: make recursive readdir iterative
AkshatOP Jul 21, 2026
5f9b182
doc: mention crypto.hash() for better perf
styfle Jul 21, 2026
50f526b
doc: fix import.meta example for vm.SourceTextModule
zeeshan56656 Jul 21, 2026
68dc114
doc: use promote wording in release guide
Muhtasim-Munif-Fahim Jul 21, 2026
08d15c2
2026-07-22, Version 26.6.0 (Current)
aduh95 Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
66 changes: 64 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,43 @@ on:
type: number
default: 30
description: How many times to repeat each benchmark
post-comment:
type: boolean
description: Post a comment linking to the run, with the aggregated result once known.
token:
type: string
description: A GitHub token to post comments cross repository (not recommended)

permissions:
contents: read

jobs:
post-comment:
if: inputs.post-comment
outputs:
body: ${{ steps.comment.outputs.COMMENT_BODY }}
url: ${{ steps.comment.outputs.COMMENT_URL }}
runs-on: ubuntu-slim
permissions:
pull-requests: write
steps:
- name: Mark token input as sensitive
if: inputs.token != ''
run: echo "::add-mask::${{ inputs.token }}"
- name: Add link to the current run
id: comment
run: |
FILTER_IF_SET=
[ -z "$FILTER" ] || FILTER_IF_SET=" / $FILTER"
COMMENT_BODY="Benchmark GHA (${CATEGORIES}${FILTER_IF_SET}): ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
echo "COMMENT_BODY=$COMMENT_BODY" >> "$GITHUB_OUTPUT"
echo "COMMENT_URL=$(gh pr comment -R "${REPO:-$GITHUB_REPOSITORY}" "$PR_ID" --body "$COMMENT_BODY")" >> "$GITHUB_OUTPUT"
env:
CATEGORIES: ${{ inputs.category }}
FILTER: ${{ inputs.filter }}
GH_TOKEN: ${{ inputs.token || github.token }}
REPO: ${{ inputs.repo }}
PR_ID: ${{ inputs.pr_id }}
build:
strategy:
fail-fast: true
Expand Down Expand Up @@ -155,9 +187,13 @@ jobs:
path: ${{ matrix.system }}.csv

aggregate-results:
needs: build
needs: [build, post-comment]
if: ${{ always() && needs.build.result == 'success' && needs.post-comment.result == (inputs.post-comment && 'success' || 'skipped') }}
name: Aggregate benchmark results
runs-on: ubuntu-slim
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
Expand Down Expand Up @@ -200,4 +236,30 @@ jobs:
echo "> [!WARNING] "
echo "> Do not take GHA benchmark results as face value, always confirm them"
echo "> using a dedicated machine, e.g. Jenkins CI."
' | tee /dev/stderr >> "$GITHUB_STEP_SUMMARY"
' | tee /dev/stderr ${{ inputs.post-comment && 'body.txt' || '' }} >> "$GITHUB_STEP_SUMMARY"
- name: Mark token input as sensitive
if: inputs.token != ''
run: echo "::add-mask::${{ inputs.token }}"
- name: Edit comment
if: inputs.post-comment
run: |
{
echo "$COMMENT_BODY"
echo
echo '<details><summary>Results</summary>'
echo
cat body.txt
echo
echo '</details>'
} | jq -Rrcs '{ body: . }' | gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2026-03-10" \
"/repos/${REPO:-$GITHUB_REPOSITORY}/issues/comments/${COMMENT_URL##*-}" \
--input -
env:
GH_TOKEN: ${{ inputs.token || github.token }}
REPO: ${{ inputs.repo }}
COMMENT_BODY: ${{ needs.post-comment.outputs.body }}
COMMENT_URL: ${{ needs.post-comment.outputs.url }}
PR_ID: ${{ inputs.pr_id }}
3 changes: 2 additions & 1 deletion .github/workflows/build-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ jobs:
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: tarballs
path: tarballs
pattern: '*.tar.gz'
merge-multiple: true

- name: Extract tarball
shell: bash
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ jobs:
- name: Upload tarball artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: tarballs
path: '*.tar.gz'
compression-level: 0
archive: false
test-tarball-linux:
needs: build-tarball
runs-on: ubuntu-24.04-arm
Expand Down Expand Up @@ -125,7 +124,6 @@ jobs:
- name: Download tarball
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: tarballs
path: tarballs
- name: Extract tarball
run: |
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,26 +132,6 @@ jobs:
NODE=$(command -v node) make lint-md
env:
NODE_RELEASED_VERSIONS: ${{ steps.get-released-versions.outputs.NODE_RELEASED_VERSIONS }}
lint-nix:
if: github.event.pull_request.draft == false
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
sparse-checkout: '*.nix'
sparse-checkout-cone-mode: false
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- name: Lint Nix files
run: |
nix-shell -I nixpkgs=./tools/nix/pkgs.nix -p 'nixfmt-tree' --run '
treefmt --quiet --ci
' && EXIT_CODE="$?" || EXIT_CODE="$?"
if [ "$EXIT_CODE" != "0" ]
then
git --no-pager diff || true
exit "$EXIT_CODE"
fi

lint-py:
if: github.event.pull_request.draft == false
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/nix-changes-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# This action requires the following secrets to be set on the repository:
# GH_USER_TOKEN: GitHub user token, to be used by ncu and to push changes
name: Comment on PR on Nix changes

on:
workflow_run:
workflows: [Nix files edited]
types: [completed]

permissions: {}

jobs:
aggregate-results:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }}
name: Aggregate results
runs-on: ubuntu-slim
permissions:
pull-requests: write
steps:
- name: Download artefacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
run-id: ${{ github.event.workflow_run.id }}
# Using privileged token to be able to download file from a different workflow
github-token: ${{ secrets.GH_USER_TOKEN }}

- name: Fetch PR data
id: pr-data
run: |
mv requisites-*/* .
ls
if grep -nvHE '^/nix/store/[0-9a-df-np-sv-z]{32}-[A-Za-z0-9?=._+-]+$' requisites-*.list; then
echo 'Unexpected line format in requisites list; refusing to process.' >&2
exit 1
fi
echo "NUMBER=$(grep -E '^[0-9]+$' pr_number.txt || true)" >> "$GITHUB_OUTPUT"

- name: Aggregate results
if: ${{ steps.pr-data.outputs.NUMBER }}
run: |
set -x
> requisites-before.list
> requisites-after.list
TABLE=$(
echo '| Platform | Number of requisites | Proportion of new derivations |'
echo '| :-: | -: | -: |'
TOTAL_BEFORE=0
TOTAL_AFTER=0
TOTAL_CHANGED=0
QUOTE='`'
for PLATFORM in x86_64-linux aarch64-linux x86_64-darwin aarch64-darwin; do
BEFORE=$(wc -l < "requisites-${PLATFORM}-before.list")
TOTAL_BEFORE=$(($TOTAL_BEFORE + $BEFORE))
AFTER=$(wc -l < "requisites-${PLATFORM}-after.list")
TOTAL_AFTER=$(($TOTAL_AFTER + $AFTER))
DIFF="_no changes_"
[ "$BEFORE" = "$AFTER" ] || DIFF="**$([ "$AFTER" < "$BEFORE" ] || echo '+')$(($AFTER - $BEFORE))**"
CHANGED=$(git diff --no-index "requisites-${PLATFORM}-before.list" "requisites-${PLATFORM}-after.list" | grep -c '^+[^+]')
TOTAL_CHANGED=$(($TOTAL_CHANGED + $CHANGED))
PERCENT=100
[ "$CHANGED" = "$AFTER" ] || {
PERMILLE=$((1000 * $CHANGED / $AFTER))
PERCENT="$((PERMILLE / 10)).$((PERMILLE % 10))"
}
echo "| ${QUOTE}${PLATFORM}${QUOTE} | $BEFORE -> $AFTER => $DIFF | $CHANGED / $AFTER = $PERCENT% |"
awk '{ print $0 " ('"$PLATFORM"')" }' "requisites-${PLATFORM}-before.list" >> requisites-before.list
awk '{ print $0 " ('"$PLATFORM"')" }' "requisites-${PLATFORM}-after.list" >> requisites-after.list
done

DIFF="_no changes_"
[ "$TOTAL_BEFORE" = "$TOTAL_AFTER" ] || DIFF="**$([ "$TOTAL_AFTER" < "$TOTAL_BEFORE" ] || echo '+')$(($TOTAL_AFTER - $TOTAL_BEFORE))**"
PERCENT=100
[ "$TOTAL_CHANGED" = "$TOTAL_AFTER" ] || {
PERMILLE=$((1000 * $TOTAL_CHANGED / $TOTAL_AFTER))
PERCENT="$((PERMILLE / 10)).$((PERMILLE % 10))"
}
echo "| **Total** | $TOTAL_BEFORE -> $TOTAL_AFTER => $DIFF | $TOTAL_CHANGED / $TOTAL_AFTER = $PERCENT% |"
)
sort -k1.45 requisites-before.list > requisites-before.sort
sort -k1.45 requisites-after.list > requisites-after.sort
if git diff -U0 --no-color --no-index requisites-before.sort requisites-after.sort > requisites.diff; then
echo 'No changes detected.'
else
{
echo "$TABLE"
echo
echo '<details><summary>Changelog</summary>'
echo
echo '```diff'
tail -n +5 requisites.diff
echo '```'
echo
echo '</details>'
} | gh pr comment -R "$GITHUB_REPOSITORY" "$PR_NUMBER" -F -
fi
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ steps.pr-data.outputs.NUMBER }}
140 changes: 140 additions & 0 deletions .github/workflows/nix-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# This action uses the following secrets:
# CACHIX_AUTH_TOKEN: Write access to nodejs.cachix.org – without it, the cache is read-only.
name: Nix files edited

on:
push:
branches:
- main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
paths:
- '**.nix'
- .github/workflows/nix-changes.yml
pull_request:
paths:
- '**.nix'
- .github/workflows/nix-changes.yml
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:
diff:
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
system: x86_64-linux
- runner: ubuntu-24.04-arm
system: aarch64-linux
- runner: macos-15-intel
system: x86_64-darwin
- runner: macos-latest
system: aarch64-darwin
name: '${{ matrix.system }}: dependencies diff'
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 2
persist-credentials: false
sparse-checkout: '*.nix'
sparse-checkout-cone-mode: false

- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
with:
extra_nix_config: sandbox = true

- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
name: nodejs

- name: Compute requisites after change
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.
run: |
nix-store --query --references "$(
nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \
--arg devTools "
(import ./tools/nix/devTools.nix {})
++ builtins.attrValues (
{ inherit (import <nixpkgs> {}) nixfmt-tree sccache; }
// import ./tools/nix/openssl-matrix.nix {}
)")" \
| xargs nix-store --realise \
| xargs nix-store --query --requisites \
| sort -k1.45 \
> requisites-${{ matrix.system }}-after.list

- name: Compute requisites before change
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.
run: |
git reset HEAD^ --hard
nix-store --query --references "$(
nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \
--arg devTools "
(import ./tools/nix/devTools.nix {})
++ builtins.attrValues (
{ inherit (import <nixpkgs> {}) nixfmt-tree sccache; }
// import ./tools/nix/openssl-matrix.nix {}
)")" \
| xargs nix-store --realise \
| xargs nix-store --query --requisites \
| sort -k1.45 \
> requisites-${{ matrix.system }}-before.list

- name: Output diff
run: |
{
if diff_output="$(git diff -U0 --no-color --no-index requisites-${{ matrix.system }}-before.list requisites-${{ matrix.system }}-after.list)"; then
echo 'No changes detected.'
else
echo '```diff'
echo "$diff_output" | tail -n +5
echo '```'
fi
} >> "$GITHUB_STEP_SUMMARY"

- name: Store PR number
if: ${{ github.event.pull_request && matrix.system == 'x86_64-linux' }}
run: echo "${{ github.event.pull_request.number }}" > pr_number.txt

- name: Upload requisites lists
if: ${{ github.event.pull_request }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: requisites-${{ matrix.system }}
path: |
pr_number.*
requisites-${{ matrix.system }}-before.list
requisites-${{ matrix.system }}-after.list

lint-nix:
if: github.event.pull_request.draft == false
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
sparse-checkout: '*.nix'
sparse-checkout-cone-mode: false
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- name: Lint Nix files
run: |
nix-shell -I nixpkgs=./tools/nix/pkgs.nix -p 'nixfmt-tree' --run '
treefmt --quiet --ci
' && EXIT_CODE="$?" || EXIT_CODE="$?"
if [ "$EXIT_CODE" != "0" ]
then
git --no-pager diff || true
exit "$EXIT_CODE"
fi
Loading
Loading