Skip to content

feat(swiftsdk): swift sdk scaffolding #5

feat(swiftsdk): swift sdk scaffolding

feat(swiftsdk): swift sdk scaffolding #5

Workflow file for this run

name: Swift CI
on:
pull_request:
paths:
- 'platforms/**'
push:
paths:
- 'platforms/**'
jobs:
swift-sdk:
name: Swift Package - latest
runs-on: macos-15
strategy:
matrix:
config:
- debug
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- run: rustup update stable && rustup default stable
- name: Select Xcode 16.1
run: sudo xcode-select -s /Applications/Xcode_16.1.app
- name: Select Simulator
run: |
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"
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 }}"
xcodebuild test \
-skipMacroValidation \
-configuration debug \
-workspace .github/package.xcworkspace \
-scheme yttrium \
-destination "platform=iOS Simulator,id=${{ env.SIMULATOR_UDID }}" || exit 1