Skip to content

Commit 025c435

Browse files
legendecasaduh95
authored andcommitted
build: run perfetto build and test on GHA
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net> PR-URL: #64721 Fixes: nodejs/diagnostics#654 Refs: #64565 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent e561fee commit 025c435

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/test-shared.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,23 @@ jobs:
141141
include:
142142
- runner: ubuntu-24.04
143143
system: x86_64-linux
144+
# Exercise the trace-event code against a perfetto-enabled V8.
145+
perfetto: true
144146
# built separately in build-aarch64-linux-v8
145147
# - runner: ubuntu-24.04-arm
146148
# system: aarch64-linux
147149
- runner: macos-15-intel
148150
system: x86_64-darwin
149151
- runner: macos-latest
150152
system: aarch64-darwin
151-
name: '${{ matrix.system }}: with shared libraries'
153+
name: '${{ matrix.system }}: with shared libraries${{ matrix.perfetto && '' and perfetto'' || '''' }}'
152154
uses: ./.github/workflows/build-shared.yml
153155
with:
154156
runner: ${{ matrix.runner }}
155157
with-sccache: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
156158
extra-nix-flags: |
157159
--arg useSeparateDerivationForV8 true \
160+
${{ matrix.perfetto && '--arg withPerfetto true \' || '\' }}
158161
${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg withFFI false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
159162
secrets:
160163
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

shell.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
withFFI ? true,
2020
withSSL ? true,
2121
withTemporal ? false,
22+
withPerfetto ? false,
2223
sharedLibDeps ? (
2324
import ./tools/nix/sharedLibDeps.nix {
2425
inherit
@@ -67,7 +68,8 @@ let
6768
)
6869
"--v8-${if withTemporal then "enable" else "disable"}-temporal-support"
6970
]
70-
++ pkgs.lib.optional (withTemporal && useSharedTemporal) "--shared-temporal_capi";
71+
++ pkgs.lib.optional (withTemporal && useSharedTemporal) "--shared-temporal_capi"
72+
++ pkgs.lib.optional withPerfetto "--with-perfetto";
7173
in
7274
pkgs.mkShell {
7375
inherit nativeBuildInputs;

tools/nix/v8.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ let
4444
../../tools/v8_gypfiles/toolchain.gypi
4545
../../tools/v8_gypfiles/v8.gyp
4646
]
47+
++ lib.optionals (builtins.elem "--with-perfetto" configureFlags) [
48+
../../deps/perfetto
49+
]
4750
++ lib.optionals (icu != null) [
4851
../../tools/icu/icu_versions.json
4952
../../tools/icu/icu-system.gyp

0 commit comments

Comments
 (0)