Skip to content

Commit

Permalink
Add an action to build and test the example iOS app
Browse files Browse the repository at this point in the history
  • Loading branch information
skorulis-ap committed Jun 21, 2023
1 parent 019d941 commit 79d6ff7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/example-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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:
- name: Checkout
uses: actions/checkout@v3
- 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"

0 comments on commit 79d6ff7

Please sign in to comment.