Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
229 changes: 229 additions & 0 deletions apps/build-cache/.eas/workflows/create-and-build-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
name: Create and Build Public Cache App (All Platforms)

on:
workflow_dispatch: {}

jobs:
create-and-build-android:
name: Create public-cache app and build Android
runs_on: linux-large
env:
EAS_USE_CACHE: "1"
EAS_SAVE_CACHE: "1"
EAS_RESTORE_CACHE: "0"
EAS_BUILD_RUNNER: "eas-build"
EAS_PUBLIC_CACHE: "1"
ANDROID_CCACHE: "/usr/bin/ccache"
steps:
- name: Install dependencies
run: yarn install

- name: Create fresh expo app
run: |
# Create a new directory for the public-cache app
mkdir -p ../app
cd ../app

# Initialize a new Expo app
npx create-expo-app@latest build-cache --template default

# Update app.json with the correct name and slug
cd build-cache
cat > app.json << 'EOF'
{
"expo": {
"name": "build-cache",
"slug": "build-cache",
"owner": "expo",
"version": "1.0.0",
"orientation": "portrait",
"userInterfaceStyle": "light",
"newArchEnabled": true,
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.expo.buildcache"
},
"android": {
"edgeToEdgeEnabled": true,
"package": "com.expo.buildcache"
},
"extra": {
"eas": {
"projectId": "38453199-7b7d-4338-a6d1-9fb21f48ab0d"
}
}
}
}
EOF

# Install dependencies
yarn install

- name: Create EAS build configuration
run: |
cd ../app/build-cache
cat > eas.json << 'EOF'
{
"cli": {
"version": ">= 13.2.2"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"preview": {
"distribution": "internal",
"android": {
"buildType": "apk",
"gradleCommand": ":app:assembleDebug",
"withoutCredentials": true,
}
},
"production": {}
},
"submit": {
"production": {}
}
}
EOF

- name: Run Local EAS Build (Android)
run: |
sudo apt-get update && sudo apt-get install -y ccache
cd ../app/build-cache
npx eas-cli build --platform android --profile preview --local --non-interactive

- name: Show cache stats
run: |
command -v ccache
ccache --show-stats -v

# - name: Save ccache
# uses: eas/save_cache
# with:
# key: public-android-ccache-1.0.0-${{ hashFiles('yarn.lock') }}
# path: /home/expo/.cache/ccache

- name: Run Local EAS Build (Android) again
run: |
cd ../app/build-cache
npx eas-cli build --platform android --profile preview --local --non-interactive

- name: Show cache stats
run: |
command -v ccache
ccache --show-stats -v

create-and-build-ios:
name: Create public-cache app and build iOS
runs_on: macos-medium
env:
EAS_USE_CACHE: "1"
EAS_SAVE_CACHE: "1"
EAS_BUILD_RUNNER: "eas-build"
EAS_PUBLIC_CACHE: "1"
EAS_RESTORE_CACHE: "0"
CCACHE_BINARY: "/opt/homebrew/bin/ccache"
CCACHE_CPP2: "1"
USE_CCACHE: "1"
steps:
- name: Install dependencies
run: yarn install

- name: Create fresh expo app
run: |
# Create a new directory for the public-cache app
mkdir -p ../app
cd ../app

# Initialize a new Expo app
npx create-expo-app@latest build-cache --template default

# Update app.json with the correct name and slug
cd build-cache
cat > app.json << 'EOF'
{
"expo": {
"name": "build-cache",
"slug": "build-cache",
"owner": "expo",
"version": "1.0.0",
"orientation": "portrait",
"userInterfaceStyle": "light",
"newArchEnabled": true,
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.expo.buildcache"
},
"android": {
"package": "com.expo.buildcache"
},
"extra": {
"eas": {
"projectId": "38453199-7b7d-4338-a6d1-9fb21f48ab0d"
}
}
}
}
EOF

# Install dependencies
yarn install

- name: Create EAS build configuration
run: |
cd ../app/build-cache
cat > eas.json << 'EOF'
{
"cli": {
"version": ">= 13.2.2"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal",
"ios": {
"simulator": true
}
},
"production": {}
},
"submit": {
"production": {}
}
}
EOF

- name: Run Local EAS Build (iOS)
run: |
brew install ccache
cd ../app/build-cache
npx eas-cli build --platform ios --profile preview --local --non-interactive

- name: Show cache stats
run: |
command -v ccache
ccache --show-stats -v

# - name: Save ccache
# uses: eas/save_cache
# with:
# key: public-ios-ccache-1.0.0-${{ hashFiles('yarn.lock') }}
# path: /Users/expo/Library/Caches/ccache

- name: Run Local EAS Build (iOS) again
run: |
cd ../app/build-cache
npx eas-cli build --platform ios --profile preview --local --non-interactive

- name: Show cache stats
run: |
command -v ccache
ccache --show-stats -v
98 changes: 98 additions & 0 deletions apps/build-cache/.eas/workflows/create-and-build-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Create and Build Public Cache App (iOS)

on:
workflow_dispatch: {}

jobs:
create-and-build-ios:
name: Create public-cache app and build iOS
runs_on: macos-medium
env:
EAS_USE_CACHE: "1"
steps:
- name: Install dependencies
run: yarn install

- name: Create fresh expo app
run: |
# Create a new directory for the public-cache app
mkdir -p ../public-cache
cd ../public-cache

# Initialize a new Expo app
npx create-expo-app@latest . --template blank --no-install

# Update app.json with the correct name and slug
cat > app.json << 'EOF'
{
"expo": {
"name": "build-cache",
"slug": "build-cache",
"owner": "mustafastaging",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.yourcompany.publiccache"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.yourcompany.publiccache"
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "1e65aacb-0938-4607-8c6b-9d896a1d8819"
}
}
}
}
EOF

# Install dependencies
yarn install

- name: Create EAS build configuration
run: |
cd ../public-cache
cat > eas.json << 'EOF'
{
"cli": {
"version": ">= 13.2.2"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal",
"ios": {
"simulator": true
}
},
"production": {}
},
"submit": {
"production": {}
}
}
EOF

- name: Run Local EAS Build (iOS)
run: |
cd ../public-cache
npx eas-cli build --platform ios --profile preview --local --non-interactive
Loading
Loading