-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: eas build failed after changing ruby versions (#1428)
* fix: eas build failed after changing ruby versions * try using prebuilt image with appropriate ruby versions https://docs.expo.dev/build-reference/infrastructure/#ios-server-images iOS server images macos-sonoma-14.6-xcode-16.1 ( latest , sdk-52 ) Details macOS Sonoma 14.6 Xcode 16.1 (16B40) Node.js 18.18.0 Bun 1.1.33 Yarn 1.22.21 pnpm 9.12.3 npm 9.8.1 fastlane 2.225.0 CocoaPods 1.16.2 Ruby 3.2 node-gyp 10.2.0 * specify dependencies used in eas build images * specify eas dependencies for local builds more specifically * add versioning and clean script * Update Ruby Update Ruby install steps Update dev client builds Update dev client builds Update build checks to use eas dev build instead Remove build output Update build machines fix builds --------- Co-authored-by: Alex Risch <[email protected]>
- Loading branch information
1 parent
9119c3e
commit f149777
Showing
9 changed files
with
142 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,29 +16,12 @@ jobs: | |
- name: Setup repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Clean Android Device | ||
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Setup node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20.x | ||
cache: "yarn" | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "17" | ||
distribution: "temurin" | ||
|
||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
|
||
- name: 🏗 Setup EAS | ||
uses: expo/expo-github-action@v8 | ||
with: | ||
|
@@ -49,10 +32,4 @@ jobs: | |
run: yarn install | ||
|
||
- name: Build Android app | ||
run: eas build --platform android --profile development --local --output ${{ github.workspace }}/app-release.apk | ||
|
||
- name: Upload APK artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-release | ||
path: ${{ github.workspace }}/app-release.apk | ||
run: eas build --profile development --platform android --non-interactive |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.2.5 |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/bash | ||
|
||
# ANSI color codes | ||
GREEN='\033[0;32m' | ||
RED='\033[0;31m' | ||
YELLOW='\033[1;33m' | ||
NC='\033[0m' # No Color | ||
BOLD='\033[1m' | ||
|
||
# Function to check if a command exists | ||
command_exists() { | ||
command -v "$1" >/dev/null 2>&1 | ||
} | ||
|
||
# Function to print status | ||
print_status() { | ||
local name=$1 | ||
local version=$2 | ||
local path=$3 | ||
local status=$4 | ||
|
||
printf "${BOLD}%-12s${NC}" "$name" | ||
|
||
if [ "$status" = "OK" ]; then | ||
printf "${GREEN}✓${NC} " | ||
else | ||
printf "${RED}✗${NC} " | ||
fi | ||
|
||
printf "%-45s" "$version" | ||
echo "$path" | ||
} | ||
|
||
echo -e "\n${BOLD}Checking iOS build dependencies...${NC}\n" | ||
|
||
# Check Ruby | ||
if command_exists ruby; then | ||
RUBY_VERSION=$(ruby -v) | ||
RUBY_PATH=$(which ruby) | ||
print_status "RUBY" "$RUBY_VERSION" "$RUBY_PATH" "OK" | ||
else | ||
print_status "RUBY" "Not installed" "N/A" "ERROR" | ||
fi | ||
|
||
# Check Bundler | ||
if command_exists bundle; then | ||
BUNDLER_VERSION=$(bundle -v) | ||
BUNDLER_PATH=$(which bundle) | ||
print_status "BUNDLER" "$BUNDLER_VERSION" "$BUNDLER_PATH" "OK" | ||
else | ||
print_status "BUNDLER" "Not installed" "N/A" "ERROR" | ||
fi | ||
|
||
# Check CocoaPods | ||
if command_exists pod; then | ||
POD_VERSION=$(pod --version) | ||
POD_PATH=$(which pod) | ||
print_status "COCOAPODS" "v$POD_VERSION" "$POD_PATH" "OK" | ||
else | ||
print_status "COCOAPODS" "Not installed" "N/A" "ERROR" | ||
fi | ||
|
||
# Print Gem environment | ||
echo -e "\n${BOLD}Ruby Gem Environment:${NC}" | ||
echo "GEM HOME: $(gem env home)" | ||
echo "GEM PATH: $(gem env gempath)" | ||
|
||
# Check Gemfile configuration | ||
if [ -f "ios/Gemfile" ]; then | ||
echo -e "\n${BOLD}Gemfile Configuration:${NC}" | ||
echo "Ruby Version: $(grep "ruby '" ios/Gemfile | cut -d"'" -f2)" | ||
echo "Bundler Version: $(grep "bundler" ios/Gemfile | grep -v "#" | head -n1)" | ||
else | ||
echo -e "\n${RED}Warning: ios/Gemfile not found${NC}" | ||
fi | ||
|
||
echo -e "\nDone checking dependencies.\n" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
############################################################### | ||
# Quickly cleans and rebuilds a React Native project by moving | ||
# build directories to Trash and reinstalling dependencies. | ||
# | ||
# Uses AppleScript for fast native Trash operations, similar | ||
# to Cmd+Delete in Finder. This is much faster than rm -rf. | ||
# | ||
# Side Effects: | ||
# - Moves node_modules, ios/build, ios/Pods to Trash | ||
# - Runs yarn install | ||
# - Runs pod install for iOS | ||
# - Prints status messages to terminal | ||
# | ||
# Example: | ||
# In terminal from project root: | ||
# ./scripts/reactNativeCleanBuild.sh | ||
# | ||
# Output: | ||
# Moving node_modules to trash... | ||
# Moving ios/build to trash... | ||
# Moving ios/Pods to trash... | ||
# Running yarn install... | ||
# Running pod install... | ||
# Clean and rebuild complete! | ||
############################################################### | ||
|
||
echo "Moving node_modules to trash..." | ||
osascript -e "tell app \"Finder\" to delete POSIX file \"$PWD/node_modules\"" | ||
|
||
echo "Moving ios/build to trash..." | ||
osascript -e "tell app \"Finder\" to delete POSIX file \"$PWD/ios/build\"" | ||
|
||
echo "Moving ios/Pods to trash..." | ||
osascript -e "tell app \"Finder\" to delete POSIX file \"$PWD/ios/Pods\"" | ||
|
||
echo "Running yarn install..." | ||
yarn install | ||
|
||
echo "Running pod install..." | ||
cd ios && pod install && cd .. | ||
|
||
echo "Clean and rebuild complete!" |