Convert Example Apps to TypeScript and Add Expo Support #2659
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
# Cache Yarn dependencies | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install dependencies and run lint | |
- name: Install dependencies and run lint | |
run: | | |
yarn | |
yarn lint | |
sed -i '' 's/"newArchEnabled": true/"newArchEnabled": false/g' path/to/your/file.json | |
build-ios-old-arch: | |
runs-on: macos-latest | |
steps: | |
# Checkout the code | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
# Disable new architecture in app config | |
- name: Disable New Architecture in JSON | |
working-directory: apps/external-display-example | |
run: | | |
sed -i '' 's/"newArchEnabled": true/"newArchEnabled": false/g' app.json | |
# Set up Node.js | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
# Cache Yarn dependencies | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Cache CocoaPods dependencies | |
- name: Cache CocoaPods | |
uses: actions/cache@v4 | |
with: | |
path: | | |
apps/external-display-example/ios/Pods | |
apps/external-display-example/ios/Podfile.lock | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn | |
# Prebuild the iOS folder for Expo | |
- name: Prebuild iOS with Expo | |
working-directory: apps/external-display-example | |
run: yarn expo prebuild --platform ios | |
# Install xcpretty for better build output | |
- name: Install xcpretty | |
run: gem install xcpretty | |
# Build the iOS app using Xcode (with xcpretty) | |
- name: Build iOS App (Debug) with xcpretty | |
working-directory: apps/external-display-example/ios | |
run: | | |
set -o pipefail && xcodebuild \ | |
-workspace externaldisplayexample.xcworkspace \ | |
-scheme externaldisplayexample \ | |
-configuration Debug \ | |
-sdk iphonesimulator \ | |
-derivedDataPath build | xcpretty | |
build-ios-new-arch: | |
runs-on: macos-latest | |
steps: | |
# Checkout the code | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
# Set up Node.js | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
# Cache Yarn dependencies | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Cache CocoaPods dependencies | |
- name: Cache CocoaPods | |
uses: actions/cache@v4 | |
with: | |
path: | | |
apps/external-display-example/ios/Pods | |
apps/external-display-example/ios/Podfile.lock | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn | |
# Prebuild the iOS folder for Expo | |
- name: Prebuild iOS with Expo | |
working-directory: apps/external-display-example | |
run: yarn expo prebuild --platform ios | |
# Install xcpretty for better build output | |
- name: Install xcpretty | |
run: gem install xcpretty | |
# Build the iOS app using Xcode (with xcpretty) | |
- name: Build iOS App (Debug) with xcpretty | |
working-directory: apps/external-display-example/ios | |
run: | | |
set -o pipefail && xcodebuild \ | |
-workspace externaldisplayexample.xcworkspace \ | |
-scheme externaldisplayexample \ | |
-configuration Debug \ | |
-sdk iphonesimulator \ | |
-derivedDataPath build | xcpretty | |
build-android-old-arch: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
# Disable new architecture in app config | |
- name: Disable New Architecture in JSON | |
working-directory: apps/external-display-example | |
run: | | |
sed -i 's/"newArchEnabled": true/"newArchEnabled": false/g' app.json | |
# Set up Node.js | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
# Install Java 17 | |
- name: Set up Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
# Cache Yarn dependencies | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Cache Gradle dependencies | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-${{ runner.os }}- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn | |
# Prebuild the Android folder for Expo | |
- name: Prebuild Android with Expo | |
working-directory: apps/external-display-example | |
run: yarn expo prebuild --platform android | |
- name: Set Gradle JVM options | |
working-directory: apps/external-display-example | |
run: echo "org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m" >> android/gradle.properties | |
# Build the APK using Gradle (without running on a device) | |
- name: Build Android APK | |
working-directory: apps/external-display-example/android | |
run: ./gradlew assembleDebug | |
build-android-new-arch: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
# Set up Node.js | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
# Install Java 17 | |
- name: Set up Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
# Cache Yarn dependencies | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Cache Gradle dependencies | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-${{ runner.os }}- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn | |
# Prebuild the Android folder for Expo | |
- name: Prebuild Android with Expo | |
working-directory: apps/external-display-example | |
run: yarn expo prebuild --platform android | |
- name: Set Gradle JVM options | |
working-directory: apps/external-display-example | |
run: echo "org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m" >> android/gradle.properties | |
# Build the APK using Gradle (without running on a device) | |
- name: Build Android APK | |
working-directory: apps/external-display-example/android | |
run: ./gradlew assembleDebug |