Repository navigation
152 lines (125 loc) · 3.7 KB
/
Copy pathci.yml
File metadata and controls
152 lines (125 loc) · 3.7 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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup
uses: ./.github/actions/setup
- name: Lint files
run: yarn lint --max-warnings=0
- name: Typecheck files
run: |
yarn typecheck
- name: Typecheck Expo files
run: |
yarn expo:typecheck
- name: Test Expo plugin
run: yarn test:plugin
- name: Format check
run: yarn prettier --check
build-library:
runs-on: ubuntu-latest
needs: [lint]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup
uses: ./.github/actions/setup
- name: Build package
run: yarn prepack
verify-npm-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
# Every file sealed in the XCFramework's _CodeSignature must ship,
# otherwise Xcode fails signature collection when archiving.
- name: Verify XCFramework is complete in npm package
run: |
git ls-files ios/TalsecRuntime.xcframework | sort > "$RUNNER_TEMP/expected.txt"
npm pack --dry-run --json --ignore-scripts \
| node -e 'const [p] = JSON.parse(require("fs").readFileSync(0)); p.files.forEach(f => console.log(f.path))' \
| grep '^ios/TalsecRuntime.xcframework/' | sort > "$RUNNER_TEMP/packed.txt"
if ! diff "$RUNNER_TEMP/expected.txt" "$RUNNER_TEMP/packed.txt"; then
echo "::error::npm package does not contain the complete TalsecRuntime.xcframework. Check .npmignore."
exit 1
fi
build-android:
runs-on: ubuntu-latest
needs: build-library
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup
uses: ./.github/actions/setup
- name: Install JDK
uses: actions/setup-java@v5
with:
distribution: "zulu"
java-version: "17"
- name: Finalize Android SDK
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Cache Gradle
uses: actions/cache@v5
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build example for Android
env:
JAVA_OPTS: "-XX:MaxHeapSize=6g"
working-directory: ./example
run: |
yarn build:android
build-ios:
runs-on: macos-latest
needs: build-library
env:
FREERASP_USE_SPM: "0"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup
uses: ./.github/actions/setup
- name: Install pods
working-directory: ./example/ios
run: pod install
- name: Build example for iOS
working-directory: ./example
run: |
yarn build:ios
build-ios-spm:
runs-on: macos-latest
needs: build-library
env:
USE_FRAMEWORKS: dynamic
FREERASP_USE_SPM: "1"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup
uses: ./.github/actions/setup
- name: Install pods (SPM)
working-directory: ./example/ios
run: pod install
- name: Build example for iOS (SPM)
working-directory: ./example
run: |
yarn build:ios