-
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.57 KB
/
xcodebuild.yml
File metadata and controls
47 lines (39 loc) · 1.57 KB
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
name: xcodebuild
on:
workflow_call: {}
jobs:
validate:
runs-on: macos-15
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '^16.1'
- name: Version information
run: |
xcrun xcodebuild -version
- uses: actions/checkout@v4
- name: Setup local configuration
run: |
version=$(xcrun simctl list -j | jq -r '[[.runtimes[] | select(.isAvailable == true)] | .[].version] | max_by(split(".") | map(tonumber))')
printf 'os=%s\n' "$version" | tee -a $GITHUB_ENV
printf 'name=%s\n' "$(xcrun simctl list -j | jq -r ".runtimes[] | select(.version == \"$version\") | .supportedDeviceTypes[] | .name" | grep -E '^iPhone [0-9][0-9]?$' | sort -nk2 -t' ' | tail -n1)" | tee -a $GITHUB_ENV
cp -v Powercast/Local.xcconfig.sample Powercast/Local.xcconfig
- name: Cache DerivedData
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData/Powercast-*
key: ${{ runner.os }}-xcode-${{ hashFiles('**/*.pbxproj', '**/swiftpm/Package.resolved') }}
restore-keys: |
${{ runner.os }}-xcode-
- name: Build information
run: xcrun xcodebuild -showBuildSettings
- name: Test
run: |
xcodebuild -project Powercast.xcodeproj \
-scheme Powercast \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=${{ env.name }},OS=${{ env.os }}' \
-resultBundlePath TestResults \
-quiet \
test \
CODE_SIGNING_ALLOWED=NO