Skip to content

Commit 6ed4277

Browse files
committed
Revert "tools: improve nix-changes coverage"
This reverts commit 78175c6. PR-URL: #65560
1 parent 8d48adf commit 6ed4277

7 files changed

Lines changed: 30 additions & 81 deletions

File tree

.github/workflows/build-tarball.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ on:
2323
- tools/eslint-rules/**
2424
- tools/eslint/**
2525
- tools/lint-md/**
26-
- tools/nix/**
2726
- typings/**
2827
- vcbuild.bat
2928
- .**
@@ -53,7 +52,6 @@ on:
5352
- tools/eslint-rules/**
5453
- tools/eslint/**
5554
- tools/lint-md/**
56-
- tools/nix/**
5755
- typings/**
5856
- vcbuild.bat
5957
- .**

.github/workflows/coverage-windows.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ on:
2323
- tools/eslint-rules/**
2424
- tools/eslint/**
2525
- tools/lint-md/**
26-
- tools/nix/**
2726
- typings/**
2827
- .**
2928
- '!.github/workflows/coverage-windows.yml'
@@ -50,7 +49,6 @@ on:
5049
- tools/eslint-rules/**
5150
- tools/eslint/**
5251
- tools/lint-md/**
53-
- tools/nix/**
5452
- typings/**
5553
- .**
5654
- '!.github/workflows/coverage-windows.yml'

.github/workflows/nix-changes.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ on:
1111
- v[0-9]+.x
1212
paths:
1313
- '**.nix'
14-
- tools/nix/**
1514
- .github/workflows/nix-changes.yml
1615
pull_request:
1716
paths:
1817
- '**.nix'
19-
- tools/nix/**
2018
- .github/workflows/nix-changes.yml
2119
types: [opened, synchronize, reopened, ready_for_review]
2220

@@ -49,9 +47,7 @@ jobs:
4947
with:
5048
fetch-depth: 2
5149
persist-credentials: false
52-
sparse-checkout: |
53-
shell.nix
54-
tools/nix/
50+
sparse-checkout: '*.nix'
5551
sparse-checkout-cone-mode: false
5652

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

6662
- name: Compute requisites after change
67-
run: ./tools/nix/list-requisites.sh > requisites-${{ matrix.system }}-after.list
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
6878
6979
- 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.
7081
run: |
7182
git reset HEAD^ --hard
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
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
7596
7697
- name: Output diff
7798
run: |

.github/workflows/test-linux.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
- tools/actions/**
1010
- tools/clang-format/**
1111
- tools/dep_updaters/**
12-
- tools/nix/**
1312
- test/internet/**
1413
- '**.nix'
1514
- .github/**
@@ -28,7 +27,6 @@ on:
2827
- tools/actions/**
2928
- tools/clang-format/**
3029
- tools/dep_updaters/**
31-
- tools/nix/**
3230
- test/internet/**
3331
- '**.nix'
3432
- .github/**

.github/workflows/test-macos.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ on:
2323
- tools/eslint-rules/**
2424
- tools/eslint/**
2525
- tools/lint-md/**
26-
- tools/nix/**
2726
- typings/**
2827
- vcbuild.bat
2928
- .**
@@ -54,7 +53,6 @@ on:
5453
- tools/eslint-rules/**
5554
- tools/eslint/**
5655
- tools/lint-md/**
57-
- tools/nix/**
5856
- typings/**
5957
- vcbuild.bat
6058
- .**

.github/workflows/test-shared.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ on:
4444
- '!tools/nix/**'
4545
- '!tools/v8/**'
4646
- '!tools/v8_gypfiles/**'
47-
- tools/nix/list-requisites.sh
4847
- typings/**
4948
- vcbuild.bat
5049
- .**
@@ -97,7 +96,6 @@ on:
9796
- '!tools/nix/**'
9897
- '!tools/v8/**'
9998
- '!tools/v8_gypfiles/**'
100-
- tools/nix/list-requisites.sh
10199
- typings/**
102100
- vcbuild.bat
103101
- .**

tools/nix/list-requisites.sh

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)