Repository navigation
172 lines (151 loc) · 5.06 KB
/
Copy pathios-testflight.yml
File metadata and controls
172 lines (151 loc) · 5.06 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: iOS TestFlight Deploy
permissions:
contents: read
on:
push:
branches: [main, feature/audio-v2-cutover]
paths: ['app/**']
workflow_dispatch:
inputs:
build_id:
description: 'Existing EAS build ID to submit, or status to inspect TestFlight'
required: false
type: string
jobs:
audio-v2-release-gate:
if: github.event_name == 'push' || inputs.build_id == ''
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: ./backend
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup uv
uses: astral-sh/setup-uv@v4
with:
version: latest
- name: Install Opus runtime
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libopus0
- name: Install backend test dependencies
run: uv sync --locked --group test
- name: Verify Audio V2 phone path
run: >-
uv run --group test pytest
tests/test_audio_v2_websocket_entrypoint.py
tests/test_audio_protocol_v2.py
tests/test_audio_v2_ingress.py
tests/test_audio_v2_streams.py
tests/test_audio_persistence_lifecycle.py
tests/test_audio_durability.py
-q
build-and-submit:
needs: audio-v2-release-gate
if: >-
${{
always() &&
(needs.audio-v2-release-gate.result == 'success' ||
needs.audio-v2-release-gate.result == 'skipped')
}}
runs-on: macos-26
timeout-minutes: 120
defaults:
run:
working-directory: ./app
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4.0.2
with:
# eas-cli 23 requires Node >=22; pin the runner toolchain accordingly.
node-version: 22.x
cache: 'npm'
cache-dependency-path: ./app/package-lock.json
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Verify mobile app
run: |
npm run test:wearable-activation
npm run typecheck
npm run test:voice-timing
npm run test:phone-audio-diagnostics
npm run test:push-notifications
npm run check:theme
npx --no-install expo-modules-autolinking verify --platform ios --verbose
swift test --package-path modules/chronicle-duplex-audio/ios
- name: Write and validate ASC API key
env:
ASC_API_KEY_P8: ${{ secrets.ASC_API_KEY_P8 }}
run: |
set -euo pipefail
if [ -z "$ASC_API_KEY_P8" ]; then
echo "ASC_API_KEY_P8 is not configured"
exit 1
fi
printf '%s\n' "$ASC_API_KEY_P8" > asc-api-key.p8
chmod 600 asc-api-key.p8
openssl pkey -in asc-api-key.p8 -noout -check
# Read the key/issuer ids from eas.json rather than repeating them, so the
# build and submit steps can never disagree about which key they mean.
node -e '
const ios = require("./eas.json").submit.testflight.ios;
const out = require("fs");
out.appendFileSync(process.env.GITHUB_ENV,
`EXPO_ASC_KEY_ID=${ios.ascApiKeyId}\nEXPO_ASC_ISSUER_ID=${ios.ascApiKeyIssuerId}\n`);
'
- name: Build App Store IPA locally
if: inputs.build_id == ''
# EAS still supplies the managed signing credentials, but compilation runs
# on this macOS runner so it does not consume the monthly EAS build quota.
env:
EXPO_ASC_API_KEY_PATH: ${{ github.workspace }}/app/asc-api-key.p8
EXPO_APPLE_TEAM_ID: '39Z45MQX8Z'
run: >-
eas build
--platform ios
--profile testflight
--local
--non-interactive
--output "${{ runner.temp }}/chronicle.ipa"
- name: Submit local IPA to TestFlight
if: inputs.build_id == ''
run: >-
eas submit
--platform ios
--profile testflight
--path "${{ runner.temp }}/chronicle.ipa"
--non-interactive
--wait
- name: Submit existing build to TestFlight
if: inputs.build_id != '' && inputs.build_id != 'status'
env:
EAS_BUILD_ID: ${{ inputs.build_id }}
run: >-
eas build:submit
--platform ios
--profile testflight
--id "$EAS_BUILD_ID"
--non-interactive
--wait
- name: Check TestFlight status
if: inputs.build_id == 'status'
run: >-
eas submit:status
--platform ios
--profile testflight
--json
--non-interactive