Skip to content

SIANXSVC-1225: reorder steps, add path to project in ios.yml #14

SIANXSVC-1225: reorder steps, add path to project in ios.yml

SIANXSVC-1225: reorder steps, add path to project in ios.yml #14

Workflow file for this run

name: Xcode - Build and Analyze
on:
push:
branches: [ "SIANXSVC-1225" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and analyse default scheme using xcodebuild command
runs-on: macos-latest
env:
PROJECT_NAME: AnexiaAutheticator
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Default Scheme
working-directory: ./TwoFas
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: Clean
env:
scheme: ${{ 'default' }}
run: |
xcodebuild clean -project ./TwoFas/${{env.PROJECT_NAME}}.xcodeproj -scheme "$scheme" -destination 'generic/platform=iOS'
- name: Build
env:
scheme: ${{ 'default' }}
run: |
xcodebuild build-for-testing -scheme "$scheme" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14 Pro,OS=16.2'
- name: Run Tests
run: |
xcodebuild test-without-building -scheme "$scheme" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14 Pro,OS=16.2'
- name: Build/Release
uses: hectorguerrini/[email protected]