From db1170563e018b3bbc7b2de49390be946a1d4f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Thu, 8 Aug 2024 17:27:13 +0200 Subject: [PATCH 01/15] chore: make actions names match their titles, cleanup --- ... => V8-reanimated-build-check-nightly.yml} | 2 +- ...ugin.yml => babel-plugin-static-check.yml} | 7 +-- .github/workflows/build-monorepo-nightly.yml | 10 ---- .../build-release-npm-package-rea3.yml | 10 ---- ...ck.yml => docs-reanimated-build-check.yml} | 2 +- ...d-docs.yml => docs-reanimated-publish.yml} | 2 +- ...ld.yml => example-android-build-check.yml} | 32 ++++------ ...-build.yml => example-ios-build-check.yml} | 25 +++----- ...uild.yml => example-macos-build-check.yml} | 37 ++++++------ ... => example-next-build-check-and-test.yml} | 9 +-- ...build.yml => example-tvos-build-check.yml} | 8 +-- ... => example-typescript-check-and-lint.yml} | 21 +++---- ...=> expo-devclient-build-check-nightly.yml} | 2 +- ...ml => github-close-when-stale-nightly.yml} | 10 ++-- ...s.yml => github-issue-platforms-check.yml} | 6 +- ...repro.yml => github-issue-repro-check.yml} | 10 ++-- ...fo.yml => github-issue-template-check.yml} | 2 +- ...ithub-pull-request-description-format.yml} | 2 +- ...epo-app-reanimated-build-check-action.yml} | 3 +- ...po-app-reanimated-build-check-nightly.yml} | 14 +++-- ...n.yml => npm-reanimated-package-build.yml} | 9 ++- ...yml => npm-reanimated-publish-nightly.yml} | 4 +- ...ightly-reanimated-build-check-nightly.yml} | 10 ++-- .../reanimated-android-validation.yml | 58 +++++++++++++++++++ .../workflows/reanimated-apple-validation.yml | 39 +++++++++++++ ...p.yml => reanimated-common-validation.yml} | 25 ++++---- ...hecks.yml => reanimated-static-checks.yml} | 21 ++----- ...typescript-compatibility-test-nightly.yml} | 7 +-- ...mework-reanimated-build-check-nightly.yml} | 6 +- ...nightly.yml => url-validation-nightly.yml} | 10 +--- .github/workflows/validate-ios.yml | 37 ------------ .github/workflows/validate-java.yml | 46 --------------- ...p-with-reanimated-build-check-nightly.yml} | 2 +- ...{validate-yarn.yml => yarn-validation.yml} | 14 ++--- .../cpp/reanimated/Fabric/ShadowTreeCloner.h | 8 ++- .../cpp/worklets/SharedItems/Shareables.cpp | 5 +- .../WorkletRuntimeDecorator.cpp | 3 +- packages/react-native-reanimated/package.json | 30 +++++----- .../scripts/cpplint.sh | 2 +- .../{validate-ios.sh => validate-apple.sh} | 0 40 files changed, 252 insertions(+), 298 deletions(-) rename .github/workflows/{build-v8-nightly.yml => V8-reanimated-build-check-nightly.yml} (97%) rename .github/workflows/{validate-plugin.yml => babel-plugin-static-check.yml} (90%) delete mode 100644 .github/workflows/build-monorepo-nightly.yml delete mode 100644 .github/workflows/build-release-npm-package-rea3.yml rename .github/workflows/{docs-check.yml => docs-reanimated-build-check.yml} (97%) rename .github/workflows/{publish-reanimated-docs.yml => docs-reanimated-publish.yml} (96%) rename .github/workflows/{android-build.yml => example-android-build-check.yml} (65%) rename .github/workflows/{ios-build.yml => example-ios-build-check.yml} (82%) rename .github/workflows/{macos-build.yml => example-macos-build-check.yml} (72%) rename .github/workflows/{build-next-example.yml => example-next-build-check-and-test.yml} (74%) rename .github/workflows/{tvos-build.yml => example-tvos-build-check.yml} (95%) rename .github/workflows/{static-example-apps-checks.yml => example-typescript-check-and-lint.yml} (80%) rename .github/workflows/{check-expo-dev-client-nightly.yml => expo-devclient-build-check-nightly.yml} (98%) rename .github/workflows/{close-when-stale.yml => github-close-when-stale-nightly.yml} (72%) rename .github/workflows/{platforms.yml => github-issue-platforms-check.yml} (87%) rename .github/workflows/{needs-repro.yml => github-issue-repro-check.yml} (84%) rename .github/workflows/{needs-more-info.yml => github-issue-template-check.yml} (97%) rename .github/workflows/{format-pull-request-description.yml => github-pull-request-description-format.yml} (88%) rename .github/workflows/{build-monorepo-action.yml => monorepo-app-reanimated-build-check-action.yml} (96%) rename .github/workflows/{build-monorepo.yml => monorepo-app-reanimated-build-check-nightly.yml} (80%) rename .github/workflows/{build-npm-package-action.yml => npm-reanimated-package-build.yml} (91%) rename .github/workflows/{build-nightly-npm-package.yml => npm-reanimated-publish-nightly.yml} (77%) rename .github/workflows/{check-react-native-nightly.yml => react-native-nightly-reanimated-build-check-nightly.yml} (90%) create mode 100644 .github/workflows/reanimated-android-validation.yml create mode 100644 .github/workflows/reanimated-apple-validation.yml rename .github/workflows/{validate-cpp.yml => reanimated-common-validation.yml} (58%) rename .github/workflows/{static-root-checks.yml => reanimated-static-checks.yml} (70%) rename .github/workflows/{check-TS-react-native.yml => reanimated-typescript-compatibility-test-nightly.yml} (87%) rename .github/workflows/{check-static-framework-nightly.yml => static-framework-reanimated-build-check-nightly.yml} (85%) rename .github/workflows/{detect-broken-urls-nightly.yml => url-validation-nightly.yml} (68%) delete mode 100644 .github/workflows/validate-ios.yml delete mode 100644 .github/workflows/validate-java.yml rename .github/workflows/{build-on-windows-nightly.yml => windows-hosted-app-with-reanimated-build-check-nightly.yml} (94%) rename .github/workflows/{validate-yarn.yml => yarn-validation.yml} (87%) rename packages/react-native-reanimated/scripts/{validate-ios.sh => validate-apple.sh} (100%) diff --git a/.github/workflows/build-v8-nightly.yml b/.github/workflows/V8-reanimated-build-check-nightly.yml similarity index 97% rename from .github/workflows/build-v8-nightly.yml rename to .github/workflows/V8-reanimated-build-check-nightly.yml index 6e2272371afa..8731f252110c 100644 --- a/.github/workflows/build-v8-nightly.yml +++ b/.github/workflows/V8-reanimated-build-check-nightly.yml @@ -1,4 +1,4 @@ -name: Test V8 on Android nightly +name: V8 Reanimated build check [Nightly] env: YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: diff --git a/.github/workflows/validate-plugin.yml b/.github/workflows/babel-plugin-static-check.yml similarity index 90% rename from .github/workflows/validate-plugin.yml rename to .github/workflows/babel-plugin-static-check.yml index fe5fb115d63f..dae3cb458d78 100644 --- a/.github/workflows/validate-plugin.yml +++ b/.github/workflows/babel-plugin-static-check.yml @@ -1,4 +1,4 @@ -name: Validate plugin +name: Babel plugin static check env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -35,10 +35,7 @@ jobs: - name: Install monorepo dependencies run: yarn install --immutable - - name: Install Reanimated node dependencies - working-directory: packages/react-native-reanimated - run: yarn install - - name: Build package + - name: Build Reanimated working-directory: packages/react-native-reanimated run: yarn build diff --git a/.github/workflows/build-monorepo-nightly.yml b/.github/workflows/build-monorepo-nightly.yml deleted file mode 100644 index 4c0af2ab0c10..000000000000 --- a/.github/workflows/build-monorepo-nightly.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Run nightly monorepo test -on: - schedule: - - cron: '37 19 * * *' # at 21:37 every day - workflow_dispatch: - -jobs: - call-build-workflow-rea-v3: - if: github.repository == 'software-mansion/react-native-reanimated' - uses: ./.github/workflows/build-monorepo.yml diff --git a/.github/workflows/build-release-npm-package-rea3.yml b/.github/workflows/build-release-npm-package-rea3.yml deleted file mode 100644 index cf0d68ecd0ba..000000000000 --- a/.github/workflows/build-release-npm-package-rea3.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Build release npm package, Reanimated 3 -env: - YARN_ENABLE_HARDENED_MODE: 0 -on: - workflow_dispatch: - -jobs: - call-build-workflow-rea-v3: - if: github.repository == 'software-mansion/react-native-reanimated' - uses: ./.github/workflows/build-npm-package-action.yml diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-reanimated-build-check.yml similarity index 97% rename from .github/workflows/docs-check.yml rename to .github/workflows/docs-reanimated-build-check.yml index 781cb9b617d0..4b058398d399 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-reanimated-build-check.yml @@ -1,4 +1,4 @@ -name: Test docs build +name: Docs Reanimated build check env: YARN_ENABLE_HARDENED_MODE: 0 on: diff --git a/.github/workflows/publish-reanimated-docs.yml b/.github/workflows/docs-reanimated-publish.yml similarity index 96% rename from .github/workflows/publish-reanimated-docs.yml rename to .github/workflows/docs-reanimated-publish.yml index cb94e3b9c56b..b1b2dd519081 100644 --- a/.github/workflows/publish-reanimated-docs.yml +++ b/.github/workflows/docs-reanimated-publish.yml @@ -1,4 +1,4 @@ -name: Publish Reanimated Docs +name: Docs Reanimated publish env: YARN_ENABLE_HARDENED_MODE: 0 on: diff --git a/.github/workflows/android-build.yml b/.github/workflows/example-android-build-check.yml similarity index 65% rename from .github/workflows/android-build.yml rename to .github/workflows/example-android-build-check.yml index d734371d7886..671936aef377 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/example-android-build-check.yml @@ -1,4 +1,4 @@ -name: Test Android build +name: Example Android build check env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -41,36 +41,28 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 - - name: Install dependencies in root - run: yarn install --immutable - - name: Setup Java 17 uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: 17 - - - name: Restore Reanimated node_modules from cache + # TODO: Install deps only when cache failed (use id and outputs) + # TODO: Check if this optimization works with new yarn + # TODO: Check if we should cache `yarn's` cache instead + - name: Restore node_modules from cache uses: actions/cache@v3 with: - path: packages/react-native-reanimated/node_modules - key: ${{ runner.os }}-android-node-modules-reanimated-${{ hashFiles('packages/react-native-reanimated/yarn.lock') }} - restore-keys: ${{ runner.os }}-android-node-modules-reanimated- - - - name: Install Reanimated node_modules - working-directory: packages/react-native-reanimated - run: yarn install --immutable - + path: . + key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + restore-keys: ${{ runner.os }}-node-modules- - name: Restore app node_modules from cache uses: actions/cache@v3 with: path: ${{ matrix.working-directory }}/node_modules - key: ${{ runner.os }}-android-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/yarn.lock', matrix.working-directory)) }} - restore-keys: ${{ runner.os }}-android-node-modules-${{ matrix.working-directory }}- - - - name: Install app node_modules - working-directory: ${{ matrix.working-directory }} - run: yarn install + key: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/yarn.lock', matrix.working-directory)) }} + restore-keys: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}- + - name: Install monorepo node dependencies + run: yarn install --immutable - name: Build app working-directory: ${{ matrix.working-directory }}/android diff --git a/.github/workflows/ios-build.yml b/.github/workflows/example-ios-build-check.yml similarity index 82% rename from .github/workflows/ios-build.yml rename to .github/workflows/example-ios-build-check.yml index 4fc99108c9c5..90392fe3c011 100644 --- a/.github/workflows/ios-build.yml +++ b/.github/workflows/example-ios-build-check.yml @@ -1,4 +1,4 @@ -name: Test iOS build +name: Example iOS build check env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -45,29 +45,22 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 - - name: Install monorepo node dependencies - run: yarn install - - name: Restore Reanimated node_modules from cache + # Does this optimization even work with new yarn? + # Perhaps we should cache `yarn's` cache instead? + - name: Restore node_modules from cache uses: actions/cache@v3 with: - path: packages/react-native-reanimated/node_modules - key: ${{ runner.os }}-node-modules-reanimated-${{ hashFiles('packages/react-native-reanimated/yarn.lock') }} - restore-keys: ${{ runner.os }}-node-modules-reanimated- - - - name: Install Reanimated node dependencies - working-directory: packages/react-native-reanimated - run: yarn install - + path: . + key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + restore-keys: ${{ runner.os }}-node-modules- - name: Restore app node_modules from cache uses: actions/cache@v3 with: path: ${{ matrix.working-directory }}/node_modules key: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/yarn.lock', matrix.working-directory)) }} restore-keys: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}- - - - name: Install app node_modules - working-directory: ${{ matrix.working-directory }} - run: yarn install + - name: Install monorepo node dependencies + run: yarn install --immutable - name: Restore Pods from cache uses: actions/cache@v3 diff --git a/.github/workflows/macos-build.yml b/.github/workflows/example-macos-build-check.yml similarity index 72% rename from .github/workflows/macos-build.yml rename to .github/workflows/example-macos-build-check.yml index 4a817622616c..b106307cef65 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/example-macos-build-check.yml @@ -1,4 +1,4 @@ -name: Test macOS build +name: Example macOS build check env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -41,32 +41,28 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 - - name: Install monorepo node dependencies - run: yarn install - - - name: Restore Reanimated node_modules from cache + # Does this optimization even work with new yarn? + # Perhaps we should cache `yarn's` cache instead? + - name: Restore node_modules from cache + id: monorepo-cache uses: actions/cache@v3 with: - path: packages/react-native-reanimated/node_modules - key: ${{ runner.os }}-macos-node-modules-reanimated-${{ hashFiles('packages/react-native-reanimated/yarn.lock') }} - restore-keys: ${{ runner.os }}-macos-node-modules-reanimated- - - - name: Install Reanimated node_modules - working-directory: packages/react-native-reanimated - run: yarn install - + path: . + key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + restore-keys: ${{ runner.os }}-node-modules- - name: Restore app node_modules from cache + id: app-cache uses: actions/cache@v3 with: - path: ${{ env.WORKING_DIRECTORY }}/node_modules - key: ${{ runner.os }}-macos-node-modules-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/yarn.lock', env.WORKING_DIRECTORY)) }} - restore-keys: ${{ runner.os }}-macos-node-modules-${{ env.WORKING_DIRECTORY }}- - - - name: Install app node_modules - working-directory: ${{ env.WORKING_DIRECTORY }} - run: yarn install + path: ${{ ENV.WORKING_DIRECTORY }}/node_modules + key: ${{ runner.os }}-node-modules-${{ ENV.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/yarn.lock', ENV.WORKING_DIRECTORY)) }} + restore-keys: ${{ runner.os }}-node-modules-${{ ENV.WORKING_DIRECTORY }}- + - name: Install monorepo node dependencies + if: steps.monorepo-cache.outputs.cache-hit != 'true' || steps.app-cache.outputs.cache-hit != 'true' + run: yarn install --immutable - name: Restore Pods from cache + id: pods-cache uses: actions/cache@v3 with: path: | @@ -76,6 +72,7 @@ jobs: key: ${{ runner.os }}-macos-pods-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/macos/Podfile.lock', env.WORKING_DIRECTORY)) }} - name: Install Pods + if: steps.pods-cache.outputs.cache-hit != 'true' working-directory: ${{ env.WORKING_DIRECTORY }}/macos run: bundle install && bundle exec pod install diff --git a/.github/workflows/build-next-example.yml b/.github/workflows/example-next-build-check-and-test.yml similarity index 74% rename from .github/workflows/build-next-example.yml rename to .github/workflows/example-next-build-check-and-test.yml index 6d7b7dc50306..2109f7f0a46f 100644 --- a/.github/workflows/build-next-example.yml +++ b/.github/workflows/example-next-build-check-and-test.yml @@ -1,4 +1,4 @@ -name: Build/test NextExample +name: Example Next build check and tests env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -22,17 +22,10 @@ jobs: uses: actions/checkout@v4 - name: Install monorepo node dependencies run: yarn install --immutable - - name: Install Reanimated node dependencies - working-directory: packages/react-native-reanimated - run: yarn install --immutable - name: Build Reanimated package working-directory: packages/react-native-reanimated run: yarn build - - name: Install NextExample node_modules - working-directory: apps/next-example - run: yarn install --immutable - - name: Compile production build working-directory: apps/next-example run: yarn build:next diff --git a/.github/workflows/tvos-build.yml b/.github/workflows/example-tvos-build-check.yml similarity index 95% rename from .github/workflows/tvos-build.yml rename to .github/workflows/example-tvos-build-check.yml index e738886ffb9c..1da4ef995218 100644 --- a/.github/workflows/tvos-build.yml +++ b/.github/workflows/example-tvos-build-check.yml @@ -1,4 +1,4 @@ -name: Test tvOS build +name: Example tvOS build check env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@v4 - name: Install monorepo node dependencies - run: yarn install + run: yarn install --immutable - name: Restore Reanimated node_modules from cache uses: actions/cache@v3 @@ -51,7 +51,7 @@ jobs: - name: Install Reanimated node_modules working-directory: packages/react-native-reanimated - run: yarn install + run: yarn install --immutable - name: Restore app node_modules from cache uses: actions/cache@v3 @@ -62,7 +62,7 @@ jobs: - name: Install app node_modules working-directory: ${{ env.WORKING_DIRECTORY }} - run: yarn install + run: yarn install --immutable - name: Restore Pods from cache uses: actions/cache@v3 diff --git a/.github/workflows/static-example-apps-checks.yml b/.github/workflows/example-typescript-check-and-lint.yml similarity index 80% rename from .github/workflows/static-example-apps-checks.yml rename to .github/workflows/example-typescript-check-and-lint.yml index e90435cf7fcd..2c8c9d50b267 100644 --- a/.github/workflows/static-example-apps-checks.yml +++ b/.github/workflows/example-typescript-check-and-lint.yml @@ -1,4 +1,4 @@ -name: Test TypeScript and Lint in examples +name: Example Typescript check and lint env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -16,12 +16,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - working-directory: - [ - apps/paper-example, + working-directory: [ + apps/common-app, apps/fabric-example, - apps/web-example, + apps/macos-example, + # We don't check for Next. + # apps/next-example, + apps/paper-example, apps/tvos-example, + apps/web-example, ] concurrency: group: typescript-${{ matrix.working-directory }}-${{ github.ref }} @@ -37,16 +40,10 @@ jobs: run: .github/workflows/helper/clear-annotations.sh - name: Install monorepo node dependencies - run: yarn install - - name: Install Reanimated node dependencies - working-directory: packages/react-native-reanimated - run: yarn install + run: yarn install --immutable - name: Build Reanimated package working-directory: packages/react-native-reanimated run: yarn build - - name: Install ${{ matrix.working-directory }} app node dependencies - working-directory: ${{ matrix.working-directory }} - run: yarn - name: Check types working-directory: ${{ matrix.working-directory }} diff --git a/.github/workflows/check-expo-dev-client-nightly.yml b/.github/workflows/expo-devclient-build-check-nightly.yml similarity index 98% rename from .github/workflows/check-expo-dev-client-nightly.yml rename to .github/workflows/expo-devclient-build-check-nightly.yml index 9fdb51fea505..9da3a225e2d0 100644 --- a/.github/workflows/check-expo-dev-client-nightly.yml +++ b/.github/workflows/expo-devclient-build-check-nightly.yml @@ -1,4 +1,4 @@ -name: Check Expo dev-client nightly build +name: Expo DevClient build check [Nightly] env: YARN_ENABLE_HARDENED_MODE: 0 SCRIPT_PATH: ${{github.workspace}}/reanimated_repo/.github/workflows/helper/configureDevClient.js diff --git a/.github/workflows/close-when-stale.yml b/.github/workflows/github-close-when-stale-nightly.yml similarity index 72% rename from .github/workflows/close-when-stale.yml rename to .github/workflows/github-close-when-stale-nightly.yml index 490ebfce1779..6a3120c7bf74 100644 --- a/.github/workflows/close-when-stale.yml +++ b/.github/workflows/github-close-when-stale-nightly.yml @@ -1,7 +1,7 @@ -name: Check for stale issues +name: Github "Close when stale" [Nightly] on: schedule: - - cron: "37 21 * * *" # at 21:37 every day + - cron: '37 21 * * *' # at 21:37 every day issues: types: [edited] issue_comment: @@ -16,12 +16,12 @@ jobs: - name: Checkout Actions uses: actions/checkout@v4 with: - repository: "software-mansion-labs/swmansion-bot" + repository: 'software-mansion-labs/swmansion-bot' ref: stable - uses: actions/cache@v3 with: - path: "**/node_modules" + path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Install Actions @@ -30,5 +30,5 @@ jobs: - name: Close when stale uses: ./close-when-stale with: - close-when-stale-label: "Close when stale" + close-when-stale-label: 'Close when stale' days-to-close: 14 diff --git a/.github/workflows/platforms.yml b/.github/workflows/github-issue-platforms-check.yml similarity index 87% rename from .github/workflows/platforms.yml rename to .github/workflows/github-issue-platforms-check.yml index 4fa4fcbc62e7..311f89f81195 100644 --- a/.github/workflows/platforms.yml +++ b/.github/workflows/github-issue-platforms-check.yml @@ -1,4 +1,4 @@ -name: Check for platforms +name: Github issue platforms check on: issues: types: [opened, edited] @@ -14,12 +14,12 @@ jobs: - name: Checkout Actions uses: actions/checkout@v4 with: - repository: "software-mansion-labs/swmansion-bot" + repository: 'software-mansion-labs/swmansion-bot' ref: stable - uses: actions/cache@v3 with: - path: "**/node_modules" + path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Install Actions diff --git a/.github/workflows/needs-repro.yml b/.github/workflows/github-issue-repro-check.yml similarity index 84% rename from .github/workflows/needs-repro.yml rename to .github/workflows/github-issue-repro-check.yml index c17a9b70c9d9..d7c8bc9c0452 100644 --- a/.github/workflows/needs-repro.yml +++ b/.github/workflows/github-issue-repro-check.yml @@ -1,4 +1,4 @@ -name: Check for reproduction +name: GitHub issue repro check on: issues: types: [opened, edited] @@ -16,12 +16,12 @@ jobs: - name: Checkout Actions uses: actions/checkout@v4 with: - repository: "software-mansion-labs/swmansion-bot" + repository: 'software-mansion-labs/swmansion-bot' ref: stable - uses: actions/cache@v3 with: - path: "**/node_modules" + path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Install Actions @@ -31,7 +31,7 @@ jobs: uses: ./needs-repro with: github-token: ${{ secrets.GITHUB_TOKEN }} - needs-repro-label: "Missing repro" + needs-repro-label: 'Missing repro' needs-repro-response: "Hey! 👋 \n\nThe issue doesn't seem to contain a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example).\n\nCould you provide a [snack](https://snack.expo.dev/) or a link to a GitHub repository under your username that reproduces the problem?" - repro-provided-label: "Repro provided" + repro-provided-label: 'Repro provided' check-issues-only-created-after: 2022-01-01 diff --git a/.github/workflows/needs-more-info.yml b/.github/workflows/github-issue-template-check.yml similarity index 97% rename from .github/workflows/needs-more-info.yml rename to .github/workflows/github-issue-template-check.yml index 8c4c318f03ed..f8e89f2b1d79 100644 --- a/.github/workflows/needs-more-info.yml +++ b/.github/workflows/github-issue-template-check.yml @@ -1,4 +1,4 @@ -name: Check issue template +name: GitHub issue template check env: YARN_ENABLE_HARDENED_MODE: 0 on: diff --git a/.github/workflows/format-pull-request-description.yml b/.github/workflows/github-pull-request-description-format.yml similarity index 88% rename from .github/workflows/format-pull-request-description.yml rename to .github/workflows/github-pull-request-description-format.yml index 5dea8d2c6b19..5a639db17983 100644 --- a/.github/workflows/format-pull-request-description.yml +++ b/.github/workflows/github-pull-request-description-format.yml @@ -1,4 +1,4 @@ -name: Format Pull Request Description +name: GitHub Pull Request description format on: pull_request: types: diff --git a/.github/workflows/build-monorepo-action.yml b/.github/workflows/monorepo-app-reanimated-build-check-action.yml similarity index 96% rename from .github/workflows/build-monorepo-action.yml rename to .github/workflows/monorepo-app-reanimated-build-check-action.yml index 7798cbaba3a9..9be7cdeab13f 100644 --- a/.github/workflows/build-monorepo-action.yml +++ b/.github/workflows/monorepo-app-reanimated-build-check-action.yml @@ -1,4 +1,4 @@ -name: Test build in monorepo +name: Monorepo app Reanimated build check [Action] env: YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: @@ -32,6 +32,7 @@ jobs: - name: Setup monorepo working-directory: monorepo + # TODO: Put Monorepo template into a separate repo/package run: echo '{"name":"rnos-monorepo-tester","version":"1.0.0","license":"MIT","private":true,"workspaces":{"packages":["RootApp","packages/PackageApp", "AppA", "AppB"],"nohoist":["**/react","**/react-dom","**/react-native","**/react-native/**","**/react-native-codegen","**/react-native-dev-menu"]}}' > package.json - name: Install dependencies run: yarn install diff --git a/.github/workflows/build-monorepo.yml b/.github/workflows/monorepo-app-reanimated-build-check-nightly.yml similarity index 80% rename from .github/workflows/build-monorepo.yml rename to .github/workflows/monorepo-app-reanimated-build-check-nightly.yml index 84d1eb593375..b4ce300ab93f 100644 --- a/.github/workflows/build-monorepo.yml +++ b/.github/workflows/monorepo-app-reanimated-build-check-nightly.yml @@ -1,4 +1,4 @@ -name: Test monorepo build +name: Monorepo app Reanimated build check [Nightly] on: pull_request: paths: @@ -19,13 +19,15 @@ on: - packages/react-native-reanimated/RNReanimated.podspec - packages/react-native-reanimated/scripts/reanimated_utils.rb - packages/react-native-reanimated/android/build.gradle - workflow_call: + schedule: + - cron: '37 19 * * *' # at 21:37 every day + workflow_dispatch: jobs: build_android_reanimated_non_hoisted: if: github.repository == 'software-mansion/react-native-reanimated' name: Android (non-hoisted Reanimated) - uses: ./.github/workflows/build-monorepo-action.yml + uses: ./.github/workflows/monorepo-app-reanimated-build-check-action.yml with: platform: Android concurrency_group: build_monorepo_android_in_app_reanimated-${{ github.ref }} @@ -34,7 +36,7 @@ jobs: build_ios_reanimated_non_hoisted: if: github.repository == 'software-mansion/react-native-reanimated' name: iOS (non-hoisted Reanimated) - uses: ./.github/workflows/build-monorepo-action.yml + uses: ./.github/workflows/monorepo-app-reanimated-build-check-action.yml with: platform: iOS concurrency_group: build_monorepo_ios_in_app_reanimated-${{ github.ref }} @@ -43,7 +45,7 @@ jobs: build_android_reanimated_hoisted: if: github.repository == 'software-mansion/react-native-reanimated' name: Android (hoisted Reanimated) - uses: ./.github/workflows/build-monorepo-action.yml + uses: ./.github/workflows/monorepo-app-reanimated-build-check-action.yml with: platform: Android concurrency_group: build_monorepo_android_reanimated_hoisted-${{ github.ref }} @@ -52,7 +54,7 @@ jobs: build_ios_reanimated_hoisted: if: github.repository == 'software-mansion/react-native-reanimated' name: iOS (hoisted Reanimated) - uses: ./.github/workflows/build-monorepo-action.yml + uses: ./.github/workflows/monorepo-app-reanimated-build-check-action.yml with: platform: iOS concurrency_group: build_monorepo_ios_reanimated_hoisted-${{ github.ref }} diff --git a/.github/workflows/build-npm-package-action.yml b/.github/workflows/npm-reanimated-package-build.yml similarity index 91% rename from .github/workflows/build-npm-package-action.yml rename to .github/workflows/npm-reanimated-package-build.yml index ccb3024c2109..c25b6155a4e3 100644 --- a/.github/workflows/build-npm-package-action.yml +++ b/.github/workflows/npm-reanimated-package-build.yml @@ -1,4 +1,4 @@ -name: Build npm package +name: NPM Reanimated package build env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -29,6 +29,8 @@ jobs: build: if: github.repository == 'software-mansion/react-native-reanimated' runs-on: ubuntu-latest + env: + PACKAGE_NAME: steps: - name: Check out uses: actions/checkout@v4 @@ -43,6 +45,9 @@ jobs: - name: Clear annotations run: .github/workflows/helper/clear-annotations.sh + - name: Install monorepo node dependencies + run: yarn install --immutable + - name: Build package working-directory: packages/react-native-reanimated id: build @@ -75,7 +80,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.PACKAGE_NAME }} - path: "packages/react-native-reanimated/${{ env.PACKAGE_NAME }}" + path: 'packages/react-native-reanimated/${{ env.PACKAGE_NAME }}' - name: Move package to repo root working-directory: packages/react-native-reanimated diff --git a/.github/workflows/build-nightly-npm-package.yml b/.github/workflows/npm-reanimated-publish-nightly.yml similarity index 77% rename from .github/workflows/build-nightly-npm-package.yml rename to .github/workflows/npm-reanimated-publish-nightly.yml index 52f737f929f6..f49c0a5b23f1 100644 --- a/.github/workflows/build-nightly-npm-package.yml +++ b/.github/workflows/npm-reanimated-publish-nightly.yml @@ -1,4 +1,4 @@ -name: Build nightly npm package +name: NPM Reanimated publish [Nightly] env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -9,7 +9,7 @@ on: jobs: call-build-workflow-rea-v3: if: github.repository == 'software-mansion/react-native-reanimated' - uses: ./.github/workflows/build-npm-package-action.yml + uses: ./.github/workflows/npm-reanimated-package-build.yml with: option: --nightly publish_on_npm: true diff --git a/.github/workflows/check-react-native-nightly.yml b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml similarity index 90% rename from .github/workflows/check-react-native-nightly.yml rename to .github/workflows/react-native-nightly-reanimated-build-check-nightly.yml index a2eb93578151..9572bc6a8a79 100644 --- a/.github/workflows/check-react-native-nightly.yml +++ b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml @@ -1,4 +1,4 @@ -name: Check React Native nightly build +name: React Native nightly Reanimated build check [Nightly] on: pull_request: paths: @@ -19,9 +19,9 @@ jobs: group: ios-react-native-nightly-${{ matrix.react-native-architecture }}-${{ github.ref }} cancel-in-progress: true steps: - # Sometimes `npx react-native init` fails due to dependency mismatches or other - # rather vague errors. This is a workaround for that. - name: Setup Yarn + # Sometimes `npx react-native init` fails due to dependency mismatches or other + # rather vague errors. This is a workaround for that. run: corepack enable && yarn init - name: Create app run: | @@ -64,9 +64,9 @@ jobs: with: distribution: 'zulu' java-version: '18' - # Sometimes `npx react-native init` fails due to dependency mismatches or other - # rather vague errors. This is a workaround for that. - name: Setup Yarn + # Sometimes `npx react-native init` fails due to dependency mismatches or other + # rather vague errors. This is a workaround for that. run: corepack enable && yarn init - name: Create app run: | diff --git a/.github/workflows/reanimated-android-validation.yml b/.github/workflows/reanimated-android-validation.yml new file mode 100644 index 000000000000..773ccd947826 --- /dev/null +++ b/.github/workflows/reanimated-android-validation.yml @@ -0,0 +1,58 @@ +name: Reanimated Android validation +env: + YARN_ENABLE_HARDENED_MODE: 0 +on: + pull_request: + paths: + - '.github/workflows/validate-java.yml' + - 'packages/react-native-reanimated/android/src/main/java/**' + - 'packages/react-native-reanimated/android/build.gradle' + - 'packages/react-native-reanimated/scripts/cpplint.sh' + - 'packages/react-native-reanimated/Common/cpp/**' + merge_group: + branches: + - main + push: + branches: + - main + paths: + - '.github/workflows/validate-java.yml' + - 'packages/react-native-reanimated/android/src/main/java/**' + - 'packages/react-native-reanimated/android/build.gradle' + - 'packages/react-native-reanimated/scripts/cpplint.sh' + - 'packages/react-native-reanimated/Common/cpp/**' + +jobs: + check: + if: github.repository == 'software-mansion/react-native-reanimated' + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7] + concurrency: + group: validate-java-${{ github.ref }} + cancel-in-progress: true + steps: + - name: checkout + uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + cache: 'yarn' + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install cpplint + - name: Clear annotations + run: .github/workflows/helper/clear-annotations.sh + + - name: Install monorepo node dependencies + run: yarn install --immutable + + - name: Lint Android + working-directory: packages/react-native-reanimated + run: yarn lint:android diff --git a/.github/workflows/reanimated-apple-validation.yml b/.github/workflows/reanimated-apple-validation.yml new file mode 100644 index 000000000000..5e43bfd7cb67 --- /dev/null +++ b/.github/workflows/reanimated-apple-validation.yml @@ -0,0 +1,39 @@ +name: Reanimated Apple validation +env: + YARN_ENABLE_HARDENED_MODE: 0 +on: + push: + branches: + - main + paths: + - '.github/workflows/validate-ios.yml' + - 'packages/react-native-reanimated/apple/**' + - 'packages/react-native-reanimated/package.json' + - 'packages/react-native-reanimated/scripts/validate-apple.sh' + - 'packages/react-native-reanimated/scripts/cpplint.sh' + - 'packages/react-native-reanimated/Common/cpp/**' + pull_request: + paths: + - '.github/workflows/validate-ios.yml' + - 'packages/react-native-reanimated/apple/**' + - 'packages/react-native-reanimated/package.json' + - 'packages/react-native-reanimated/scripts/validate-apple.sh' + - 'packages/react-native-reanimated/scripts/cpplint.sh' + - 'packages/react-native-reanimated/Common/cpp/**' + merge_group: + branches: + - main + +jobs: + check: + if: github.repository == 'software-mansion/react-native-reanimated' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install monorepo node dependencies + run: yarn install --immutable + + - name: Lint apple + working-directory: packages/react-native-reanimated + run: yarn lint:apple diff --git a/.github/workflows/validate-cpp.yml b/.github/workflows/reanimated-common-validation.yml similarity index 58% rename from .github/workflows/validate-cpp.yml rename to .github/workflows/reanimated-common-validation.yml index 095711a1eaac..a06522e03523 100644 --- a/.github/workflows/validate-cpp.yml +++ b/.github/workflows/reanimated-common-validation.yml @@ -1,21 +1,17 @@ -name: Validate C++ +name: Reanimated Common validation on: push: branches: - main paths: - - ".github/workflows/validate-cpp.yml" - - "packages/react-native-reanimated/scripts/cpplint.sh" - - "packages/react-native-reanimated/Common/cpp/**" - - "packages/react-native-reanimated/apple/native/**" - - "packages/react-native-reanimated/android/src/main/cpp/**" + - '.github/workflows/validate-cpp.yml' + - 'packages/react-native-reanimated/scripts/cpplint.sh' + - 'packages/react-native-reanimated/Common/cpp/**' pull_request: paths: - - ".github/workflows/validate-cpp.yml" - - "packages/react-native-reanimated/scripts/cpplint.sh" - - "packages/react-native-reanimated/Common/cpp/**" - - "packages/react-native-reanimated/apple/native/**" - - "packages/react-native-reanimated/android/src/main/cpp/**" + - '.github/workflows/validate-cpp.yml' + - 'packages/react-native-reanimated/scripts/cpplint.sh' + - 'packages/react-native-reanimated/Common/cpp/**' merge_group: branches: - main @@ -40,11 +36,12 @@ jobs: run: | python -m pip install --upgrade pip pip install cpplint + - name: Install monorepo node dependencies + run: yarn install --immutable - - name: Run cpplint + - name: Lint Common working-directory: packages/react-native-reanimated - run: | - scripts/cpplint.sh + run: yarn lint:common - name: Disallow DEBUG macros run: | diff --git a/.github/workflows/static-root-checks.yml b/.github/workflows/reanimated-static-checks.yml similarity index 70% rename from .github/workflows/static-root-checks.yml rename to .github/workflows/reanimated-static-checks.yml index 25fd18d1b467..6e35affa5cd1 100644 --- a/.github/workflows/static-root-checks.yml +++ b/.github/workflows/reanimated-static-checks.yml @@ -1,4 +1,4 @@ -name: Test TypeScript and Lint in root +name: Reanimated static checks env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -28,23 +28,14 @@ jobs: run: .github/workflows/helper/clear-annotations.sh - name: Install monorepo node dependencies - run: yarn install - - name: Install Reanimated node dependencies - working-directory: packages/react-native-reanimated - run: yarn install - - name: Build Reanimated package - working-directory: packages/react-native-reanimated - run: yarn build + run: yarn install --immutable - - name: Check types + - name: Check TypeScript types working-directory: packages/react-native-reanimated - run: yarn type:check:all - - name: Lint react-native-reanimated + run: yarn type:check + - name: Lint JavaScript working-directory: packages/react-native-reanimated run: yarn lint:js - - name: Lint common-app - working-directory: apps/common-app - run: yarn lint - name: Find unused code working-directory: packages/react-native-reanimated run: yarn find-unused-code:js @@ -56,4 +47,4 @@ jobs: run: yarn use-strict-check - name: Run jest unit tests working-directory: packages/react-native-reanimated - run: yarn test:unit + run: yarn test diff --git a/.github/workflows/check-TS-react-native.yml b/.github/workflows/reanimated-typescript-compatibility-test-nightly.yml similarity index 87% rename from .github/workflows/check-TS-react-native.yml rename to .github/workflows/reanimated-typescript-compatibility-test-nightly.yml index 079ddbd316b9..f35ac80f6c62 100644 --- a/.github/workflows/check-TS-react-native.yml +++ b/.github/workflows/reanimated-typescript-compatibility-test-nightly.yml @@ -1,4 +1,4 @@ -name: Check TypeScript with different React Native versions +name: Reanimated TypeScript compatibility test [Nightly] env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -32,10 +32,7 @@ jobs: - name: Install monorepo node dependencies run: yarn install - - name: Install Reanimated node dependencies - working-directory: packages/react-native-reanimated - run: yarn install - - name: Build Reanimated node dependencies + - name: Build Reanimated working-directory: packages/react-native-reanimated run: yarn build - name: Install react-native ${{ matrix.react-native-version }} diff --git a/.github/workflows/check-static-framework-nightly.yml b/.github/workflows/static-framework-reanimated-build-check-nightly.yml similarity index 85% rename from .github/workflows/check-static-framework-nightly.yml rename to .github/workflows/static-framework-reanimated-build-check-nightly.yml index dce0c3ba44b9..1e29643603a9 100644 --- a/.github/workflows/check-static-framework-nightly.yml +++ b/.github/workflows/static-framework-reanimated-build-check-nightly.yml @@ -1,4 +1,4 @@ -name: Check static framework nightly build +name: Static framework with Reanimated build check [Nightly] env: YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: @@ -29,11 +29,11 @@ jobs: - name: Install Paper Pods if: ${{ matrix.react-native-architecture == 'Paper' }} working-directory: app/ios - run: export USE_FRAMEWORKS=static NO_FLIPPER=1 && pod install + run: export USE_FRAMEWORKS=static NO_FLIPPER=1 && bundle exec && bundle exec pod install - name: Install Fabric Pods if: ${{ matrix.react-native-architecture == 'Fabric' }} working-directory: app/ios - run: export USE_FRAMEWORKS=static NO_FLIPPER=1 RCT_NEW_ARCH_ENABLED=1 && pod install + run: export USE_FRAMEWORKS=static NO_FLIPPER=1 RCT_NEW_ARCH_ENABLED=1 && bundle exec && bundle exec pod install - name: Build app working-directory: app run: npx react-native run-ios --no-packager diff --git a/.github/workflows/detect-broken-urls-nightly.yml b/.github/workflows/url-validation-nightly.yml similarity index 68% rename from .github/workflows/detect-broken-urls-nightly.yml rename to .github/workflows/url-validation-nightly.yml index 1f7ec5b6ab1f..a1f9fb95120b 100644 --- a/.github/workflows/detect-broken-urls-nightly.yml +++ b/.github/workflows/url-validation-nightly.yml @@ -1,4 +1,4 @@ -name: Validate urls in source code +name: URL validation [Nightly] env: YARN_ENABLE_HARDENED_MODE: 0 on: @@ -7,7 +7,7 @@ on: - .github/workflows/detect-broken-urls-nightly.yml - packages/react-native-reanimated/scripts/validate-urls.js schedule: - - cron: "37 19 * * *" + - cron: '37 19 * * *' workflow_dispatch: jobs: @@ -19,13 +19,9 @@ jobs: uses: actions/checkout@v4 - name: Install monorepo node dependencies run: yarn install - - name: Install Reanimated node dependencies - working-directory: packages/react-native-reanimated - run: yarn install - name: Install node-fetch 2 working-directory: packages/react-native-reanimated run: yarn add node-fetch@2 - name: Validate urls - working-directory: packages/react-native-reanimated - run: node scripts/validate-urls.js + run: node packages/react-native-reanimated/scripts/validate-urls.js diff --git a/.github/workflows/validate-ios.yml b/.github/workflows/validate-ios.yml deleted file mode 100644 index 835e3d3117ca..000000000000 --- a/.github/workflows/validate-ios.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Validate iOS -env: - YARN_ENABLE_HARDENED_MODE: 0 -on: - push: - branches: - - main - paths: - - ".github/workflows/validate-ios.yml" - - "packages/react-native-reanimated/apple/**" - - "packages/react-native-reanimated/package.json" - - "packages/react-native-reanimated/scripts/validate-ios.sh" - pull_request: - paths: - - ".github/workflows/validate-ios.yml" - - "packages/react-native-reanimated/apple/**" - - "packages/react-native-reanimated/package.json" - - "packages/react-native-reanimated/scripts/validate-ios.sh" - merge_group: - branches: - - main - -jobs: - check: - if: github.repository == 'software-mansion/react-native-reanimated' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install monorepo nodedependencies - run: yarn install - - name: Install Reanimated node dependencies - working-directory: packages/react-native-reanimated - run: yarn install - - name: Lint iOS - working-directory: packages/react-native-reanimated - run: yarn lint:ios diff --git a/.github/workflows/validate-java.yml b/.github/workflows/validate-java.yml deleted file mode 100644 index ff0deb533ef9..000000000000 --- a/.github/workflows/validate-java.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Java Lint -env: - YARN_ENABLE_HARDENED_MODE: 0 -on: - pull_request: - paths: - - ".github/workflows/validate-java.yml" - - "packages/react-native-reanimated/android/src/main/java/**" - - "packages/react-native-reanimated/android/build.gradle" - merge_group: - branches: - - main - push: - branches: - - main - paths: - - ".github/workflows/validate-java.yml" - - "packages/react-native-reanimated/android/src/main/java/**" - - "packages/react-native-reanimated/android/build.gradle" - -jobs: - check: - if: github.repository == 'software-mansion/react-native-reanimated' - runs-on: ubuntu-latest - concurrency: - group: validate-java-${{ github.ref }} - cancel-in-progress: true - steps: - - name: checkout - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - cache: "yarn" - - name: Clear annotations - run: .github/workflows/helper/clear-annotations.sh - - - name: Install monorepo node dependencies - run: yarn install - - name: Install Reanimated node dependencies - working-directory: packages/react-native-reanimated - run: yarn - - - name: Lint Java - working-directory: packages/react-native-reanimated - run: yarn lint:java diff --git a/.github/workflows/build-on-windows-nightly.yml b/.github/workflows/windows-hosted-app-with-reanimated-build-check-nightly.yml similarity index 94% rename from .github/workflows/build-on-windows-nightly.yml rename to .github/workflows/windows-hosted-app-with-reanimated-build-check-nightly.yml index 4ad328b2083e..0c85360c6a8c 100644 --- a/.github/workflows/build-on-windows-nightly.yml +++ b/.github/workflows/windows-hosted-app-with-reanimated-build-check-nightly.yml @@ -1,4 +1,4 @@ -name: Test build on Windows nightly +name: Windows hosted app with Reanimated build check [Nightly] env: YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: diff --git a/.github/workflows/validate-yarn.yml b/.github/workflows/yarn-validation.yml similarity index 87% rename from .github/workflows/validate-yarn.yml rename to .github/workflows/yarn-validation.yml index 67c9bfb760c5..5138d8fc2235 100644 --- a/.github/workflows/validate-yarn.yml +++ b/.github/workflows/yarn-validation.yml @@ -1,12 +1,12 @@ -name: Validate yarn +name: Yarn validation env: YARN_ENABLE_HARDENED_MODE: 1 on: pull_request: paths: - - ".github/workflows/validate-yarn.yml" - - "**/package.json" - - "**/yarn.lock" + - '.github/workflows/validate-yarn.yml' + - '**/package.json' + - '**/yarn.lock' merge_group: branches: - main @@ -14,9 +14,9 @@ on: branches: - main paths: - - ".github/workflows/validate-yarn.yml" - - "**/package.json" - - "**/yarn.lock" + - '.github/workflows/validate-yarn.yml' + - '**/package.json' + - '**/yarn.lock' jobs: check: diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/Fabric/ShadowTreeCloner.h b/packages/react-native-reanimated/Common/cpp/reanimated/Fabric/ShadowTreeCloner.h index efa186252f9a..e3f9f6d91413 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/Fabric/ShadowTreeCloner.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/Fabric/ShadowTreeCloner.h @@ -4,8 +4,8 @@ #include #include -#include #include +#include #include #include #include @@ -15,8 +15,10 @@ using namespace react; namespace reanimated { -using PropsMap = std::unordered_map>; -using ChildrenMap = std::unordered_map>; +using PropsMap = + std::unordered_map>; +using ChildrenMap = + std::unordered_map>; RootShadowNode::Unshared cloneShadowTreeWithNewProps( const RootShadowNode &oldRootNode, diff --git a/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.cpp b/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.cpp index 357e00548c74..990a24c25047 100644 --- a/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.cpp +++ b/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.cpp @@ -233,7 +233,10 @@ ShareableObject::ShareableObject( jsi::Value ShareableObject::toJSValue(jsi::Runtime &rt) { auto obj = jsi::Object(rt); for (size_t i = 0, size = data_.size(); i < size; i++) { - obj.setProperty(rt, jsi::String::createFromUtf8(rt, data_[i].first), data_[i].second->toJSValue(rt)); + obj.setProperty( + rt, + jsi::String::createFromUtf8(rt, data_[i].first), + data_[i].second->toJSValue(rt)); } #if SUPPORTS_NATIVE_STATE if (nativeState_ != nullptr) { diff --git a/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/WorkletRuntimeDecorator.cpp b/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/WorkletRuntimeDecorator.cpp index 249d4bdd3888..19ee03210a11 100644 --- a/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/WorkletRuntimeDecorator.cpp +++ b/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/WorkletRuntimeDecorator.cpp @@ -111,7 +111,8 @@ void WorkletRuntimeDecorator::decorate( for (size_t i = 0; i < argsSize; i++) { args[i] = argsArray.getValueAtIndex(rt, i); } - remoteFun.asObject(rt).asFunction(rt).call(rt, const_cast(args.data()), args.size()); + remoteFun.asObject(rt).asFunction(rt).call( + rt, const_cast(args.data()), args.size()); } }); }); diff --git a/packages/react-native-reanimated/package.json b/packages/react-native-reanimated/package.json index 3d7b6f8f410a..f73e1a0a1b3d 100644 --- a/packages/react-native-reanimated/package.json +++ b/packages/react-native-reanimated/package.json @@ -3,34 +3,30 @@ "version": "3.15.0", "description": "More powerful alternative to Animated library for React Native.", "scripts": { - "test": "yarn format:js && yarn lint:js && yarn test:unit", - "test:unit": "jest", - "test:update-snapshot": "jest --updateSnapshot", - "lint": "yarn lint:js && yarn lint:plugin && yarn lint:cpp && yarn lint:java && yarn lint:ios", + "test": "jest", + "lint": "yarn lint:js && yarn lint:plugin && yarn lint:common && yarn lint:android && yarn lint:apple", "lint:js": "eslint --ext '.js,.ts,.tsx' src __tests__ __typetests__ && yarn prettier --check src __tests__ __typetests__", - "lint:plugin": "cd plugin && yarn lint && cd ..", - "lint:docs": "cd docs && yarn lint && cd ..", - "lint:java": "./android/gradlew -p android spotlessCheck -q", - "lint:cpp": "./scripts/cpplint.sh", - "lint:ios": "./scripts/validate-ios.sh && yarn format:ios --dry-run", - "format": "yarn format:js && yarn format:plugin && yarn format:java && yarn format:ios && yarn format:android && yarn format:common", + "lint:plugin": "cd plugin && yarn lint", + "lint:android": "./android/gradlew -p android spotlessCheck -q && ./scripts/cpplint.sh android/src && yarn format:android:cpp --dry-run -Werror", + "lint:common": "./scripts/cpplint.sh Common && yarn format:common --dry-run -Werror", + "lint:apple": "./scripts/validate-apple.sh && yarn format:apple --dry-run -Werror", + "format": "yarn format:js && yarn format:plugin && yarn format:apple && yarn format:android:java && yarn format:android:cpp && yarn format:common", "format:js": "prettier --write --list-different src __tests__ __typetests__", "format:plugin": "cd plugin && yarn format", - "format:java": "node ./scripts/format-java.js", - "format:ios": "find apple/ -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.mm\" -o -iname \"*.cpp\" | xargs clang-format -i --Werror", - "format:android": "find android/src/ -iname \"*.h\" -o -iname \"*.cpp\" | xargs clang-format -i", + "format:apple": "find apple/ -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.mm\" -o -iname \"*.cpp\" | xargs clang-format -i", + "format:android:java": "node ./scripts/format-java.js", + "format:android:cpp": "find android/src/ -iname \"*.h\" -o -iname \"*.cpp\" | xargs clang-format -i", "format:common": "find Common/ -iname \"*.h\" -o -iname \"*.cpp\" | xargs clang-format -i", - "format:docs": "cd docs && yarn format", "find-unused-code:js": "yarn ts-prune --ignore \"index|.web.\" --error", + "type:check": "yarn type:check:src && yarn type:check:plugin && ./scripts/test-ts.sh ../../apps/common-app/src/App.tsx __typetests__/common __typetests__/72plus __typetests__/legacy", "type:check:src": "yarn tsc --noEmit", - "type:check:plugin": "cd plugin && yarn type:check:src && cd ..", + "type:check:plugin": "cd plugin && yarn type:check:src", "type:check:app": "./scripts/test-ts.sh ../../apps/common-app/src/App.tsx", "type:check:tests:common": "./scripts/test-ts.sh __typetests__/common", "type:check:tests:0.72+": "./scripts/test-ts.sh __typetests__/72plus", "type:check:tests:legacy": "./scripts/test-ts.sh __typetests__/legacy", - "type:check:all": "yarn type:check:src && yarn type:check:plugin && ./scripts/test-ts.sh ../../apps/common-app/src/App.tsx __typetests__/common __typetests__/72plus __typetests__/legacy", "build": "yarn build:plugin && bob build", - "build:plugin": "cd plugin && yarn install && yarn build", + "build:plugin": "cd plugin && yarn build", "circular-dependency-check": "yarn madge --extensions js,ts,tsx --circular src lib", "use-strict-check": "node ./scripts/validate-use-strict.js", "prepack": "cp ../../README.md ./README.md", diff --git a/packages/react-native-reanimated/scripts/cpplint.sh b/packages/react-native-reanimated/scripts/cpplint.sh index 682b6037835d..a5380d523bb8 100755 --- a/packages/react-native-reanimated/scripts/cpplint.sh +++ b/packages/react-native-reanimated/scripts/cpplint.sh @@ -1,7 +1,7 @@ #!/bin/bash if which cpplint >/dev/null; then - cpplint --linelength=230 --filter=-legal/copyright,-readability/todo,-build/namespaces,-whitespace/comments,-whitespace/parens,-build/c++11,-runtime/references --quiet --recursive Common/cpp android/src/main/cpp + cpplint --linelength=230 --filter=-legal/copyright,-readability/todo,-build/namespaces,-whitespace/comments,-whitespace/parens,-build/c++11,-runtime/references --quiet --recursive $@ else echo "error: cpplint not installed, download from https://github.com/cpplint/cpplint" 1>&2 exit 1 diff --git a/packages/react-native-reanimated/scripts/validate-ios.sh b/packages/react-native-reanimated/scripts/validate-apple.sh similarity index 100% rename from packages/react-native-reanimated/scripts/validate-ios.sh rename to packages/react-native-reanimated/scripts/validate-apple.sh From 7ae185ee7ba389c8e0d1a4b1c4405e85de67e18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Thu, 8 Aug 2024 17:31:00 +0200 Subject: [PATCH 02/15] chore: remove "with" --- .../static-framework-reanimated-build-check-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-framework-reanimated-build-check-nightly.yml b/.github/workflows/static-framework-reanimated-build-check-nightly.yml index 1e29643603a9..fd755c326ef5 100644 --- a/.github/workflows/static-framework-reanimated-build-check-nightly.yml +++ b/.github/workflows/static-framework-reanimated-build-check-nightly.yml @@ -1,4 +1,4 @@ -name: Static framework with Reanimated build check [Nightly] +name: Static framework Reanimated build check [Nightly] env: YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: From 4939350010490a9c8223b733b3952f37ea0de0ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Thu, 8 Aug 2024 17:31:49 +0200 Subject: [PATCH 03/15] chore: remove "with" --- ...ml => windows-hosted-app-reanimated-build-check-nightly.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{windows-hosted-app-with-reanimated-build-check-nightly.yml => windows-hosted-app-reanimated-build-check-nightly.yml} (94%) diff --git a/.github/workflows/windows-hosted-app-with-reanimated-build-check-nightly.yml b/.github/workflows/windows-hosted-app-reanimated-build-check-nightly.yml similarity index 94% rename from .github/workflows/windows-hosted-app-with-reanimated-build-check-nightly.yml rename to .github/workflows/windows-hosted-app-reanimated-build-check-nightly.yml index 0c85360c6a8c..49bb4e367fda 100644 --- a/.github/workflows/windows-hosted-app-with-reanimated-build-check-nightly.yml +++ b/.github/workflows/windows-hosted-app-reanimated-build-check-nightly.yml @@ -1,4 +1,4 @@ -name: Windows hosted app with Reanimated build check [Nightly] +name: Windows hosted app Reanimated build check [Nightly] env: YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: From 7a76c712c0b1857369fda5c64b58af1b7964281c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 11:02:20 +0200 Subject: [PATCH 04/15] chore: fix errors --- .github/workflows/example-ios-build-check.yml | 4 ++-- .github/workflows/example-tvos-build-check.yml | 4 ++-- .github/workflows/reanimated-static-checks.yml | 3 +++ .../static-framework-reanimated-build-check-nightly.yml | 4 ++-- .../tests/animations/withDelay/keepSnapshot.test.tsx | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/example-ios-build-check.yml b/.github/workflows/example-ios-build-check.yml index 90392fe3c011..2f4c1630ba69 100644 --- a/.github/workflows/example-ios-build-check.yml +++ b/.github/workflows/example-ios-build-check.yml @@ -74,8 +74,8 @@ jobs: - name: Install Pods working-directory: ${{ matrix.working-directory }}/ios run: | - bundler install - bundler exec pod install + bundle install + bundle exec pod install - name: Restore build artifacts from cache uses: actions/cache@v3 diff --git a/.github/workflows/example-tvos-build-check.yml b/.github/workflows/example-tvos-build-check.yml index 1da4ef995218..31b7f33ca463 100644 --- a/.github/workflows/example-tvos-build-check.yml +++ b/.github/workflows/example-tvos-build-check.yml @@ -76,8 +76,8 @@ jobs: - name: Install Pods working-directory: ${{ env.WORKING_DIRECTORY }}/ios run: | - bundler install - bundler exec pod install + bundle install + bundle exec pod install - name: Restore build artifacts from cache uses: actions/cache@v3 diff --git a/.github/workflows/reanimated-static-checks.yml b/.github/workflows/reanimated-static-checks.yml index 6e35affa5cd1..f9aa0ae28851 100644 --- a/.github/workflows/reanimated-static-checks.yml +++ b/.github/workflows/reanimated-static-checks.yml @@ -29,6 +29,9 @@ jobs: - name: Install monorepo node dependencies run: yarn install --immutable + - name: Build Reanimated for TypeScript types + working-directory: packages/react-native-reanimated + run: yarn build - name: Check TypeScript types working-directory: packages/react-native-reanimated diff --git a/.github/workflows/static-framework-reanimated-build-check-nightly.yml b/.github/workflows/static-framework-reanimated-build-check-nightly.yml index fd755c326ef5..d2b5f4a2d58e 100644 --- a/.github/workflows/static-framework-reanimated-build-check-nightly.yml +++ b/.github/workflows/static-framework-reanimated-build-check-nightly.yml @@ -29,11 +29,11 @@ jobs: - name: Install Paper Pods if: ${{ matrix.react-native-architecture == 'Paper' }} working-directory: app/ios - run: export USE_FRAMEWORKS=static NO_FLIPPER=1 && bundle exec && bundle exec pod install + run: export USE_FRAMEWORKS=static NO_FLIPPER=1 && bundle install && bundle exec pod install - name: Install Fabric Pods if: ${{ matrix.react-native-architecture == 'Fabric' }} working-directory: app/ios - run: export USE_FRAMEWORKS=static NO_FLIPPER=1 RCT_NEW_ARCH_ENABLED=1 && bundle exec && bundle exec pod install + run: export USE_FRAMEWORKS=static NO_FLIPPER=1 RCT_NEW_ARCH_ENABLED=1 && bundle install && bundle exec pod install - name: Build app working-directory: app run: npx react-native run-ios --no-packager diff --git a/apps/common-app/src/examples/RuntimeTests/tests/animations/withDelay/keepSnapshot.test.tsx b/apps/common-app/src/examples/RuntimeTests/tests/animations/withDelay/keepSnapshot.test.tsx index 2a630d67fb77..65b70866afd1 100644 --- a/apps/common-app/src/examples/RuntimeTests/tests/animations/withDelay/keepSnapshot.test.tsx +++ b/apps/common-app/src/examples/RuntimeTests/tests/animations/withDelay/keepSnapshot.test.tsx @@ -21,7 +21,7 @@ import { mockAnimationTimer, clearRenderOutput, } from '../../../ReJest/RuntimeTestsApi'; -import type { SingleViewSnapshot } from '../../../ReJest/matchers/snapshotMatchers'; +import type { SingleViewSnapshot } from '../../../ReJest/TestRunner/UpdatesContainer'; enum TestAnimation { TIMING = 'withTiming', From 477e7cd1595f11ad92b58eb241248143e5e6241d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 11:09:52 +0200 Subject: [PATCH 05/15] chore: update pod install --- .github/workflows/expo-devclient-build-check-nightly.yml | 2 +- .../workflows/monorepo-app-reanimated-build-check-action.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/expo-devclient-build-check-nightly.yml b/.github/workflows/expo-devclient-build-check-nightly.yml index 9da3a225e2d0..97f8fee9aa7f 100644 --- a/.github/workflows/expo-devclient-build-check-nightly.yml +++ b/.github/workflows/expo-devclient-build-check-nightly.yml @@ -51,7 +51,7 @@ jobs: run: node ${{ env.SCRIPT_PATH }} setupFabricIOS - name: Install Pods working-directory: ExpoApp/ios - run: pod install + run: bundle install && bundle exec pod install - name: Build app working-directory: ExpoApp run: npx react-native run-ios --simulator='iPhone 14' --terminal='Terminal' diff --git a/.github/workflows/monorepo-app-reanimated-build-check-action.yml b/.github/workflows/monorepo-app-reanimated-build-check-action.yml index 9be7cdeab13f..fc33185490e9 100644 --- a/.github/workflows/monorepo-app-reanimated-build-check-action.yml +++ b/.github/workflows/monorepo-app-reanimated-build-check-action.yml @@ -65,11 +65,11 @@ jobs: - name: Install Pods for RootApp if: ${{ inputs.platform == 'iOS' }} working-directory: monorepo/RootApp/ios - run: pod install + run: bundle install && bundle exec pod install - name: Install Pods for PackageApp if: ${{ inputs.platform == 'iOS' }} working-directory: monorepo/packages/PackageApp/ios - run: pod install + run: bundle install && bundle exec pod install - name: Build iOS app RootApp if: ${{ inputs.platform == 'iOS' }} working-directory: monorepo/RootApp From 3b097c43ca1c02deedd2536d6a40c471b8627d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 11:46:32 +0200 Subject: [PATCH 06/15] refactor: rework expo devclient and rnniightly nightlies --- .../expo-devclient-build-check-nightly.yml | 85 ++++++------------ ...nightly-reanimated-build-check-nightly.yml | 88 +++++++------------ 2 files changed, 59 insertions(+), 114 deletions(-) diff --git a/.github/workflows/expo-devclient-build-check-nightly.yml b/.github/workflows/expo-devclient-build-check-nightly.yml index 97f8fee9aa7f..dab19aa3406a 100644 --- a/.github/workflows/expo-devclient-build-check-nightly.yml +++ b/.github/workflows/expo-devclient-build-check-nightly.yml @@ -17,69 +17,27 @@ jobs: strategy: matrix: react-native-architecture: ['Paper', 'Fabric'] + platform: ['iOS', 'Android'] fail-fast: false + env: + APP_NAME: ExpoApp concurrency: - group: ios-expo-dev-client-${{ matrix.react-native-architecture }}-${{ github.ref }} + group: ${{ matrix.platform }}-expo-dev-client-${{ matrix.react-native-architecture }}-${{ github.ref }} cancel-in-progress: true steps: - name: Check out reanimated repository uses: actions/checkout@v4 - with: - path: 'reanimated_repo' - - name: Create Expo app - run: npx create-expo-app ExpoApp - - name: Install expo-dev-client - working-directory: ExpoApp - run: | - if npm view expo dist-tags | grep -q 'next:' ; then - npm install expo@next - else - npm install expo@latest - fi - - name: Setup configuration - working-directory: ExpoApp - run: node ${{ env.SCRIPT_PATH }} setBundleIdentifier - - name: Expo prebuild - working-directory: ExpoApp - run: npx expo prebuild - - name: Install Reanimated - working-directory: ExpoApp - run: npm install react-native-reanimated@nightly - - name: Set Fabric - working-directory: ExpoApp - if: ${{ matrix.react-native-architecture == 'Fabric' }} - run: node ${{ env.SCRIPT_PATH }} setupFabricIOS - - name: Install Pods - working-directory: ExpoApp/ios - run: bundle install && bundle exec pod install - - name: Build app - working-directory: ExpoApp - run: npx react-native run-ios --simulator='iPhone 14' --terminal='Terminal' - - build_android: - if: github.repository == 'software-mansion/react-native-reanimated' - runs-on: ubuntu-latest - strategy: - matrix: - react-native-architecture: ['Paper', 'Fabric'] - fail-fast: false - concurrency: - group: android-expo-dev-client-${{ matrix.react-native-architecture }}-${{ github.ref }} - cancel-in-progress: true - steps: - - name: Check out reanimated repository - uses: actions/checkout@v4 - with: - path: 'reanimated_repo' - - name: Create Expo app - run: npx create-expo-app ExpoApp - name: Setup Java 17 + if: ${{ matrix.platform == 'Android' }} uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: 17 + + - name: Create Expo app + run: npx create-expo-app@latest ${{ env.APP_NAME }} - name: Install expo-dev-client - working-directory: ExpoApp + working-directory: ${{ env.APP_NAME }} run: | if npm view expo dist-tags | grep -q 'next:' ; then npm install expo@next @@ -87,18 +45,27 @@ jobs: npm install expo@latest fi - name: Setup configuration - working-directory: ExpoApp + working-directory: ${{ env.APP_NAME }} run: node ${{ env.SCRIPT_PATH }} setBundleIdentifier - name: Expo prebuild - working-directory: ExpoApp + working-directory: ${{ env.APP_NAME }} run: npx expo prebuild - name: Install Reanimated - working-directory: ExpoApp + working-directory: ${{ env.APP_NAME }} run: npm install react-native-reanimated@nightly - - name: Set Fabric - working-directory: ExpoApp - if: ${{ matrix.react-native-architecture == 'Fabric' }} + - name: Set Fabric (iOS) + working-directory: ${{ env.APP_NAME }} + if: ${{ matrix.react-native-architecture == 'Fabric' && matrix.platform == 'iOS' }} + run: node ${{ env.SCRIPT_PATH }} setupFabricIOS + - name: Set Fabric (Android) + working-directory: ${{ env.APP_NAME }} + if: ${{ matrix.react-native-architecture == 'Fabric' && matrix.platform == 'Android' }} run: node ${{ env.SCRIPT_PATH }} setupFabricAndroid - - name: Build app - working-directory: ExpoApp/android + - name: Build app (iOS) + working-directory: ${{ env.APP_NAME }} + if: ${{ matrix.platform == 'iOS' }} + run: npx react-native run-ios --simulator='iPhone 14' --terminal='Terminal' + - name: Build app (Android) + working-directory: ${{ env.APP_NAME }} + if: ${{ matrix.platform == 'Android' }} run: ./gradlew assembleDebug --console=plain diff --git a/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml index 9572bc6a8a79..1ecaad1f9934 100644 --- a/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml +++ b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml @@ -14,77 +14,55 @@ jobs: strategy: matrix: react-native-architecture: ['Paper', 'Fabric'] + platform: ['iOS', 'Android'] fail-fast: false + env: + REACT_NATIVE_TAG: nightly + APP_NAME: app concurrency: - group: ios-react-native-nightly-${{ matrix.react-native-architecture }}-${{ github.ref }} + group: ${{ matrix.platform }}-react-native-nightly-${{ matrix.react-native-architecture }}-${{ github.ref }} cancel-in-progress: true steps: - name: Setup Yarn # Sometimes `npx react-native init` fails due to dependency mismatches or other # rather vague errors. This is a workaround for that. run: corepack enable && yarn init - - name: Create app - run: | - if npm view react-native dist-tags | grep -q 'next:' ; then - yarn add react-native@next && yarn react-native init app --skip-install --version next - else - yarn add react-native@nightly && yarn react-native init app --skip-install --version nightly - fi - - name: Enable Yarn in app - working-directory: app - run: touch yarn.lock - - name: Install Reanimated - working-directory: app - run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} - - name: Install Paper Pods - if: ${{ matrix.react-native-architecture == 'Paper' }} - working-directory: app/ios - run: bundle install && bundle exec pod install - - name: Install Fabric Pods - if: ${{ matrix.react-native-architecture == 'Fabric' }} - working-directory: app/ios - run: RCT_NEW_ARCH_ENABLED=1 bundle install && bundle exec pod install - - name: Build app - working-directory: app - run: yarn react-native run-ios --simulator='iPhone 14' - - build_android: - if: github.repository == 'software-mansion/react-native-reanimated' - runs-on: ubuntu-latest - strategy: - matrix: - react-native-architecture: ['Paper', 'Fabric'] - fail-fast: false - concurrency: - group: android-react-native-nightly-${{ matrix.react-native-architecture }}-${{ github.ref }} - cancel-in-progress: true - steps: - name: Set up JDK 18 + if: ${{ matrix.platform == 'Android' }} uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: '18' - - name: Setup Yarn - # Sometimes `npx react-native init` fails due to dependency mismatches or other - # rather vague errors. This is a workaround for that. - run: corepack enable && yarn init - - name: Create app + - name: Load "next" tag if available run: | - if npm view react-native dist-tags | grep -q 'next:' ; then - yarn add react-native@next && yarn react-native init app --skip-install --version next - else - yarn add react-native@nightly && yarn react-native init app --skip-install --version nightly + if npm view react-native dist-tags | grep -q 'next:' ; then + echo "REACT_NATIVE_TAG=next" >> $GITHUB_ENV fi - - name: Enable Yarn in app - working-directory: app - run: touch yarn.lock + - name: Install React Native + run: yarn add react-native@${{ env.REACT_NATIVE_TAG }} + - name: Create app + run: | + yarn react-native init ${{ env.APP_NAME }} --version ${{ env.REACT_NATIVE_TAG }} --pm yarn --skip-install --install-pods false --skip-git-init - name: Install Reanimated - working-directory: app + working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} - - name: Setup Fabric - if: ${{ matrix.react-native-architecture == 'Fabric' }} - working-directory: app/android + - name: Install Paper Pods (iOS) + if: ${{ matrix.react-native-architecture == 'Paper' && matrix.platform == 'iOS' }} + working-directory: app/ios + run: bundle install && bundle exec pod install + - name: Install Fabric Pods (iOS) + if: ${{ matrix.react-native-architecture == 'Fabric' && matrix.platform == 'iOS' }} + working-directory: app/ios + run: RCT_NEW_ARCH_ENABLED=1 bundle install && bundle exec pod install + - name: Setup Fabric (Android) + if: ${{ matrix.react-native-architecture == 'Fabric' && matrix.platform == 'Android' }} + working-directory: ${{ env.APP_NAME }}/android run: sed -i 's/newArchEnabled=false/newArchEnabled=true/' gradle.properties - - name: Build app - working-directory: app/android + - name: Build app (iOS) + if: ${{ matrix.platform == 'iOS' }} + working-directory: ${{ env.APP_NAME }} + run: yarn react-native run-ios --simulator='iPhone 14' + - name: Build app (Android) + if: ${{ matrix.platform == 'Android' }} + working-directory: ${{ env.APP_NAME }}/android run: ./gradlew assembleDebug --console=plain From 9425f55ccb3a7065056ee9e5b299bd705cf43351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 12:56:56 +0200 Subject: [PATCH 07/15] chore: more error fixes --- .../workflows/example-macos-build-check.yml | 64 +++++++++---------- .../expo-devclient-build-check-nightly.yml | 2 +- ...nightly-reanimated-build-check-nightly.yml | 3 + apps/macos-example/index.js | 4 -- apps/macos-example/metro.config.js | 6 -- 5 files changed, 36 insertions(+), 43 deletions(-) diff --git a/.github/workflows/example-macos-build-check.yml b/.github/workflows/example-macos-build-check.yml index b106307cef65..bdbaae8f481a 100644 --- a/.github/workflows/example-macos-build-check.yml +++ b/.github/workflows/example-macos-build-check.yml @@ -43,46 +43,46 @@ jobs: # Does this optimization even work with new yarn? # Perhaps we should cache `yarn's` cache instead? - - name: Restore node_modules from cache - id: monorepo-cache - uses: actions/cache@v3 - with: - path: . - key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} - restore-keys: ${{ runner.os }}-node-modules- - - name: Restore app node_modules from cache - id: app-cache - uses: actions/cache@v3 - with: - path: ${{ ENV.WORKING_DIRECTORY }}/node_modules - key: ${{ runner.os }}-node-modules-${{ ENV.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/yarn.lock', ENV.WORKING_DIRECTORY)) }} - restore-keys: ${{ runner.os }}-node-modules-${{ ENV.WORKING_DIRECTORY }}- + # - name: Restore node_modules from cache + # id: monorepo-cache + # uses: actions/cache@v3 + # with: + # path: . + # key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} + # restore-keys: ${{ runner.os }}-node-modules- + # - name: Restore app node_modules from cache + # id: app-cache + # uses: actions/cache@v3 + # with: + # path: ${{ ENV.WORKING_DIRECTORY }}/node_modules + # key: ${{ runner.os }}-node-modules-${{ ENV.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/yarn.lock', ENV.WORKING_DIRECTORY)) }} + # restore-keys: ${{ runner.os }}-node-modules-${{ ENV.WORKING_DIRECTORY }}- - name: Install monorepo node dependencies - if: steps.monorepo-cache.outputs.cache-hit != 'true' || steps.app-cache.outputs.cache-hit != 'true' + # if: steps.monorepo-cache.outputs.cache-hit != 'true' || steps.app-cache.outputs.cache-hit != 'true' run: yarn install --immutable - - name: Restore Pods from cache - id: pods-cache - uses: actions/cache@v3 - with: - path: | - ${{ env.WORKING_DIRECTORY }}/macos/Pods - ~/Library/Caches/CocoaPods - ~/.cocoapods - key: ${{ runner.os }}-macos-pods-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/macos/Podfile.lock', env.WORKING_DIRECTORY)) }} + # - name: Restore Pods from cache + # id: pods-cache + # uses: actions/cache@v3 + # with: + # path: | + # ${{ env.WORKING_DIRECTORY }}/macos/Pods + # ~/Library/Caches/CocoaPods + # ~/.cocoapods + # key: ${{ runner.os }}-macos-pods-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/macos/Podfile.lock', env.WORKING_DIRECTORY)) }} - name: Install Pods - if: steps.pods-cache.outputs.cache-hit != 'true' + # if: steps.pods-cache.outputs.cache-hit != 'true' working-directory: ${{ env.WORKING_DIRECTORY }}/macos run: bundle install && bundle exec pod install - - name: Restore build artifacts from cache - uses: actions/cache@v3 - with: - path: | - ${{ env.WORKING_DIRECTORY }}/macos/build - ~/Library/Developer/Xcode/DerivedData - key: ${{ runner.os }}-macos-build-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/macos/Podfile.lock', env.WORKING_DIRECTORY)) }} + # - name: Restore build artifacts from cache + # uses: actions/cache@v3 + # with: + # path: | + # ${{ env.WORKING_DIRECTORY }}/macos/build + # ~/Library/Developer/Xcode/DerivedData + # key: ${{ runner.os }}-macos-build-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/macos/Podfile.lock', env.WORKING_DIRECTORY)) }} - name: Build app working-directory: ${{ env.WORKING_DIRECTORY }} diff --git a/.github/workflows/expo-devclient-build-check-nightly.yml b/.github/workflows/expo-devclient-build-check-nightly.yml index dab19aa3406a..f20f2651653a 100644 --- a/.github/workflows/expo-devclient-build-check-nightly.yml +++ b/.github/workflows/expo-devclient-build-check-nightly.yml @@ -1,7 +1,7 @@ name: Expo DevClient build check [Nightly] env: YARN_ENABLE_HARDENED_MODE: 0 - SCRIPT_PATH: ${{github.workspace}}/reanimated_repo/.github/workflows/helper/configureDevClient.js + SCRIPT_PATH: ${{github.workspace}}/${{github.repository}}/.github/workflows/helper/configureDevClient.js on: pull_request: paths: diff --git a/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml index 1ecaad1f9934..3379f27cc4d2 100644 --- a/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml +++ b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml @@ -43,6 +43,9 @@ jobs: - name: Create app run: | yarn react-native init ${{ env.APP_NAME }} --version ${{ env.REACT_NATIVE_TAG }} --pm yarn --skip-install --install-pods false --skip-git-init + - name: Add yarn.lock in app + working-directory: ${{ env.APP_NAME }} + run: touch yarn.lock - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} diff --git a/apps/macos-example/index.js b/apps/macos-example/index.js index 9b7393291400..ab0ecbf4f878 100644 --- a/apps/macos-example/index.js +++ b/apps/macos-example/index.js @@ -1,7 +1,3 @@ -/** - * @format - */ - import { AppRegistry } from 'react-native'; import App from './App'; import { name as appName } from './app.json'; diff --git a/apps/macos-example/metro.config.js b/apps/macos-example/metro.config.js index b872559a3aaa..5ef54d625a32 100644 --- a/apps/macos-example/metro.config.js +++ b/apps/macos-example/metro.config.js @@ -9,12 +9,6 @@ const root = path.resolve(__dirname, '../..'); const modules = [...Object.keys(pack.peerDependencies), 'react-native-macos']; -/** - * Metro configuration - * https://facebook.github.io/metro/docs/configuration - * - * @type {import('metro-config').MetroConfig} - */ const config = { projectRoot: __dirname, watchFolders: [root], From c6eb734fd7cfcaba0447e0bd273e355efacb4170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 13:06:37 +0200 Subject: [PATCH 08/15] chore: fix yarn setup --- .../react-native-nightly-reanimated-build-check-nightly.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml index 3379f27cc4d2..a32b9dd37a08 100644 --- a/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml +++ b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml @@ -1,4 +1,6 @@ name: React Native nightly Reanimated build check [Nightly] +env: + YARN_ENABLE_HARDENED_MODE: 0 on: pull_request: paths: From 07cd5c6a0c71f79981cfcf44da736bfc70a729d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 13:15:05 +0200 Subject: [PATCH 09/15] update runner os --- .../react-native-nightly-reanimated-build-check-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml index a32b9dd37a08..ed68da82e872 100644 --- a/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml +++ b/.github/workflows/react-native-nightly-reanimated-build-check-nightly.yml @@ -12,7 +12,7 @@ on: jobs: build_ios: if: github.repository == 'software-mansion/react-native-reanimated' - runs-on: macos-14 + runs-on: $${{ matrix.platform == 'iOS' && 'macos-14' || 'ubuntu-latest'}} strategy: matrix: react-native-architecture: ['Paper', 'Fabric'] From 2ce7f4ebf396f5b5084a01f67ad0b79b502b394a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 14:03:45 +0200 Subject: [PATCH 10/15] chore: fix paths --- .github/workflows/expo-devclient-build-check-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/expo-devclient-build-check-nightly.yml b/.github/workflows/expo-devclient-build-check-nightly.yml index f20f2651653a..8947ffc56e57 100644 --- a/.github/workflows/expo-devclient-build-check-nightly.yml +++ b/.github/workflows/expo-devclient-build-check-nightly.yml @@ -1,7 +1,7 @@ name: Expo DevClient build check [Nightly] env: YARN_ENABLE_HARDENED_MODE: 0 - SCRIPT_PATH: ${{github.workspace}}/${{github.repository}}/.github/workflows/helper/configureDevClient.js + SCRIPT_PATH: ${{github.workspace}}/.github/workflows/helper/configureDevClient.js on: pull_request: paths: From 7bae64959740a5212c7a06b139318a663af75b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 14:31:30 +0200 Subject: [PATCH 11/15] chore: new arch fixes --- .../expo-devclient-build-check-nightly.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/expo-devclient-build-check-nightly.yml b/.github/workflows/expo-devclient-build-check-nightly.yml index 8947ffc56e57..af8e8848e2bf 100644 --- a/.github/workflows/expo-devclient-build-check-nightly.yml +++ b/.github/workflows/expo-devclient-build-check-nightly.yml @@ -34,8 +34,12 @@ jobs: distribution: 'zulu' java-version: 17 - - name: Create Expo app + - name: Create Expo app (Paper) + if: ${{ matrix.react-native-architecture == 'Paper' }} run: npx create-expo-app@latest ${{ env.APP_NAME }} + - name: Create Expo app (Fabric) + if: ${{ matrix.react-native-architecture == 'Fabric' }} + run: npx create-expo-app@latest ${{ env.APP_NAME }} -e with-new-arch - name: Install expo-dev-client working-directory: ${{ env.APP_NAME }} run: | @@ -53,19 +57,11 @@ jobs: - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: npm install react-native-reanimated@nightly - - name: Set Fabric (iOS) - working-directory: ${{ env.APP_NAME }} - if: ${{ matrix.react-native-architecture == 'Fabric' && matrix.platform == 'iOS' }} - run: node ${{ env.SCRIPT_PATH }} setupFabricIOS - - name: Set Fabric (Android) - working-directory: ${{ env.APP_NAME }} - if: ${{ matrix.react-native-architecture == 'Fabric' && matrix.platform == 'Android' }} - run: node ${{ env.SCRIPT_PATH }} setupFabricAndroid - name: Build app (iOS) working-directory: ${{ env.APP_NAME }} if: ${{ matrix.platform == 'iOS' }} run: npx react-native run-ios --simulator='iPhone 14' --terminal='Terminal' - name: Build app (Android) - working-directory: ${{ env.APP_NAME }} + working-directory: ${{ env.APP_NAME }}/android if: ${{ matrix.platform == 'Android' }} run: ./gradlew assembleDebug --console=plain From 5cc07cee372e75b3adffc92c11b77a44e6230c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 14:54:01 +0200 Subject: [PATCH 12/15] chore: try to fix errors with expo --- .../expo-devclient-build-check-nightly.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/expo-devclient-build-check-nightly.yml b/.github/workflows/expo-devclient-build-check-nightly.yml index af8e8848e2bf..df31c957d7d5 100644 --- a/.github/workflows/expo-devclient-build-check-nightly.yml +++ b/.github/workflows/expo-devclient-build-check-nightly.yml @@ -21,6 +21,7 @@ jobs: fail-fast: false env: APP_NAME: ExpoApp + EXPO_TAG: latest concurrency: group: ${{ matrix.platform }}-expo-dev-client-${{ matrix.react-native-architecture }}-${{ github.ref }} cancel-in-progress: true @@ -33,30 +34,30 @@ jobs: with: distribution: 'zulu' java-version: 17 - - name: Create Expo app (Paper) if: ${{ matrix.react-native-architecture == 'Paper' }} run: npx create-expo-app@latest ${{ env.APP_NAME }} - name: Create Expo app (Fabric) if: ${{ matrix.react-native-architecture == 'Fabric' }} run: npx create-expo-app@latest ${{ env.APP_NAME }} -e with-new-arch - - name: Install expo-dev-client + - name: Load Expo tag working-directory: ${{ env.APP_NAME }} run: | if npm view expo dist-tags | grep -q 'next:' ; then - npm install expo@next - else - npm install expo@latest + echo "EXPO_TAG=next" >> $GITHUB_ENV fi + - name: Install Expo + working-directory: ${{ env.APP_NAME }} + run: npm install expo@${{ env.EXPO_TAG }} - name: Setup configuration working-directory: ${{ env.APP_NAME }} run: node ${{ env.SCRIPT_PATH }} setBundleIdentifier - - name: Expo prebuild - working-directory: ${{ env.APP_NAME }} - run: npx expo prebuild - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: npm install react-native-reanimated@nightly + - name: Expo prebuild + working-directory: ${{ env.APP_NAME }} + run: npx expo prebuild - name: Build app (iOS) working-directory: ${{ env.APP_NAME }} if: ${{ matrix.platform == 'iOS' }} From bd5f4739d97c88d45da10bc92a2d97dce99a2d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 16:01:23 +0200 Subject: [PATCH 13/15] chore: add pods --- .github/workflows/expo-devclient-build-check-nightly.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/expo-devclient-build-check-nightly.yml b/.github/workflows/expo-devclient-build-check-nightly.yml index df31c957d7d5..225e9372facc 100644 --- a/.github/workflows/expo-devclient-build-check-nightly.yml +++ b/.github/workflows/expo-devclient-build-check-nightly.yml @@ -13,7 +13,7 @@ on: jobs: build_ios: if: github.repository == 'software-mansion/react-native-reanimated' - runs-on: macos-14 + runs-on: ${{ matrix.platform == 'iOS' && 'macos-14' || 'ubuntu-latest' }} strategy: matrix: react-native-architecture: ['Paper', 'Fabric'] @@ -58,6 +58,10 @@ jobs: - name: Expo prebuild working-directory: ${{ env.APP_NAME }} run: npx expo prebuild + - name: Install pods + if: ${{ matrix.platform == 'iOS' }} + working-directory: ${{ env.APP_NAME }}/ios + run: bundle install && bundle exec pod install - name: Build app (iOS) working-directory: ${{ env.APP_NAME }} if: ${{ matrix.platform == 'iOS' }} From d7c41b45dc4652557ccaa5274b7d92bfa277cf9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 11:02:55 +0200 Subject: [PATCH 14/15] chore: review changes --- .../workflows/example-android-build-check.yml | 5 +-- .github/workflows/example-ios-build-check.yml | 3 +- .../workflows/example-macos-build-check.yml | 37 +------------------ .../example-typescript-check-and-lint.yml | 3 +- .../npm-reanimated-package-build.yml | 2 +- 5 files changed, 6 insertions(+), 44 deletions(-) diff --git a/.github/workflows/example-android-build-check.yml b/.github/workflows/example-android-build-check.yml index 671936aef377..65d0454ce8d8 100644 --- a/.github/workflows/example-android-build-check.yml +++ b/.github/workflows/example-android-build-check.yml @@ -46,9 +46,8 @@ jobs: with: distribution: 'zulu' java-version: 17 - # TODO: Install deps only when cache failed (use id and outputs) - # TODO: Check if this optimization works with new yarn - # TODO: Check if we should cache `yarn's` cache instead + + # TODO: Rework caching in this CI for monorepo setup. - name: Restore node_modules from cache uses: actions/cache@v3 with: diff --git a/.github/workflows/example-ios-build-check.yml b/.github/workflows/example-ios-build-check.yml index 2f4c1630ba69..ec1a5cdaac28 100644 --- a/.github/workflows/example-ios-build-check.yml +++ b/.github/workflows/example-ios-build-check.yml @@ -45,8 +45,7 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 - # Does this optimization even work with new yarn? - # Perhaps we should cache `yarn's` cache instead? + # TODO: Rework caching in this CI for monorepo setup. - name: Restore node_modules from cache uses: actions/cache@v3 with: diff --git a/.github/workflows/example-macos-build-check.yml b/.github/workflows/example-macos-build-check.yml index bdbaae8f481a..8b7b49df27f4 100644 --- a/.github/workflows/example-macos-build-check.yml +++ b/.github/workflows/example-macos-build-check.yml @@ -41,49 +41,14 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 - # Does this optimization even work with new yarn? - # Perhaps we should cache `yarn's` cache instead? - # - name: Restore node_modules from cache - # id: monorepo-cache - # uses: actions/cache@v3 - # with: - # path: . - # key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} - # restore-keys: ${{ runner.os }}-node-modules- - # - name: Restore app node_modules from cache - # id: app-cache - # uses: actions/cache@v3 - # with: - # path: ${{ ENV.WORKING_DIRECTORY }}/node_modules - # key: ${{ runner.os }}-node-modules-${{ ENV.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/yarn.lock', ENV.WORKING_DIRECTORY)) }} - # restore-keys: ${{ runner.os }}-node-modules-${{ ENV.WORKING_DIRECTORY }}- + # TODO: Rework caching in this CI for monorepo setup. - name: Install monorepo node dependencies - # if: steps.monorepo-cache.outputs.cache-hit != 'true' || steps.app-cache.outputs.cache-hit != 'true' run: yarn install --immutable - # - name: Restore Pods from cache - # id: pods-cache - # uses: actions/cache@v3 - # with: - # path: | - # ${{ env.WORKING_DIRECTORY }}/macos/Pods - # ~/Library/Caches/CocoaPods - # ~/.cocoapods - # key: ${{ runner.os }}-macos-pods-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/macos/Podfile.lock', env.WORKING_DIRECTORY)) }} - - name: Install Pods - # if: steps.pods-cache.outputs.cache-hit != 'true' working-directory: ${{ env.WORKING_DIRECTORY }}/macos run: bundle install && bundle exec pod install - # - name: Restore build artifacts from cache - # uses: actions/cache@v3 - # with: - # path: | - # ${{ env.WORKING_DIRECTORY }}/macos/build - # ~/Library/Developer/Xcode/DerivedData - # key: ${{ runner.os }}-macos-build-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/macos/Podfile.lock', env.WORKING_DIRECTORY)) }} - - name: Build app working-directory: ${{ env.WORKING_DIRECTORY }} run: yarn macos diff --git a/.github/workflows/example-typescript-check-and-lint.yml b/.github/workflows/example-typescript-check-and-lint.yml index 2c8c9d50b267..964e6bb51ac2 100644 --- a/.github/workflows/example-typescript-check-and-lint.yml +++ b/.github/workflows/example-typescript-check-and-lint.yml @@ -20,8 +20,7 @@ jobs: apps/common-app, apps/fabric-example, apps/macos-example, - # We don't check for Next. - # apps/next-example, + # apps/next-example, # next-example doesn't use TypeScript. apps/paper-example, apps/tvos-example, apps/web-example, diff --git a/.github/workflows/npm-reanimated-package-build.yml b/.github/workflows/npm-reanimated-package-build.yml index c25b6155a4e3..fa697ad25225 100644 --- a/.github/workflows/npm-reanimated-package-build.yml +++ b/.github/workflows/npm-reanimated-package-build.yml @@ -30,7 +30,7 @@ jobs: if: github.repository == 'software-mansion/react-native-reanimated' runs-on: ubuntu-latest env: - PACKAGE_NAME: + PACKAGE_NAME: PLACEHOLDER # Will be reassigned later on. steps: - name: Check out uses: actions/checkout@v4 From 8fcda6c1cfb0c74521dc6f8f1692eaf8e95591e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 12:38:47 +0200 Subject: [PATCH 15/15] chore: update README banners --- ...-typescript-compatibility-test-nightly.yml | 1 + README.md | 20 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/reanimated-typescript-compatibility-test-nightly.yml b/.github/workflows/reanimated-typescript-compatibility-test-nightly.yml index f35ac80f6c62..a3e24fe38272 100644 --- a/.github/workflows/reanimated-typescript-compatibility-test-nightly.yml +++ b/.github/workflows/reanimated-typescript-compatibility-test-nightly.yml @@ -15,6 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: + # TODO: Fetch versions from common source. react-native-version: ['0.72', '0.73', '0.74', '0.75.0-rc.6', nightly] fail-fast: false concurrency: diff --git a/README.md b/README.md index 1912a436c8b3..ab1de80b3347 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,16 @@ comes to gesture based interactions. ### Nightly CI state -[![Build nightly npm package](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-nightly-npm-package.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-nightly-npm-package.yml) -[![Reanimated compatibility check [Nightly]](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-compatibility-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-compatibility-check-nightly.yml) -[![Run nightly monorepo test](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-monorepo-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-monorepo-nightly.yml) -[![Check static framework nightly build](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-static-framework-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-static-framework-nightly.yml) -[![Check React Native nightly build](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-react-native-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-react-native-nightly.yml) -[![Check Expo dev-client nightly build](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-expo-dev-client-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-expo-dev-client-nightly.yml) -[![Check TypeScript nightly build](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-TS-react-native.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-TS-react-native.yml) -[![Test V8 on Android nightly](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-v8-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-v8-nightly.yml) -[![Test build on Windows nightly](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-on-windows-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-on-windows-nightly.yml) -[![Validate urls in source code](https://github.com/software-mansion/react-native-reanimated/actions/workflows/detect-broken-urls-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/detect-broken-urls-nightly.yml) +[![NPM Reanimated publish nightly](https://github.com/software-mansion/react-native-reanimated/actions/workflows/npm-reanimated-publish-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/npm-reanimated-publish-nightly.yml) +[![Reanimated compatibility check](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-compatibility-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-compatibility-check-nightly.yml) +[![Monorepo app Reanimated build check](https://github.com/software-mansion/react-native-reanimated/actions/workflows/monorepo-app-reanimated-build-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/monorepo-app-reanimated-build-check-nightly.yml) +[![Static framework Reanimated build check](https://github.com/software-mansion/react-native-reanimated/actions/workflows/static-framework-reanimated-build-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/static-framework-reanimated-build-check-nightly.yml) +[![React Native nightly Reanimated build check](https://github.com/software-mansion/react-native-reanimated/actions/workflows/react-native-nightly-reanimated-build-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/react-native-nightly-reanimated-build-check-nightly.yml) +[![Expo DevClient build check](https://github.com/software-mansion/react-native-reanimated/actions/workflows/expo-devclient-build-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/expo-devclient-build-check-nightly.yml) +[![Reanimated TypeScript compatibility test](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-typescript-compatibility-test-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-typescript-compatibility-test-nightly.yml) +[![V8 Reanimated build check](https://github.com/software-mansion/react-native-reanimated/actions/workflows/V8-reanimated-build-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/V8-reanimated-build-check-nightly.yml) +[![Windows hosted app Reanimated build check](https://github.com/software-mansion/react-native-reanimated/actions/workflows/windows-hosted-app-reanimated-build-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/windows-hosted-app-reanimated-build-check-nightly.yml) +[![URL validation](https://github.com/software-mansion/react-native-reanimated/actions/workflows/url-validation-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/url-validation-nightly.yml) ## Installation