From 1e57e5b95c739895f1c7f3b99aa72a4331ddec32 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Mon, 31 Jul 2023 17:38:58 +0200 Subject: [PATCH] ci: Add CI tests to build Android without Skia or FP --- .github/workflows/build-android.yml | 86 ++++++++++++++++++++++++++++- .github/workflows/build-ios.yml | 4 ++ 2 files changed, 89 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index ea0ed80..2563ef6 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -6,6 +6,7 @@ on: - main paths: - '.github/workflows/build-android.yml' + - 'cpp/**' - 'android/**' - 'example/android/**' - 'yarn.lock' @@ -13,13 +14,14 @@ on: pull_request: paths: - '.github/workflows/build-android.yml' + - 'cpp/**' - 'android/**' - 'example/android/**' - 'yarn.lock' - 'example/yarn.lock' jobs: - build_example: + build: name: Build Android Example App runs-on: ubuntu-latest steps: @@ -57,3 +59,85 @@ jobs: ${{ runner.os }}-gradle- - name: Run Gradle Build for example/android/ run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../.. + + build-no-skia: + name: Build Android Example App (without Skia) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - name: Restore node_modules from cache + uses: actions/cache@v2 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Install node_modules + run: yarn install --frozen-lockfile + - name: Install node_modules for example/ + run: yarn install --frozen-lockfile --cwd example + - name: Remove react-native-skia + run: yarn remove @shopify/react-native-skia --cwd example + + - name: Restore Gradle cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Run Gradle Build for example/android/ + run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../.. + + build-no-frame-processors: + name: Build Android Example App (without Frame Processors) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - name: Restore node_modules from cache + uses: actions/cache@v2 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Install node_modules + run: yarn install --frozen-lockfile + - name: Install node_modules for example/ + run: yarn install --frozen-lockfile --cwd example + - name: Remove react-native-worklets + run: yarn remove react-native-worklets --cwd example + + - name: Restore Gradle cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Run Gradle Build for example/android/ + run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../.. diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index c4606cd..1d4adfb 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -6,12 +6,14 @@ on: - main paths: - '.github/workflows/build-ios.yml' + - 'cpp/**' - 'ios/**' - '*.podspec' - 'example/ios/**' pull_request: paths: - '.github/workflows/build-ios.yml' + - 'cpp/**' - 'ios/**' - '*.podspec' - 'example/ios/**' @@ -76,6 +78,7 @@ jobs: -destination 'platform=iOS Simulator,name=iPhone 11 Pro' \ build \ CODE_SIGNING_ALLOWED=NO | xcpretty" + build-no-skia: name: Build iOS Example App without Skia runs-on: macOS-latest @@ -137,6 +140,7 @@ jobs: -destination 'platform=iOS Simulator,name=iPhone 11 Pro' \ build \ CODE_SIGNING_ALLOWED=NO | xcpretty" + build-no-frame-processors: name: Build iOS Example App without Frame Processors runs-on: macOS-latest