Skip to content

Commit 8cce19c

Browse files
coadofacebook-github-bot
authored andcommitted
Add CI workflow for validating C++ API snapshot
Summary: Adds CI workflow for validating whether the current C++ API snapshot is equivalent with the generated one. Differential Revision: D95963515
1 parent f48b2bb commit 8cce19c

8 files changed

Lines changed: 85613 additions & 1 deletion

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Validate C++ API Snapshots
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- "packages/react-native/ReactCommon/**"
8+
- "packages/react-native/ReactAndroid/**"
9+
- "packages/react-native/React/**"
10+
- "packages/react-native/ReactApple/**"
11+
- "scripts/cxx-api/**"
12+
push:
13+
branches:
14+
- main
15+
- "*-stable"
16+
paths:
17+
- "packages/react-native/ReactCommon/**"
18+
- "packages/react-native/ReactAndroid/**"
19+
- "packages/react-native/React/**"
20+
- "packages/react-native/ReactApple/**"
21+
- "scripts/cxx-api/**"
22+
23+
jobs:
24+
validate_cxx_api_snapshots:
25+
runs-on: ubuntu-latest
26+
if: github.repository == 'facebook/react-native'
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v6
30+
- name: Install Doxygen
31+
shell: bash
32+
run: sudo apt-get update && sudo apt-get install -y doxygen
33+
- name: Set up Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: "3.12"
37+
- name: Install Python dependencies
38+
shell: bash
39+
run: pip install doxmlparser natsort pyyaml
40+
- name: Validate C++ API snapshots
41+
shell: bash
42+
run: python -m scripts.cxx-api.parser --check

scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api

Lines changed: 14885 additions & 0 deletions
Large diffs are not rendered by default.

scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api

Lines changed: 14712 additions & 0 deletions
Large diffs are not rendered by default.

scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api

Lines changed: 16675 additions & 0 deletions
Large diffs are not rendered by default.

scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api

Lines changed: 16502 additions & 0 deletions
Large diffs are not rendered by default.

scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api

Lines changed: 11402 additions & 0 deletions
Large diffs are not rendered by default.

scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api

Lines changed: 11393 additions & 0 deletions
Large diffs are not rendered by default.

scripts/cxx-api/parser/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ def build_snapshot_for_view(
8383
verbose: bool = True,
8484
input_filter: str = None,
8585
) -> None:
86+
print(f"Generating API view: {api_view}")
87+
8688
if verbose:
87-
print(f"Generating API view: {api_view}")
8889
print("Generating Doxygen config file")
8990

9091
build_doxygen_config(

0 commit comments

Comments
 (0)