-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an action to build and test the example iOS app
- Loading branch information
1 parent
3be5b90
commit 864fb7d
Showing
1 changed file
with
40 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build Example iOS app | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
name: Build and Test the Example app | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
- uses: swift-actions/[email protected] | ||
with: | ||
swift-version: "5.9" | ||
- name: Bootstrap | ||
working-directory: Example | ||
run: ./bootstrap | ||
- name: Build | ||
working-directory: Example | ||
env: | ||
scheme: ${{ 'KnitExample' }} | ||
run: | | ||
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) | ||
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*Simulator.*\([A-Z0-9-]*\)$' | grep -oE '[A-Z0-9-]{36}' | head -1` | ||
xcodebuild build-for-testing -scheme KnitExample -destination "id=$device" | ||
- name: Test | ||
working-directory: Example | ||
env: | ||
scheme: ${{ 'KnitExample' }} | ||
run: | | ||
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) | ||
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*Simulator.*\([A-Z0-9-]*\)$' | grep -oE '[A-Z0-9-]{36}' | head -1` | ||
xcodebuild test-without-building -scheme KnitExample -destination "id=$device" |