Skip to content

Commit 2e13828

Browse files
coadofacebook-github-bot
authored andcommitted
Add CI workflow for validating C++ API snapshot (facebook#56042)
Summary: Adds CI workflow for validating whether the current C++ API snapshot is equivalent with the generated one. Differential Revision: D95963515
1 parent 8fbf2fa commit 2e13828

File tree

9 files changed

+83764
-3
lines changed

9 files changed

+83764
-3
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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: |
33+
DOXYGEN_VERSION="1.16.1"
34+
curl -fsSL "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" -o doxygen.tar.gz
35+
tar xzf doxygen.tar.gz
36+
echo "$PWD/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
37+
- name: Setup node.js
38+
uses: ./.github/actions/setup-node
39+
- name: Run yarn
40+
uses: ./.github/actions/yarn-install
41+
- name: Set up Python
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: "3.12"
45+
- name: Install Python dependencies
46+
shell: bash
47+
run: pip install doxmlparser natsort pyyaml
48+
- name: Validate C++ API snapshots
49+
shell: bash
50+
run: python -m scripts.cxx-api.parser --check

packages/react-native/React/Views/ScrollView/RCTScrollableProtocol.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@
4343

4444
@end
4545

46-
__attribute__((deprecated("Use RCTCustomRefreshControlProtocol instead")))
47-
@protocol RCTCustomRefreshContolProtocol<RCTCustomRefreshControlProtocol>
48-
@end
46+
// __attribute__((deprecated("Use RCTCustomRefreshControlProtocol instead")))
47+
// @protocol RCTCustomRefreshContolProtocol<RCTCustomRefreshControlProtocol>
48+
// @end

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

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

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

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

0 commit comments

Comments
 (0)