-
Notifications
You must be signed in to change notification settings - Fork 352
92 lines (77 loc) · 2.86 KB
/
ci.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- "**"
schedule:
- cron: '3 3 * * 2' # 3:03 AM, every Tuesday
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-podspec:
name: Lint Podspec
runs-on: macos-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # required to be able to find Git tags
- name: Lint Podspec
run: |
set -eo pipefail
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
pod lib lint SwiftUIIntrospect.podspec --allow-warnings
ci:
name: ${{ matrix.platform[0] }} ${{ matrix.platform[1] }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- platform: [visionOS, 1]
runtime: visionOS 1.0
os: macos-14
xcode: 15.2
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Set up pkgx environment
uses: pkgxdev/setup@v1
with:
+: fastlane xcodes
- name: Set environment variables
run: echo "SKIP_SLOW_FASTLANE_WARNING=1" >> $GITHUB_ENV
- if: ${{ matrix.platform[0] == 'visionOS' }}
run: |
defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
- name: Select Xcode version
run: sudo xcodes select ${{ matrix.xcode }}
- if: ${{ matrix.install }}
name: Install Required Runtime (${{ matrix.runtime }})
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
command: sudo xcodes runtimes install '${{ matrix.runtime }}'
- if: true
name: '[Debug] List Available Runtimes, Simulators, and Destinations'
run: |
xcrun simctl list
xcodebuild -scheme "SwiftUIIntrospect" -showdestinations
- if: ${{ matrix.platform[0] != 'watchOS' }}
name: Build Showcase
run: fastlane build platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:Showcase
- if: ${{ matrix.platform[0] == 'watchOS' }}
name: Build Library
run: fastlane build platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:SwiftUIIntrospect
- if: ${{ matrix.platform[0] != 'watchOS' }}
name: Run Tests
run: fastlane test platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:SwiftUIIntrospectTests configuration:Debug
- if: ${{ matrix.platform[0] == 'iOS' && matrix.platform[1] <= '16' }}
name: Run UI Tests
run: fastlane test platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:SwiftUIIntrospectUITests configuration:Debug