-
Notifications
You must be signed in to change notification settings - Fork 34
69 lines (65 loc) · 2.23 KB
/
xcodebuild_for_example_app.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Xcode Build for Example App
on:
workflow_dispatch:
push:
branches: [ tretnfckit-main ]
pull_request:
branches: [ tretnfckit-main ]
env:
SCHEME_NAME: TRETNFCKitExample
IOS_SIMULATOR_NAME: iPhone 15 Pro
XCODE_SELECT_PATH: '/Applications/Xcode_16_Release_Candidate.app/Contents/Developer'
jobs:
show_software_information:
name: Show software information
strategy:
fail-fast: false
matrix:
os: [macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Show Xcode list
run: ls -n /Applications | grep 'Xcode'
- name: Show the default version of Xcode
run: xcodebuild -version
- name: Set Xcode version
run: sudo xcode-select -s '${{ env.XCODE_SELECT_PATH }}'
- name: Show lists the targets and configurations in a project, or the schemes in a workspace
run: xcodebuild -list
working-directory: ./Examples
- name: Show a list of destinations
run: xcodebuild -scheme ${{ env.SCHEME_NAME }} -showdestinations
working-directory: ./Examples
xcodebuild_for_example_app:
name: Xcode Build for Example App
strategy:
fail-fast: false
matrix:
os: [macos-14]
platform: ['iOS']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set Xcode version
run: sudo xcode-select -s '${{ env.XCODE_SELECT_PATH }}'
- name: Build the scheme
run: |
case ${{ matrix.platform }} in
'iOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.IOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
esac
working-directory: ./Examples
- name: Upload Xcode Build log
if: always()
uses: actions/upload-artifact@v4
with:
name: xcodebuild log (${{ matrix.os }}, ${{ matrix.platform }})
path: |
Examples/xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log
- name: Upload Xcode DerivedData
if: always()
uses: actions/upload-artifact@v4
with:
name: Xcode DerivedData (${{ matrix.os }}, ${{ matrix.platform }})
path: |
/Users/runner/Library/Developer/Xcode/DerivedData