Skip to content

Commit

Permalink
chore(fix swift ci): get list of available simulators
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpooleyml committed Dec 11, 2024
1 parent ba5f0e4 commit 6e8d305
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci-swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,19 @@ jobs:
- run: rustup update stable && rustup default stable
- name: Select Xcode 16.1
run: sudo xcode-select -s /Applications/Xcode_16.1.app
- name: Install swiftformat
run: brew install swiftformat
- name: Build bindings
run: sh platforms/shared/zksync-sso/crates/ffi/build-swift-framework.sh
- name: Select Simulator
run: |
# List simulators and find the UDID of the desired one
UDID=$(xcrun simctl list devices | grep -E "iOS 18.1.*iPhone 16 Pro" | grep -v "unavailable" | head -1 | awk -F '[()]' '{print $2}')
UDID=$(xcrun simctl list devices | awk '/-- iOS 18.1 --/{flag=1; next} /--/{flag=0} flag' | grep "iPhone 16 Pro" | awk -F '[()]' '{print $2}' | head -1)
if [ -z "$UDID" ]; then
echo "Simulator not found!" >&2
exit 1
fi
echo "Simulator UDID: $UDID"
# Pass the UDID to the next step
echo "SIMULATOR_UDID=$UDID" >> $GITHUB_ENV
- name: Install swiftformat
run: brew install swiftformat
- name: Build bindings
run: sh platforms/shared/zksync-sso/crates/ffi/build-swift-framework.sh
- name: Build & test Swift SDK
run: |
echo "SIMULATOR_UDID=${{ env.SIMULATOR_UDID }}"
Expand Down

0 comments on commit 6e8d305

Please sign in to comment.