Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Prepare CirclrCI's macOS Intel Support Deprecation
Search
Kuroruri
May 21, 2024
Programming
56
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Prepare CirclrCI's macOS Intel Support Deprecation
Kuroruri
May 21, 2024
More Decks by Kuroruri
See All by Kuroruri
CI/CD·自動化入門
kuroruri
1
4.7k
Knowledge obtained by making about 10 apps with Redux in iOS
kuroruri
0
1k
Other Decks in Programming
See All in Programming
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
9
3.8k
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
560
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
900
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
3.2k
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
490
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
120
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.4k
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
140
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
170
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
440
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
740
Google Apps Script で Ruby を動かす
kawahara
0
120
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
350
A designer walks into a library…
pauljervisheath
211
24k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
KATA
mclloyd
PRO
35
15k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.7k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
190
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
190
Darren the Foodie - Storyboard
khoart
PRO
3
3.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Transcript
CircleCI の Intel macOS 廃止に備える Mobile勉強会 Wantedly × チームラボ ×
Sansan #14
- 名前 - くろるり - 所属 - teamLab Inc. -
仕事 - iOSアプリ作る - アプリ開発効率化有志チーム - 業務改善有志チーム 本日話している人
はじめに
質問 : 開発者の PC は Apple Silicon ?
おそらく 殆ど YES コンパイル早くなるしね 多分みんな乗り換えてるよね
質問 : CI/CD サービスのほうは?
多分、半々 概ね料金上がるし
https://discuss.circleci.com/t/macos-intel-support-deprecation-in-januar y-2024/48718 28 June 2024 - Gen2 will no longer
be available to use - Customers will need to update their config to a new resource class before this date to avoid build errors とはいえ 終わりは来る
CI/CD での Apple Silicon 対応時の 引っ掛かりポイントを 幾つかピックアップ
本題
コード側は Apple Silicon 対応 ?
事例 : ライブラリが arm64-simulator 非対応 - Google の MLKit など
arm64-simulator 非対応ライブラリが入っている - このため arm64-simulator での Unit Test が動かない - 或いはマルチモジュール構成でコンパイ ルエラーが発生する - この状態になっていないかの判断は BuildSettings を見ればわかる $ bundle exec fastlane my_test_lane (中略) ❌ /Users/distiller/project/MyProject/MyModel.swift: could not find module '<SubModule>' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator,
対応 : rosetta 入れて rosetta simulator でテストする - macOS Orb
使って rosetta いれる - https://circleci.com/developer/ja/orbs /orb/circleci/macos#commands-install- rosetta - fastlane run_tests ( scan ) の run_rosetta_simulator を true にする - https://docs.fastlane.tools/actions/sc an/ - とはいえ根本療法は arm64 simulator に 対応することに違いはない jobs: my_job: executor: my_executor steps: - checkout - macos/install-rosetta lane :my_test_lane do scan( run_rosetta_simulator: true, formatter: "xcpretty-json-formatter", clean: true, skip_slack: true, result_bundle: true, ) end
使用ツール類は Apple Silicon 対応?
install_mint: steps: - restore_cache: keys: - mintbin-{{ checksum ".xcode-version" }}-{{
checksum "DevelopmentTools/Package.resolved" }} - run: name: Build Mint Binary command: | DevelopmentTools/.build/release/mint --version || (bundle exec fastlane build_tools_install package_path:./DevelopmentTools product:mint && DevelopmentTools/.build/release/mint --version) - save_cache: key: mintbin-{{ checksum ".xcode-version" }}-{{ checksum "DevelopmentTools/Package.resolved" }} paths: - ./DevelopmentTools/.build ※ build_tools_install は `spm build release` を叩く自作 lane 事例: ツールのバイナリキャッシュが x86_64 のまま - Swift 製 CLI ツールを SPM で 管理しているパターン - SPM の Build Tools Plugin ではない、 CLI ツール自作に近い形の話 - CI/CD パイプライン中で実行バイナリを ビルドしてキャッシュを持ってる - Homebrew でツールをインストールして キャッシュを持ってるパターン
対応: キャッシュ分ける - CircleCI にはキャッシュを 削除する機能が無い - キャッシュのキーが変わりさえすれば 問題がないので、キャッシュのキーに CPU
アーキテクチャを含める変更が良い install_mint: steps: - restore_cache: keys: - mintbin-{{ arch }}-{{ checksum ".xcode-version" }}-{{ checksum "DevelopmentTools/Package.resolved" }} - run: name: Build Mint Binary command: | DevelopmentTools/.build/release/mint --version || (bundle exec fastlane build_tools_install package_path:./DevelopmentTools product:mint && DevelopmentTools/.build/release/mint --version) - save_cache: key: mintbin-{{ arch }}-{{ checksum ".xcode-version" }}-{{ checksum "DevelopmentTools/Package.resolved" }} paths: - ./DevelopmentTools/.build ※ build_tools_install は `spm build release` を叩く自作 lane
事例: そもそもツールが arm64 対応してない - 例えば danger-xcov で使われる xcov の
core プログラムが arm64 未対応 - https://github.com/fastlane-communit y/xcov/issues/214#issuecomment-161 2024225 - https://discuss.circleci.com/t/danger- xcov-fails-on-apple-silicon/48360
対応: rosetta 入れる - 根本療法はツール側の arm64 対応 - 暫定対処的には rosetta
を入れてしまえ ば良い
他、CircleCI 固有のあれこれ
事例: シミュレータタイムアウト問題 ( Xcode 15.0.1 ) - fastlane の scan
を実行すると コンパイルは終わるけどシミュレータが 起動せずに timeout が発生 - https://discuss.circleci.com/t/too-long -with-no-output-exceeded-30m0s-con text-deadline-exceeded/49794 - timeout 発生しなくても時間が伸びるの で金がかかる - 一見 macos/preboot-simulator で 解決するように思えるが・・・
例外: rosetta simulator 指定時 - fastlaen の scan は run_rosetta_simulator
を指定すると device の指定が正しく動作しないらしい - https://github.com/fastlane/fastlane/ issues/21293 - つまり preboot した device を使わせる ことが出来ない - 勝手に device を選んでその起動待ちで timeout してしまう
対応: No Xcode 15.0.x, Use Xcode 15.1.0 or later -
パフォーマンスが悪い Xcode 15.0.x を 使わなければ良い - Xcode 15.1.0 以上だと改善するので、 Xcode 15.1.0 以上を使う - 体感上 15.1.0 以上なら preboot しなく ても問題ないパフォーマンス
- 多分クラウドの macOS はサーバーラックに物理筐体が並んでいるので、 マシン毎の物理 IP もマシン毎に固定されるはず - よっておそらく Intel
のマシン群で使われる IP と m1 のマシン群で使われる IP は別 事例: m1 だと IP 制限かかったリソースにアクセス出来ん 対応: IP 許可見直す - 単純に IP 許可が漏れているだけと想定されるので設定見直す
事例: AWS S3 へのアクセスが遅くなる、終わらん https://support.circleci.com/hc/en-us/articles/19334402064027-Troubleshooting-slow-uploads-to-S3-for-jobs-using-an-m1-macOS-resource-class
色々あるけど粛々やろう