-
Notifications
You must be signed in to change notification settings - Fork 1
127 lines (108 loc) · 4.14 KB
/
Copy pathios-ci.yml
File metadata and controls
127 lines (108 loc) · 4.14 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
name: iOS CI
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ios-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: iOS simulator build test
runs-on: macos-latest
env:
CLIPP_CACHE_DIR: ${{ github.workspace }}/clipp-cache
VCPKG_ROOT: ${{ github.workspace }}/v
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg-cache
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg-cache,readwrite
steps:
- name: Checkout clipp
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install build dependencies
run: brew install autoconf autoconf-archive automake libtool
- name: Verify Apple Silicon runner
run: |
if [[ "$(uname -m)" != "arm64" ]]; then
echo "iOS simulator CI currently builds the arm64 simulator slice only." >&2
exit 1
fi
- name: Read vcpkg baseline
id: vcpkg-baseline
run: |
baseline="$(python3 - <<'PY'
import json
with open("src/vcpkg.json", encoding="utf-8") as manifest_file:
manifest = json.load(manifest_file)
print(manifest.get("builtin-baseline", ""))
PY
)"
if [[ -z "$baseline" ]]; then
echo "src/vcpkg.json must define builtin-baseline for CI." >&2
exit 1
fi
echo "ref=$baseline" >> "$GITHUB_OUTPUT"
- name: Checkout vcpkg
run: |
git clone --no-tags https://github.com/microsoft/vcpkg.git "$VCPKG_ROOT"
git -C "$VCPKG_ROOT" checkout --detach "${{ steps.vcpkg-baseline.outputs.ref }}"
- name: Bootstrap vcpkg
run: |
"$VCPKG_ROOT/bootstrap-vcpkg.sh" -disableMetrics
- name: Prepare vcpkg binary cache
run: mkdir -p "$VCPKG_DEFAULT_BINARY_CACHE"
# Restore/save split (see windows-ci.yml): vcpkg's ABI hash includes the
# toolchain version, so an Xcode/clang image update otherwise deadlocks a
# combined actions/cache step into a permanent rebuild loop.
- name: Restore vcpkg binary cache
uses: actions/cache/restore@v5
with:
path: vcpkg-cache
key: ${{ runner.os }}-${{ runner.arch }}-vcpkg-ios-simulator-${{ hashFiles('src/vcpkg.json', 'src/vcpkg-triplets/**') }}-ci-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-vcpkg-ios-simulator-${{ hashFiles('src/vcpkg.json', 'src/vcpkg-triplets/**') }}-
${{ runner.os }}-${{ runner.arch }}-vcpkg-ios-simulator-
${{ runner.os }}-${{ runner.arch }}-vcpkg-
- name: Build Release
run: ./scripts/build_ios.sh --disable-code-signing
- name: Save vcpkg binary cache
uses: actions/cache/save@v5
with:
path: vcpkg-cache
key: ${{ runner.os }}-${{ runner.arch }}-vcpkg-ios-simulator-${{ hashFiles('src/vcpkg.json', 'src/vcpkg-triplets/**') }}-ci-${{ github.run_id }}
- name: Verify iOS app bundle
run: |
app="$(find build/ios -name 'Clipp.app' -type d -print -quit)"
if [[ -z "$app" ]]; then
echo "Could not find Clipp.app under build/ios." >&2
find build/ios -print | sed -n '1,200p'
exit 1
fi
echo "Verifying app bundle: $app"
find "$app" -maxdepth 2 -print | sed -n '1,160p'
# PrivacyInfo.xcprivacy rides the Clipp file-system-synchronized
# folder; its presence here proves the sync-group pickup works
# before a release run depends on it.
for path in \
"$app/Clipp" \
"$app/Info.plist" \
"$app/Assets.car" \
"$app/PrivacyInfo.xcprivacy"
do
if [[ ! -e "$path" ]]; then
echo "Missing expected bundle path: $path" >&2
exit 1
fi
done
if [[ ! -x "$app/Clipp" ]]; then
echo "App executable is not executable: $app/Clipp" >&2
ls -l "$app"
exit 1
fi