-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (101 loc) · 4.63 KB
/
Copy pathci.yml
File metadata and controls
113 lines (101 loc) · 4.63 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: CI
# What this gate proves: a clean clone of THIS repo — with no monorepo checkout
# and no locally staged XCFrameworks — resolves the RunAnywhere Swift SDK from
# its published GitHub release and compiles the app plus both extensions.
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build (iOS Simulator)
# macos-latest is the macOS 26 arm64 image — the only GitHub-hosted line that
# ships Xcode 26. Package.swift is `swift-tools-version: 6.2`, so an Xcode 16
# image (macos-15) cannot even parse the manifest.
runs-on: macos-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v7
- name: Select the newest installed Xcode
run: |
set -euo pipefail
echo "Xcode versions on this image:"
ls -d /Applications/Xcode*.app
xcode="$(ls -d /Applications/Xcode*.app | sort -V | tail -1)"
sudo xcode-select -s "${xcode}/Contents/Developer"
xcodebuild -version
swift --version
# The point of this repo: the SDK is consumed 100% remotely. Package.swift
# requires github.com/RunanywhereAI/runanywhere-swift as a version range
# (`from: "0.20.18"`, mirrored in the .xcodeproj as upToNextMajorVersion),
# and SwiftPM downloads the checksum-verified XCFramework artifacts during
# resolve. Package.resolved records the exact version and commit selected.
# If this step fails, remote consumption is broken — that is the signal.
- name: Resolve SwiftPM dependencies (remote SDK release)
run: swift package resolve
# Package.resolved is committed, so it must agree with the manifest. A
# dirty file here means someone changed the requirement without
# re-resolving — exactly how it drifted to 0.20.16 while both manifests
# said 0.20.17.
- name: Check Package.resolved is up to date
run: |
set -euo pipefail
if ! git diff --exit-code -- Package.resolved; then
echo "::error::Package.resolved is stale — run 'swift package resolve' and commit it."
exit 1
fi
- name: Resolve Xcode project package dependencies
run: |
xcodebuild \
-project RunAnywhereAI.xcodeproj \
-scheme RunAnywhereAI \
-resolvePackageDependencies
# RunAnywhereAI is the app scheme (com.apple.product-type.application). It
# builds the two embedded extensions — RunAnywhereKeyboard and
# RunAnywhereActivityExtensionExtension — as implicit dependencies, so this
# single build covers all three native targets.
#
# Code signing is disabled on purpose: a simulator build needs no identity,
# and the project carries DEVELOPMENT_TEAM = L86FH3K93L, which no hosted
# runner has credentials for.
- name: Build app + extensions
run: |
xcodebuild \
-project RunAnywhereAI.xcodeproj \
-scheme RunAnywhereAI \
-configuration Debug \
-destination 'generic/platform=iOS Simulator' \
-skipPackagePluginValidation \
-skipMacroValidation \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
build
# The unit tests need a concrete booted simulator, not the generic
# destination used for the build above. This step is why the badge means
# something: the RunAnywhereAITests target was previously wired to a
# directory that does not exist, so it compiled zero test files and every
# green run proved nothing.
- name: Unit tests
run: |
set -euo pipefail
device="$(xcrun simctl list devices available --json |
python3 -c "import json,sys; d=json.load(sys.stdin)['devices']; print(next(x['udid'] for k,v in sorted(d.items(), reverse=True) if 'iOS' in k for x in v if x['name'].startswith('iPhone')))")"
echo "Testing on simulator ${device}"
xcodebuild test \
-project RunAnywhereAI.xcodeproj \
-scheme RunAnywhereAI \
-configuration Debug \
-destination "platform=iOS Simulator,id=${device}" \
-only-testing:RunAnywhereAITests \
-skipPackagePluginValidation \
-skipMacroValidation \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO
# Advertised in the README but never wired in, which is how it rotted to
# a red exit on stale catalog literals.
- name: Static smoke preflight
run: ./scripts/smoke.sh