diff --git a/.github/workflows/android-build-test.yml b/.github/workflows/android-build-test.yml deleted file mode 100644 index 552f03c71..000000000 --- a/.github/workflows/android-build-test.yml +++ /dev/null @@ -1,71 +0,0 @@ -# name: Example Android check -# on: -# pull_request: -# paths: -# - .github/workflows/android-build-test.yml -# - 'android/**' -# - 'src/fabric/**' -# - 'package.json' -# - 'apps/paper-example/android/**' -# - 'apps/paper-example/package.json' -# - 'apps/fabric-example/android/**' -# - 'apps/fabric-example/package.json' -# push: -# branches: -# - main -# workflow_dispatch: - -# jobs: -# build: -# runs-on: ubuntu-latest -# strategy: -# matrix: -# working-directory: [paper-example, fabric-example] -# fail-fast: false -# concurrency: -# group: android-${{ matrix.working-directory }}-${{ github.ref }} -# cancel-in-progress: true -# steps: -# - name: Checkout Git repository -# uses: actions/checkout@v4 - -# - name: Set up JDK 17 -# uses: actions/setup-java@v4 -# with: -# distribution: 'zulu' -# java-version: '17' - -# - name: Get react-native-svg node_modules cache -# uses: actions/cache@v4 -# with: -# path: node_modules -# key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }} -# restore-keys: ${{ runner.os }}-node-modules-svg- - -# - name: Install react-native-svg node_modules -# run: yarn install --frozen-lockfile - -# - name: Get app node_modules cache -# uses: actions/cache@v4 -# with: -# path: apps/${{ 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: apps/${{ matrix.working-directory }} -# run: yarn install --frozen-lockfile - -# - name: Get build cache -# uses: actions/cache@v4 -# with: -# path: | -# ~/.gradle/caches -# ~/.gradle/wrapper -# key: ${{ runner.os }}-gradle-${{matrix.working-directory}}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} -# restore-keys: | -# ${{ runner.os }}-gradle-${{matrix.working-directory}}- - -# - name: Build app -# working-directory: apps/${{ matrix.working-directory }}/android -# run: ./gradlew assembleDebug --build-cache --console=plain -PreactNativeArchitectures=arm64-v8a diff --git a/.github/workflows/check-archs-consistency.yml b/.github/workflows/check-archs-consistency.yml index e9a28e8f5..f0dbe8dd3 100644 --- a/.github/workflows/check-archs-consistency.yml +++ b/.github/workflows/check-archs-consistency.yml @@ -1,27 +1,27 @@ -# name: Test consistency between Paper & Fabric -# on: -# pull_request: -# branches: -# - main -# paths: -# - src/fabric/** -# - android/src/paper/java/com/facebook/react/viewmanagers/** -# - android/src/paper/java/com/horcrux/svg/** -# jobs: -# check: -# runs-on: ubuntu-latest -# concurrency: -# group: check-archs-consistency-${{ github.ref }} -# cancel-in-progress: true -# steps: -# - name: checkout -# uses: actions/checkout@v4 -# - name: Use Node.js 18 -# uses: actions/setup-node@v4 -# with: -# node-version: 18 -# cache: 'yarn' -# - name: Install node dependencies -# run: yarn -# - name: Check Android Paper & Fabric generated interfaces consistency -# run: yarn check-archs-consistency +name: Test consistency between Paper & Fabric +on: + pull_request: + branches: + - main + paths: + - src/fabric/** + - android/src/paper/java/com/facebook/react/viewmanagers/** + - android/src/paper/java/com/horcrux/svg/** +jobs: + check: + runs-on: ubuntu-latest + concurrency: + group: check-archs-consistency-${{ github.ref }} + cancel-in-progress: true + steps: + - name: checkout + uses: actions/checkout@v4 + - name: Use Node.js 18 + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'yarn' + - name: Install node dependencies + run: yarn + - name: Check Android Paper & Fabric generated interfaces consistency + run: yarn check-archs-consistency diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml deleted file mode 100644 index 5e60e7244..000000000 --- a/.github/workflows/e2e-android.yml +++ /dev/null @@ -1,119 +0,0 @@ -# name: E2E Android -# on: -# pull_request: -# paths: -# - .github/workflows/e2e-android.yml -# - apps/common/example/** -# - android/** -# - src/** -# - e2e/** -# - package.json -# # push: -# # branches: -# # - main -# workflow_dispatch: -# jobs: -# test: -# runs-on: macos-12 -# timeout-minutes: 60 -# env: -# WORKING_DIRECTORY: paper-example -# API_LEVEL: 34 -# SYSTEM_IMAGES: system-images;android-34;google_apis;x86_64 -# AVD_NAME: rn-svg-avd -# concurrency: -# group: android-e2e-example-${{ github.ref }} -# cancel-in-progress: true -# steps: -# - name: checkout -# uses: actions/checkout@v3 -# with: -# submodules: recursive -# - uses: actions/setup-node@v3 -# with: -# node-version: 18 -# cache: 'yarn' -# - name: Set up JDK 17 -# uses: actions/setup-java@v2 -# with: -# java-version: '17' -# distribution: 'zulu' -# cache: 'gradle' -# - name: Install NDK -# uses: nttld/setup-ndk@v1 -# id: setup-ndk -# with: -# ndk-version: r26d -# local-cache: true -# - name: Set ANDROID_NDK -# run: echo "ANDROID_NDK=$ANDROID_HOME/ndk-bundle" >> $GITHUB_ENV -# - name: Cache SDK image -# id: cache-sdk-img -# uses: actions/cache@v3 -# with: -# path: $ANDROID_HOME/system-images/ -# key: ${{ runner.os }}-build-system-images-${{ env.SYSTEM_IMAGES }} -# - name: SKDs - download required images -# if: ${{ steps.cache-sdd-img.outputs.cache-hit != 'true' }} -# run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;x86_64" -# - name: Cache AVD -# id: cache-avd -# uses: actions/cache@v3 -# with: -# path: ~/.android/avd/${{ env.AVD_NAME }}.avd -# key: ${{ runner.os }}-avd-images-${{ env.SYSTEM_IMAGES }}-${{ env.AVD_NAME }} -# - name: Emulator - Create -# if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} -# run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device 28 --package "${{ env.SYSTEM_IMAGES }}" --sdcard 512M -# - name: Emulator - Set screen settings -# if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} -# run: | -# echo "AVD config path: $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini" -# sed -i '' 's/.*hw\.lcd\.density.*/hw\.lcd\.density = 480/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini -# sed -i '' 's/.*hw\.lcd\.width.*/hw\.lcd\.width = 1344/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini -# sed -i '' 's/.*hw\.lcd\.height.*/hw\.lcd\.height = 2992/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini -# - name: Emulator - Boot -# run: $ANDROID_HOME/emulator/emulator -memory 4096 -avd ${{ env.AVD_NAME }} -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim & - -# - name: ADB Wait For Device -# run: adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' -# timeout-minutes: 10 - -# - name: Reverse TCP -# working-directory: apps/${{ env.WORKING_DIRECTORY }} -# run: adb devices | grep '\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} adb -s {} reverse tcp:8081 tcp:8081 - -# - name: Install root node dependencies -# run: yarn - -# - name: Install example app node dependencies -# run: yarn -# working-directory: apps/${{ env.WORKING_DIRECTORY }} - -# - name: Build Android app -# working-directory: apps/${{ env.WORKING_DIRECTORY }}/android -# run: ./gradlew assembleDebug - -# - name: Start Metro server -# working-directory: apps/${{ env.WORKING_DIRECTORY }} -# run: E2E=true yarn start &> output.log & - -# - name: Install APK -# run: adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk - -# - name: Launch APK -# run: 'while ! (adb shell monkey -p com.example 1 | grep -q "Events injected: 1"); do sleep 1; echo "Retrying due to errors in previous run..."; done' - -# - name: Run e2e Tests -# run: E2E=true yarn e2e - -# - name: Upload test report -# uses: actions/upload-artifact@v4 -# with: -# name: report -# path: | -# report.html -# jest-html-reporters-attach/ - -# - name: Kill emulator (so it can be cached safely) -# run: adb devices | grep emulator | cut -f1 | while read line; do adb -s $line emu kill; done diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml deleted file mode 100644 index 9f25d0536..000000000 --- a/.github/workflows/e2e-ios.yml +++ /dev/null @@ -1,93 +0,0 @@ -# name: E2E iOS -# on: -# pull_request: -# paths: -# - .github/workflows/ios-e2e.yml -# - apps/common/example/** -# - apple/** -# - src/** -# - e2e/** -# - package.json -# push: -# branches: -# - main -# workflow_dispatch: - -# jobs: -# test: -# runs-on: macos-14 -# timeout-minutes: 60 -# strategy: -# matrix: -# working-directory: [paper-example] -# fail-fast: false -# env: -# DEVICE: iPhone 15 Pro -# steps: -# - name: Checkout Git repository -# uses: actions/checkout@v4 - -# - name: Use latest stable Xcode -# uses: maxim-lobanov/setup-xcode@v1 -# with: -# xcode-version: latest-stable - -# - name: Get react-native-svg node_modules cache -# uses: actions/cache@v4 -# with: -# path: node_modules -# key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }} -# restore-keys: ${{ runner.os }}-node-modules-svg- - -# - name: Install react-native-svg node_modules -# run: yarn install --frozen-lockfile - -# - name: Get app node_modules cache -# uses: actions/cache@v4 -# with: -# path: apps/${{ matrix.working-directory }}/node_modules -# key: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/yarn.lock', matrix.working-directory)) }} -# restore-keys: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}- - -# - name: Install app node_modules -# working-directory: apps/${{ matrix.working-directory }} -# run: yarn install --frozen-lockfile - -# - name: Get Pods cache -# uses: actions/cache@v4 -# with: -# path: apps/${{ matrix.working-directory }}/ios/Pods -# key: ${{ runner.os }}-pods-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/ios/Podfile.lock', matrix.working-directory)) }} -# restore-keys: | -# ${{ runner.os }}-pods-${{ matrix.working-directory }}- - -# - name: Install Pods -# working-directory: apps/${{ matrix.working-directory }}/ios -# run: bundle install && bundle exec pod install - -# - name: Get build artifacts cache -# uses: actions/cache@v4 -# with: -# path: ~/Library/Developer/Xcode/DerivedData -# key: ${{ runner.os }}-ios-derived-data-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/ios/Podfile.lock', matrix.working-directory)) }} -# restore-keys: | -# ${{ runner.os }}-ios-derived-data-${{ matrix.working-directory }}- - -# - name: Start Metro server -# working-directory: apps/${{ matrix.working-directory }} -# run: E2E=true yarn start &> output.log & - -# - name: Build app -# working-directory: apps/${{ matrix.working-directory }} -# run: E2E=true npx react-native run-ios --simulator="${{ env.DEVICE }}" --mode Debug --verbose - -# - name: Run e2e Tests -# run: E2E=true yarn e2e - -# - name: Upload test report -# uses: actions/upload-artifact@v4 -# with: -# name: report -# path: | -# report.html -# jest-html-reporters-attach/ diff --git a/.github/workflows/macos-build-test.yml b/.github/workflows/macos-build-test.yml deleted file mode 100644 index f76ef5361..000000000 --- a/.github/workflows/macos-build-test.yml +++ /dev/null @@ -1,79 +0,0 @@ -# name: Example macOS check -# on: -# pull_request: -# paths: -# - .github/workflows/macos-build-test.yml -# - RNSVG.podspec -# - apple/** -# - src/fabric/** -# - package.json -# - apps/paper-macos-example/package.json -# - apps/paper-macos-example/ios/** -# - apps/fabric-macos-example/package.json -# - apps/fabric-macos-example/ios/** -# push: -# branches: -# - main - -# jobs: -# build: -# if: github.repository == 'software-mansion/react-native-svg' -# runs-on: macos-14 -# strategy: -# matrix: -# working-directory: [paper-macos-example, fabric-macos-example] -# fail-fast: false -# concurrency: -# group: macos-${{ matrix.working-directory }}-${{ github.ref }} -# cancel-in-progress: true -# steps: -# - name: Checkout Git repository -# uses: actions/checkout@v4 - -# - name: Use latest stable Xcode -# uses: maxim-lobanov/setup-xcode@v1 -# with: -# xcode-version: latest-stable - -# - name: Get react-native-svg node_modules cache -# uses: actions/cache@v4 -# with: -# path: node_modules -# key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }} -# restore-keys: ${{ runner.os }}-node-modules-svg- - -# - name: Install react-native-svg node_modules -# run: yarn install --frozen-lockfile - -# - name: Get app node_modules cache -# uses: actions/cache@v4 -# with: -# path: apps/${{ matrix.working-directory }}/node_modules -# key: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/yarn.lock', matrix.working-directory)) }} -# restore-keys: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}- - -# - name: Install app node_modules -# working-directory: apps/${{ matrix.working-directory }} -# run: yarn install --frozen-lockfile - -# - name: Get Pods cache -# uses: actions/cache@v4 -# with: -# path: apps/${{ matrix.working-directory }}/macos/Pods -# key: ${{ runner.os }}-pods-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/macos/Podfile.lock', matrix.working-directory)) }} -# restore-keys: | -# ${{ runner.os }}-pods-${{ matrix.working-directory }}- - -# - name: Install Pods -# working-directory: apps/${{ matrix.working-directory }}/macos -# run: bundle install && bundle exec pod install - -# - name: Get build artifacts cache -# uses: actions/cache@v4 -# with: -# path: ~/Library/Developer/Xcode/DerivedData -# key: ${{ runner.os }}-macos-derived-data-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/macos/Podfile.lock', matrix.working-directory)) }} - -# - name: Build app -# working-directory: apps/${{ matrix.working-directory }} -# run: yarn macos diff --git a/.github/workflows/windows-build-test.yml b/.github/workflows/windows-build-test.yml deleted file mode 100644 index ff73e9599..000000000 --- a/.github/workflows/windows-build-test.yml +++ /dev/null @@ -1,62 +0,0 @@ -# name: Test Windows build -# on: -# pull_request: -# paths: -# - '.github/workflows/windows-build-test.yml' -# - 'windows/**' -# - 'src/fabric/**' -# - 'package.json' -# - 'apps/paper-windows-example/windows/**' -# - 'apps/paper-windows-example/package.json' -# - 'apps/fabric-windows-example/windows/**' -# - 'apps/fabric-windows-example/package.json' -# push: -# branches: -# - main - -# jobs: -# build: -# runs-on: windows-2022 -# strategy: -# matrix: -# working-directory: [paper-windows-example, fabric-windows-example] -# concurrency: -# group: windows-${{ matrix.working-directory }}-${{ github.ref }} -# cancel-in-progress: true - -# steps: -# - name: Check out Git repository -# uses: actions/checkout@v2 - -# - name: Setup Node.js -# uses: actions/setup-node@v1 -# with: -# node-version: '^18' - -# - name: Setup MSBuild -# uses: microsoft/setup-msbuild@v2 - -# - name: Restore react-native-svg node_modules from cache -# uses: actions/cache@v3 -# with: -# path: node_modules -# key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }} -# restore-keys: ${{ runner.os }}-node-modules-svg- - -# - name: Install svg node_modules -# run: yarn install --frozen-lockfile - -# - name: Restore app node_modules from cache -# uses: actions/cache@v3 -# with: -# path: apps/${{ matrix.working-directory }}/node_modules -# key: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('apps/{0}/yarn.lock', matrix.working-directory)) }} -# restore-keys: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}- - -# - name: Install app node_modules -# working-directory: apps/${{ matrix.working-directory }} -# run: yarn --frozen-lockfile - -# - name: Build app -# working-directory: apps/${{ matrix.working-directory }}/windows -# run: npx react-native run-windows --logging --no-packager --no-deploy --no-autolink