-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.38 KB
/
ios.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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]