diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 0000000000..a8e721aaac --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,34 @@ +name: iOS starter workflow + +on: + push: + branches: [ "master", "test_ga_build" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + name: Build and Test default scheme using any available iPhone simulator + runs-on: macos-13-arm64 + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + - name: Build + env: + scheme: ${{ 'Demo' }} + destination: ${{ 'platform=iOS Simulator,OS=15.2,name=iPhone 13 Pro' }} + run: | + xcodebuild build-for-testing -scheme "$scheme" -workspace FinniversKit.xcworkspace -destination "$platform" + - name: Test + env: + scheme: ${{ 'Demo' }} + destination: ${{ 'platform=iOS Simulator,OS=15.2,name=iPhone 13 Pro' }} + run: | + xcodebuild test-without-building -scheme "$scheme" -workspace FinniversKit.xcworkspace -destination "$platform"