ci: Add CI tests to build Android without Skia or FP

This commit is contained in:
Marc Rousavy 2023-07-31 17:38:58 +02:00
parent 0949dab086
commit 1e57e5b95c
2 changed files with 89 additions and 1 deletions

View File

@ -6,6 +6,7 @@ on:
- main - main
paths: paths:
- '.github/workflows/build-android.yml' - '.github/workflows/build-android.yml'
- 'cpp/**'
- 'android/**' - 'android/**'
- 'example/android/**' - 'example/android/**'
- 'yarn.lock' - 'yarn.lock'
@ -13,13 +14,14 @@ on:
pull_request: pull_request:
paths: paths:
- '.github/workflows/build-android.yml' - '.github/workflows/build-android.yml'
- 'cpp/**'
- 'android/**' - 'android/**'
- 'example/android/**' - 'example/android/**'
- 'yarn.lock' - 'yarn.lock'
- 'example/yarn.lock' - 'example/yarn.lock'
jobs: jobs:
build_example: build:
name: Build Android Example App name: Build Android Example App
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -57,3 +59,85 @@ jobs:
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- name: Run Gradle Build for example/android/ - name: Run Gradle Build for example/android/
run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../.. 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 ../..

View File

@ -6,12 +6,14 @@ on:
- main - main
paths: paths:
- '.github/workflows/build-ios.yml' - '.github/workflows/build-ios.yml'
- 'cpp/**'
- 'ios/**' - 'ios/**'
- '*.podspec' - '*.podspec'
- 'example/ios/**' - 'example/ios/**'
pull_request: pull_request:
paths: paths:
- '.github/workflows/build-ios.yml' - '.github/workflows/build-ios.yml'
- 'cpp/**'
- 'ios/**' - 'ios/**'
- '*.podspec' - '*.podspec'
- 'example/ios/**' - 'example/ios/**'
@ -76,6 +78,7 @@ jobs:
-destination 'platform=iOS Simulator,name=iPhone 11 Pro' \ -destination 'platform=iOS Simulator,name=iPhone 11 Pro' \
build \ build \
CODE_SIGNING_ALLOWED=NO | xcpretty" CODE_SIGNING_ALLOWED=NO | xcpretty"
build-no-skia: build-no-skia:
name: Build iOS Example App without Skia name: Build iOS Example App without Skia
runs-on: macOS-latest runs-on: macOS-latest
@ -137,6 +140,7 @@ jobs:
-destination 'platform=iOS Simulator,name=iPhone 11 Pro' \ -destination 'platform=iOS Simulator,name=iPhone 11 Pro' \
build \ build \
CODE_SIGNING_ALLOWED=NO | xcpretty" CODE_SIGNING_ALLOWED=NO | xcpretty"
build-no-frame-processors: build-no-frame-processors:
name: Build iOS Example App without Frame Processors name: Build iOS Example App without Frame Processors
runs-on: macOS-latest runs-on: macOS-latest