[MOO-1870] React Native 0.78 New Architecture compatibility fixes #1230
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: Run build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'mx/release/**' | |
| pull_request: | |
| branches: | |
| - main | |
| - 'mx/release/**' | |
| jobs: | |
| test: | |
| name: "Build (${{ matrix.os }})" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - name: "Checking changed files" | |
| id: files | |
| uses: softprops/diffset@db8c4e13f5cc3f8ab666ba2cb6998b688058a41c # v1 | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| with: | |
| base: main | |
| global_files: | | |
| !{packages/**/*,configs/e2e/*.json,scripts/**/*,data/**/*} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: "Checking-out code" | |
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Fetching main to compare" | |
| if: github.event_name == 'pull_request' && steps.files.outputs.global_files == '' | |
| run: git fetch --no-tags --prune --depth=1 origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }} | |
| - name: "Defining node version" | |
| uses: actions/setup-node@d86ebcd40b3cb50b156bfa44dd277faf38282d12 # v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: "Setup pnpm" | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4 | |
| - name: "Get pnpm store directory" | |
| id: pnpm-cache | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: "Setup cache" | |
| uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: "Installing dependencies" | |
| run: pnpm install | |
| - name: "Running build for development" | |
| run: pnpm -r --filter=$(if [ "${{ steps.files.outputs.global_files }}" = "" ] && ${{ github.event_name == 'pull_request' }}; then echo '...[origin/main]'; else echo '**'; fi) run build | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=8192 |