Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an action to build and test the example iOS app #33

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/example-build.yml
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: '15.0-beta'
- 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"
Loading