Skip to content

Xcode Cloud向けCI設定修正 - #4533

Merged
TinyKitten merged 1 commit into
devfrom
fix/xcode-cloud
Oct 30, 2025
Merged

TinyKitten merged 1 commit into
devfrom
fix/xcode-cloud

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Oct 30, 2025 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

リリースノート

  • Chores
    • iOSビルドスクリプトの改善により、ビルドプロセスの安定性と信頼性が向上しました。エラーハンドリングが強化され、ビルド環境の一貫性が向上します。

@TinyKitten TinyKitten self-assigned this Oct 30, 2025
@coderabbitai

coderabbitai Bot commented Oct 30, 2025 •

Copy link
Copy Markdown
Contributor

iOS CI スクリプト統一の改革

大義名分(Walkthrough)

朕が命じたる変更は、iOS CI スクリプトの統一と厳格化なり。依存関係管理を Homebrew より nvm・pnpm へ移行し、シェルの厳格モード(set -euo pipefail)を導入す。これにより、全土のビルドプロセスにおいて一貫性と堅牢性を確保するものなり。

改革の詳細(Changes)

国家施策 / ファイル 内容
CI依存関係管理の刷新
ios/ci_scripts/ci_post_clone.sh
Homebrew ベースの CocoaPods・Node 設定を廃止。代わりに strict モード有効化、nvm インストール、Node 24 導入、pnpm@10 配置を実施。pod install に --repo-update フラグを追加し、pnpm approve-builds を新規導入。
エラー処理の厳格化
ios/ci_scripts/ci_pre_xcodebuild.sh
厳格シェルオプション (set -euo pipefail) を導入。エラー発生時の即座の終了、未定義変数のエラー化、パイプラインの厳格な失敗伝播により、制御フローの信頼性を強化。

評定(Estimated code review effort)

🎯 2 (Simple) | ⏱️ ~10 分

朕の見立てでは、本変更は単純性を備えたり。スクリプト管理ツールの置き換えと厳格オプションの追加は、反復的かつ明瞭なるパターンなり。ただし以下の点に留意すべし:

  • Node バージョン 24 の選定理由と互換性確認
  • pnpm@10 への移行における依存関係の検証
  • --repo-update フラグが既存の pod install 挙動に与える影響

関連する先例(Possibly related PRs)

  • dev<-master #4042: ci_pre_xcodebuild.sh ファイルに対する先行する変更。本変更と同じく SENTRY 環境変数の処理とエラーハンドリングを扱いたり。

国家の印(Suggested labels)

ios

歴史に刻まれし詩(Poem)

🏛️ 朕の令により、東海より西北に至るまで
スクリプト厳格に、エラー即座に処す
Node の新星は pnpm と共に舞い降りて
CI の流れ、堅牢なる城壁のごとし ⚔️

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 朕が玉璽を以って確認する所、このプルリクエストのタイトル「Xcode Cloud向けCI設定修正」は、実際の変更内容と符合し、且つ明確なり。即ち、ios/ci_scripts配下の2つのシェルスクリプトの修正を通じたXcode Cloud環境向けのCI設定変更という、最も重要なる改修の内容を正確に表現している。タイトルは簡潔にして具体的であり、歴史に刻まれし者が一目にて主要な変更を理解すること能わん。
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/xcode-cloud

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the ios label Oct 30, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
ios/ci_scripts/ci_post_clone.sh (1)

5-8: ツールチェーンの現代化は優れたり。ただしネットワーク依存度に留意すべし

朕がいうところ、Node 24とpnpm@10への明示的なバージョン固定は良好なり。されど第5行のcurl経由でのnvm取得は、毎度ビルドのたびにGitHubより約500KBをダウンロードすることになる。

本番CI環境においては、キャッシング機構を検討するか、またはnvmのプリインストールも一案なり。set -euo pipefailにより失敗は検知されるが、ネットワーク遅延による頻繁な失敗を避けよ。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b6899e and 9a3975f.

📒 Files selected for processing (2)
  • ios/ci_scripts/ci_post_clone.sh (1 hunks)
  • ios/ci_scripts/ci_pre_xcodebuild.sh (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 0
File: :0-0
Timestamp: 2025-08-11T21:13:39.083Z
Learning: TinyKitten prefers concise code reviews for the TrainLCD/MobileApp repository. Keep review comments brief and to the point.
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4511
File: package.json:43-66
Timestamp: 2025-09-22T09:21:21.741Z
Learning: TinyKittenはExpo SDK 54アップグレードにおいて、babel.config.js、RCTNewArchEnabled設定、Podfile設定を適切に処理している。App ClipのiOS deployment targetの調整のみが必要な状況。
📚 Learning: 2024-12-15T00:35:52.018Z
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 3947
File: ios/ci_scripts/ci_pre_xcodebuild.sh:2-3
Timestamp: 2024-12-15T00:35:52.018Z
Learning: `ios/ci_scripts/ci_pre_xcodebuild.sh` スクリプトでは、Prod ディレクトリを作成する必要はありません。

Applied to files:

  • ios/ci_scripts/ci_pre_xcodebuild.sh
📚 Learning: 2025-09-22T09:21:21.741Z
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 4511
File: package.json:43-66
Timestamp: 2025-09-22T09:21:21.741Z
Learning: TinyKittenはExpo SDK 54アップグレードにおいて、babel.config.js、RCTNewArchEnabled設定、Podfile設定を適切に処理している。App ClipのiOS deployment targetの調整のみが必要な状況。

Applied to files:

  • ios/ci_scripts/ci_post_clone.sh
🔇 Additional comments (4)
ios/ci_scripts/ci_pre_xcodebuild.sh (2)

3-3: 厳格なシェルオプションの導入は良好なり

朕は第3行のset -euo pipefail導入を評価す。エラーハンドリングの堅牢化は、CI環境において不可欠なり。


5-5: Prodディレクトリの作成漏れにより、本番ビルドが失敗する恐れあり

朕が指摘するところ、第5行のmkdirはDevディレクトリのみ生成し、第23行で参照されるProdディレクトリは作成されておらぬ。XCODE_CANARY_APPが"false"の場合、ファイル書き込みに失敗する可能性がある。

先の学習によれば、Prodディレクトリ作成は不要とのこと。第5行のmkdirを削除するか、または両ディレクトリを明示的に作成すべし。

以下の修正案を提示する:

-mkdir -p /Volumes/workspace/repository/ios/Schemes/Dev
+mkdir -p /Volumes/workspace/repository/ios/Schemes/Dev \
+         /Volumes/workspace/repository/ios/Schemes/Prod

あるいは単に削除して以下とする:

-mkdir -p /Volumes/workspace/repository/ios/Schemes/Dev

Also applies to: 20-24

⛔ Skipped due to learnings
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 3947
File: ios/ci_scripts/ci_pre_xcodebuild.sh:2-3
Timestamp: 2024-12-15T00:35:52.018Z
Learning: `ios/ci_scripts/ci_pre_xcodebuild.sh` スクリプトでは、Prod ディレクトリを作成する必要はありません。
ios/ci_scripts/ci_post_clone.sh (2)

3-3: 厳格シェルモードの適用、統一されたり

朕はci_pre_xcodebuild.shとの一貫性を評価す。第3行のset -euo pipefailにより、スクリプト全体のロバスト性が向上せり。


9-9: 新しいコマンド類の説明を所望す

朕が確認したきことは、第9行のpnpm approve-buildsの用途なり。また第11行の--repo-updateフラグの必要性も。これらが導入の必要条件なるか、背景情報を示されたし。

Also applies to: 11-11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant