Add CI workflow for validating C++ API snapshot (#56042) #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate C++ API Snapshots | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - "packages/react-native/ReactCommon/**" | |
| - "packages/react-native/ReactAndroid/**" | |
| - "packages/react-native/React/**" | |
| - "packages/react-native/ReactApple/**" | |
| - "packages/react-native/Libraries/**" | |
| - "scripts/cxx-api/**" | |
| push: | |
| branches: | |
| - main | |
| - "*-stable" | |
| paths: | |
| - "packages/react-native/ReactCommon/**" | |
| - "packages/react-native/ReactAndroid/**" | |
| - "packages/react-native/React/**" | |
| - "packages/react-native/ReactApple/**" | |
| - "packages/react-native/Libraries/**" | |
| - "scripts/cxx-api/**" | |
| jobs: | |
| validate_cxx_api_snapshots: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'facebook/react-native' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Run yarn | |
| uses: ./.github/actions/yarn-install | |
| - name: Install Doxygen | |
| shell: bash | |
| run: sudo apt-get update && sudo apt-get install -y doxygen | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Python dependencies | |
| shell: bash | |
| run: pip install doxmlparser natsort pyyaml | |
| - name: Validate C++ API snapshots | |
| shell: bash | |
| run: yarn cxx-api-validate |